• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LocatorTransformer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jpmml.model.visitors.LocatorTransformer的典型用法代码示例。如果您正苦于以下问题:Java LocatorTransformer类的具体用法?Java LocatorTransformer怎么用?Java LocatorTransformer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LocatorTransformer类属于org.jpmml.model.visitors包,在下文中一共展示了LocatorTransformer类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: mixedContent

import org.jpmml.model.visitors.LocatorTransformer; //导入依赖的package包/类
@Test
public void mixedContent() throws Exception {
	PMML pmml = ResourceUtil.unmarshal(getClass());

	List<?> content = ExtensionUtil.getContent(pmml);

	assertEquals(5, content.size());

	assertEquals("First text value", content.get(0));
	assertEquals(Arrays.asList("First extension"), getDeepContent(content.get(1)));
	assertEquals("Second text value", content.get(2));
	assertEquals(Arrays.asList("Second extension"), getDeepContent(content.get(3)));
	assertEquals("Third text value", content.get(4));

	try {
		SerializationUtil.clone(pmml);

		fail();
	} catch(NotSerializableException nse){
		// Ignored
	}

	pmml.accept(new LocatorTransformer());

	SerializationUtil.clone(pmml);
}
 
开发者ID:jpmml,项目名称:jpmml-model,代码行数:27,代码来源:MixedContentTest.java


示例2: transformAndClone

import org.jpmml.model.visitors.LocatorTransformer; //导入依赖的package包/类
@Test
public void transformAndClone() throws Exception {
	PMML pmml = ResourceUtil.unmarshal(Version.PMML_4_3);

	assertNotNull(pmml.getLocator());

	try {
		SerializationUtil.clone(pmml);

		fail();
	} catch(NotSerializableException nse){
		// Ignored
	}

	pmml.accept(new LocatorTransformer());

	assertNotNull(pmml.getLocator());

	SerializationUtil.clone(pmml);
}
 
开发者ID:jpmml,项目名称:jpmml-model,代码行数:21,代码来源:SerializationTest.java


示例3: createEvaluator

import org.jpmml.model.visitors.LocatorTransformer; //导入依赖的package包/类
static
public Evaluator createEvaluator(InputStream is) throws SAXException, JAXBException {
	Source source = ImportFilter.apply(new InputSource(is));

	PMML pmml = JAXBUtil.unmarshalPMML(source);

	// If the SAX Locator information is available, then transform it to java.io.Serializable representation
	LocatorTransformer locatorTransformer = new LocatorTransformer();
	locatorTransformer.applyTo(pmml);

	ModelEvaluatorFactory modelEvaluatorFactory = ModelEvaluatorFactory.newInstance();

	ModelEvaluator<?> modelEvaluator = modelEvaluatorFactory.newModelManager(pmml);
	modelEvaluator.verify();

	return modelEvaluator;
}
 
开发者ID:jpmml,项目名称:jpmml-cascading,代码行数:18,代码来源:PMMLPlannerUtil.java


示例4: execute

import org.jpmml.model.visitors.LocatorTransformer; //导入依赖的package包/类
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
	List<Class<? extends Visitor>> visitorClazzes = new ArrayList<>();

	boolean keepLocator = getKeepLocator();

	visitorClazzes.add(keepLocator ? LocatorTransformer.class : LocatorNullifier.class);

	List<String> visitorClasses = getVisitorClasses();
	if(visitorClasses != null){

		try {
			for(String visitorClass : visitorClasses){
				Class<?> clazz = Class.forName(visitorClass);

				visitorClazzes.add(clazz.asSubclass(Visitor.class));
			}
		} catch(ClassNotFoundException | ClassCastException e){
			throw new MojoFailureException("Invalid visitorClasses parameter", e);
		}
	}

	List<ModelSet> modelSets = getModelSets();

	if(modelSets == null || modelSets.isEmpty()){
		throw new MojoFailureException("Missing modelSets parameter");
	}

	for(ModelSet modelSet : modelSets){
		transform(modelSet, visitorClazzes);
	}
}
 
开发者ID:jpmml,项目名称:jpmml-model,代码行数:33,代码来源:SerMojo.java


示例5: getPMML

import org.jpmml.model.visitors.LocatorTransformer; //导入依赖的package包/类
@Override
public PMML getPMML() throws Exception {
	PMML pmml = super.getPMML();

	LocatorTransformer locatorTransformer = new LocatorTransformer();
	locatorTransformer.applyTo(pmml);

	return pmml;
}
 
开发者ID:jpmml,项目名称:jpmml-evaluator,代码行数:10,代码来源:IntegrationTestBatch.java


示例6: createEvaluator

import org.jpmml.model.visitors.LocatorTransformer; //导入依赖的package包/类
static
public Evaluator createEvaluator(InputStream is) throws SAXException, JAXBException {
	Source source = ImportFilter.apply(new InputSource(is));

	PMML pmml = JAXBUtil.unmarshalPMML(source);

	// If the SAX Locator information is available, then transform it to java.io.Serializable representation
	LocatorTransformer locatorTransformer = new LocatorTransformer();
	locatorTransformer.applyTo(pmml);

	ModelEvaluatorFactory modelEvaluatorFactory = ModelEvaluatorFactory.newInstance();

	Evaluator evaluator = modelEvaluatorFactory.newModelEvaluator(pmml);

	// Perform self-testing
	evaluator.verify();

	return evaluator;
}
 
开发者ID:jeremyore,项目名称:spark-pmml-import,代码行数:20,代码来源:EvaluatorUtil.java


示例7: createEvaluator

import org.jpmml.model.visitors.LocatorTransformer; //导入依赖的package包/类
static
public Evaluator createEvaluator(InputStream is) throws SAXException, JAXBException {
	Source source = ImportFilter.apply(new InputSource(is));

	PMML pmml = JAXBUtil.unmarshalPMML(source);

	// If the SAX Locator information is available, then transform it to java.io.Serializable representation
	LocatorTransformer locatorTransformer = new LocatorTransformer();
	pmml.accept(locatorTransformer);

	ModelEvaluatorFactory modelEvaluatorFactory = ModelEvaluatorFactory.newInstance();

	ModelEvaluator<?> modelEvaluator = modelEvaluatorFactory.newModelManager(pmml);

	return modelEvaluator;
}
 
开发者ID:jpmml,项目名称:jpmml-storm,代码行数:17,代码来源:PMMLBoltUtil.java



注:本文中的org.jpmml.model.visitors.LocatorTransformer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EJBTransactionRequiredException类代码示例发布时间:2022-05-22
下一篇:
Java NotInServiceMenu类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap