当前位置: 首页>>代码示例>>Java>>正文


Java EMLDocument类代码示例

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


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

示例1: generateOutput

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
@Override
public Object generateOutput(MapEposEvent resultEvent) {
	this.eventMap = resultEvent;
	
	if (this.eventMap.containsKey(MapEposEvent.ORIGNIAL_OBJECT_KEY)) {
		this.resultEventDoc = EventDocument.Factory.newInstance();
		this.resultEventType = this.resultEventDoc.addNewEvent();
	}
	else {
		this.resultDerivedEventDoc = DerivedEventDocument.Factory.newInstance();
		this.resultDerivedEventType = this.resultDerivedEventDoc.addNewDerivedEvent();
	}
	
	EMLDocument emlDoc = EMLDocument.Factory.newInstance();
	emlDoc.setEML(eml);
	
	return generateEventDocument(emlDoc);
}
 
开发者ID:52North,项目名称:epos,代码行数:19,代码来源:EventModelGenerator.java

示例2: generateEventDocument

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
/**
 * @param eml if eml available put it in the procedure
 * @return XmlObject holding the {@link EventType}
 */
public XmlObject generateEventDocument(EML eml) {

	if (this.resultEventType != null) {
		generateFromEventType(this.eventMap, this.resultEventType);
		return this.resultEventDoc;
	}
	generateFromEventType(this.eventMap, this.resultDerivedEventType);
	if (eml  != null) {
		EMLDocument doc = EMLDocument.Factory.newInstance();
		doc.setEML(eml);
		this.resultDerivedEventType.setProcedure(doc);
	}
	else {
		this.resultDerivedEventType.addNewProcedure();
	}
	return this.resultDerivedEventDoc;
}
 
开发者ID:52North,项目名称:SES,代码行数:22,代码来源:EventModelGenerator.java

示例3: getRuleByEML

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
/**
 * 
 * This method is used to parse an EML file and return a Rule class with rule specific attributes. 
 * The method is called if user want to edit this rule type.
 * 
 * @param basicRule
 * @return {@link Rule}
 */
public Rule getRuleByEML(BasicRule basicRule) {
    Rule rule = new Rule();
    rule.setTimeseriesMetadata(basicRule.getTimeseriesMetadata());

    try {
        EMLDocument emlDocument = EMLDocument.Factory.parse(eml);
        SimplePatterns simplePatterns = emlDocument.getEML().getSimplePatterns();
        setEntryConditions(rule, simplePatterns.getSimplePatternArray(INDEX_ENTRY_CONDITION_PATTERN));
        setExitConditions(rule, simplePatterns.getSimplePatternArray(INDEX_EXIT_CONDITION_PATTERN));
        rule.setRuleType(SimpleRuleType.OVER_UNDERSHOOT);

    } catch (Exception e) {
        LOGGER.error("Error parsing EML rule", e);
    }
    return rule;
}
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:25,代码来源:BasicRule_4_Builder.java

示例4: createEmlWrapper

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
/**
 * Generates an EML document holding one
 * simple pattern with the given FilterType.
 * 
 * @param fesFilter an OGC filter encoding 2.0 filter
 * 
 * @return an EML document with a simple pattern using the filter as guard
 */
private static EMLDocument createEmlWrapper(FilterType fesFilter) {
	EMLDocument doc = EMLDocument.Factory.newInstance();
	EML eml = doc.addNewEML();
	
	eml.addNewComplexPatterns();
	eml.addNewRepetitivePatterns();
	eml.addNewTimerPatterns();
	
	SimplePatterns simple = eml.addNewSimplePatterns();
	
	SimplePatternType pattern = simple.addNewSimplePattern();
	
	pattern.setPatternID("defaultSimplePattern");
	pattern.setInputName("input");
	
	SelectFunctions funcs = pattern.addNewSelectFunctions();
	SelectFunctionType func = funcs.addNewSelectFunction();
	
	func.setNewEventName("");
	func.setOutputName("output");
	SelectEvent selEv = func.addNewSelectEvent();
	selEv.setEventName("sensorStream");
	
	ViewType view = pattern.addNewView();
	LengthView length = view.addNewLengthView();
	length.setEventCount(new BigInteger("1"));
	
	GuardType guard = pattern.addNewGuard();
	guard.setFilter(fesFilter);
	
	pattern.addNewPropertyRestrictions();
	
	return doc;
}
 
开发者ID:52North,项目名称:epos,代码行数:43,代码来源:FES20FilterInstantiation.java

