public abstract class AbstractSensorMLEncoder extends AbstractXmlEncoder<Object> implements ProcedureEncoder<org.apache.xmlbeans.XmlObject,Object>
AbstractXmlEncoder
class to encode OGC SensorMLModifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOGGER |
private static String |
OUTPUT_PREFIX |
Constructor and Description |
---|
AbstractSensorMLEncoder() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSpecialCapabilities(AbstractProcess abstractProcess)
Add special capabilities to abstract process:
featureOfInterest,
sosOfferings,
parentProcedures
but only, if available.
|
protected Set<SweText> |
convertFeaturesToSet(Map<String,AbstractFeature> map)
Convert SOS sosOfferings to map with key == identifier and value = name
|
protected Map<String,String> |
convertOfferingsToMap(Set<SosOffering> offerings)
Convert SOS sosOfferings to map with key == identifier and value = name
|
protected Set<SweText> |
convertOfferingsToSet(Set<SosOffering> offerings)
Convert SOS sosOfferings to map with key == identifier and value = name
|
private List<SweField> |
createCapabilitiesFieldsFrom(String fieldDefinition,
Map<String,String> valueNamePairs) |
private List<SweField> |
createCapabilitiesFieldsFrom(String fieldElementDefinition,
String fieldName,
Set<SweText> sweTextSet) |
protected SmlCapabilities |
createCapabilitiesFrom(String capabilitiesName,
String fieldDefinition,
Map<String,String> valueNamePairs)
Creates a SOS capability object form data
|
protected SmlCapabilities |
createCapabilitiesFrom(String capabilitiesName,
String fieldDefinition,
String fieldName,
Set<SweText> sweTextSet) |
protected List<SmlComponent> |
createComponentsForChildProcedures(Set<SosProcedureDescription> childProcedures)
Create SOS component list from child SOS procedure descriptions
|
protected Map<String,String> |
createValueNamePairs(String fieldName,
Set<String> values) |
protected Collection<String> |
getFeaturesFromChild(List<SmlComponent> smlComponents)
Get featureOfInterests from components
|
protected org.apache.xmlbeans.XmlOptions |
getOptions() |
protected Collection<? extends SmlIo<?>> |
getOutputsFromChilds(List<SmlComponent> smlComponents)
Get the output values from childs
|
protected String |
getValidOutputName(int counter,
Set<String> outputNames)
Create a valvalue output element name
|
protected boolean |
isIdentical(org.apache.xmlbeans.XmlObject xmlObject,
org.apache.xmlbeans.XmlOptions xmlOptions,
org.apache.xmlbeans.XmlObject anotherXmlObject) |
private void |
mergeCapabilities(AbstractProcess process,
String capabilitiesName,
String definition,
Map<String,String> valueNamePairs) |
protected void |
mergeCapabilities(AbstractProcess process,
String capabilitiesName,
String definition,
String fieldName,
Set<SweText> sweTextFieldSet) |
addNamespacePrefixToMap, encode, getConformanceClasses, getContentType, getSchemaLocations, getSupportedTypes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSupportedProcedureDescriptionFormats
addNamespacePrefixToMap, encode, encode, getContentType, getEncoderKeyType, getSchemaLocations, getSupportedTypes
getConformanceClasses
private static final org.slf4j.Logger LOGGER
private static final String OUTPUT_PREFIX
protected void addSpecialCapabilities(AbstractProcess abstractProcess)
abstractProcess
- SOS abstract process.private void mergeCapabilities(AbstractProcess process, String capabilitiesName, String definition, Map<String,String> valueNamePairs)
protected void mergeCapabilities(AbstractProcess process, String capabilitiesName, String definition, String fieldName, Set<SweText> sweTextFieldSet)
protected Map<String,String> convertOfferingsToMap(Set<SosOffering> offerings)
offerings
- SOS sosOfferingsprotected Set<SweText> convertFeaturesToSet(Map<String,AbstractFeature> map)
featureOfInterestFieldName
- map
- .values() SOS sosOfferingsprotected Set<SweText> convertOfferingsToSet(Set<SosOffering> offerings)
offerings
- SOS sosOfferingsprotected Map<String,String> createValueNamePairs(String fieldName, Set<String> values)
protected SmlCapabilities createCapabilitiesFrom(String capabilitiesName, String fieldDefinition, Map<String,String> valueNamePairs)
capabilitiesName
- Element namefieldDefinition
- Field definitionvalueNamePairs
- Value mapprivate List<SweField> createCapabilitiesFieldsFrom(String fieldDefinition, Map<String,String> valueNamePairs)
protected SmlCapabilities createCapabilitiesFrom(String capabilitiesName, String fieldDefinition, String fieldName, Set<SweText> sweTextSet)
private List<SweField> createCapabilitiesFieldsFrom(String fieldElementDefinition, String fieldName, Set<SweText> sweTextSet)
protected List<SmlComponent> createComponentsForChildProcedures(Set<SosProcedureDescription> childProcedures) throws CodedException
childProcedures
- Chile procedure descriptionsCodedException
- If an error occursprotected Collection<? extends SmlIo<?>> getOutputsFromChilds(List<SmlComponent> smlComponents)
smlComponents
- SOS component listprotected Collection<String> getFeaturesFromChild(List<SmlComponent> smlComponents)
smlComponents
- SOS component listprotected boolean isIdentical(org.apache.xmlbeans.XmlObject xmlObject, org.apache.xmlbeans.XmlOptions xmlOptions, org.apache.xmlbeans.XmlObject anotherXmlObject)
protected String getValidOutputName(int counter, Set<String> outputNames)
counter
- Element counteroutputNames
- Set with otput namesprotected org.apache.xmlbeans.XmlOptions getOptions()
Copyright © 2012-2015 52north.org. All Rights Reserved.