示例5: serialize

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
@Override
public CharSequence serialize(FilterSerialization serializer) {
	if (serializer != null) {
		return serializer.serializeFilter(this);
	}
	EMLDocument doc = EMLDocument.Factory.newInstance();
	doc.setEML(this.eml);
	return doc.xmlText();
}
 
开发者ID:52North,项目名称:epos,代码行数:10,代码来源:EMLPatternFilter.java

示例6: shouldInstantiationEMLPatternFilter

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
@Test
public void shouldInstantiationEMLPatternFilter() throws XmlException, IOException, FilterInstantiationException {
	EMLDocument eml = EMLDocument.Factory.parse(getClass().getResourceAsStream("eml.xml"));
	
	EposFilter filter = FilterInstantiationRepository.Instance.instantiate(eml);
	
	Assert.assertTrue("filter is null!", filter != null);
	Assert.assertTrue("Not a PassiveFilter!", filter instanceof EMLPatternFilter);
}
 
开发者ID:52North,项目名称:epos,代码行数:10,代码来源:EMLRuleInstantiationTest.java

示例7: EML001Impl

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
public EML001Impl(XmlObject eml) {
	if (eml instanceof EMLDocument) {
		this.eml = (EMLDocument) eml;
	}
	else {
		throw new IllegalArgumentException("Only EML Version 0.0.1 allowed.");
	}
}
 
开发者ID:52North,项目名称:SES,代码行数:9,代码来源:EML001Impl.java

示例8: generateStaticDocument

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
public static EML001Impl generateStaticDocument(FilterType ogcFilter) {
	EMLDocument emlDoc = EMLDocument.Factory.newInstance();
	
	EML eml2 = emlDoc.addNewEML();
	eml2.addNewComplexPatterns();
	eml2.addNewRepetitivePatterns();
	eml2.addNewTimerPatterns();
	
	SimplePatterns simple = eml2.addNewSimplePatterns();
	
	SimplePatternType pattern = simple.addNewSimplePattern();
	
	pattern.setPatternID("defaultSimplePattern");
	pattern.setInputName("sensorStream");
	
	SelectFunctions funcs = pattern.addNewSelectFunctions();
	SelectFunctionType func = funcs.addNewSelectFunction();
	
	func.setNewEventName("");
	func.setOutputName("output");
	SelectEvent selEv = func.addNewSelectEvent();
	selEv.setEventName("sensorStream");
	
	ViewType view = pattern.addNewView();
	LengthView length = view.addNewLengthView();
	length.setEventCount(new BigInteger("1"));
	
	GuardType guard = pattern.addNewGuard();
	guard.setFilter(ogcFilter);
	
	pattern.addNewPropertyRestrictions();
	
	return new EML001Impl(emlDoc);
}
 
开发者ID:52North,项目名称:SES,代码行数:35,代码来源:EML001Impl.java

示例9: instantiateFrom

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
@Override
public EposFilter instantiateFrom(Object input) throws Exception {
	EMLDocument emlDoc = (EMLDocument) input;
	return new EMLPatternFilter(emlDoc);
}
 
开发者ID:52North,项目名称:epos,代码行数:6,代码来源:EMLRuleInstantiation.java

示例10: getSupportedInput

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
@Override
public Class<?> getSupportedInput() {
	return EMLDocument.class;
}
 
开发者ID:52North,项目名称:epos,代码行数:5,代码来源:EMLRuleInstantiation.java

示例11: EMLPatternFilter

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
public EMLPatternFilter(EMLDocument emlDoc) throws Exception {
	this.eml = emlDoc.getEML();
	
	initialize();
}
 
开发者ID:52North,项目名称:epos,代码行数:6,代码来源:EMLPatternFilter.java

示例12: getEmlTemplate

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
protected EMLDocument getEmlTemplate() throws MalformedURLException, XmlException, IOException {
    URL url = new URL(templatePath);
    return EMLDocument.Factory.parse(url.openStream());
}
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:5,代码来源:BasicRuleBuilder.java

示例13: getEmlTemplate

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
@Override
protected EMLDocument getEmlTemplate() throws MalformedURLException, XmlException, IOException {
    return EMLDocument.Factory.parse(getClass().getResourceAsStream("/files/BR_5.xml"));
}
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:5,代码来源:BasicRule_5_BuilderTest.java

示例14: getEmlTemplate

import net.opengis.eml.x001.EMLDocument; //导入依赖的package包/类
@Override
protected EMLDocument getEmlTemplate() throws MalformedURLException, XmlException, IOException {
    return EMLDocument.Factory.parse(getClass().getResourceAsStream("/files/BR_4.xml"));
}
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:5,代码来源:BasicRule_4_BuilderTest.java


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