|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.n52.oxf.sml.util.SmlHelper
public class SmlHelper
A helper class to conveniently read SensorML documents.
An instance is read into an internal cache for performance reasons. That means that once read, the helper
can be reused on the same instance. One could decide to hold the helper instance on caller side instead of
the sensorML document. If needed the cache can be cleared by clearCachedSml()
.
Field Summary | |
---|---|
net.opengis.sensorML.x101.SensorMLDocument |
cachedDocument
|
static String |
LONG_NAME_NAME
|
static String |
OGC_LONG_NAME_URN
|
static String |
OGC_SHORT_NAME_URN
|
static String |
OGC_UNIQUE_ID_URN
|
static String |
SHORT_NAME_NAME
|
static String |
UNIQUE_ID_NAME
|
Constructor Summary | |
---|---|
SmlHelper()
|
Method Summary | |
---|---|
net.opengis.sensorML.x101.ComponentType |
asComponent(net.opengis.sensorML.x101.AbstractProcessType process)
|
net.opengis.sensorML.x101.SystemType |
asSystem(net.opengis.sensorML.x101.AbstractProcessType process)
|
void |
clearCachedSml()
Clears the cachedDocument SensorML description. |
String |
findUniqueIdFrom(net.opengis.sensorML.x101.IdentificationDocument.Identification smlIdentification)
|
net.opengis.sensorML.x101.SensorMLDocument |
getCachedSmlFrom(org.apache.xmlbeans.XmlObject smlContainer)
Parses the passed procedure description into SensorML and caches the result for later use. |
net.opengis.swe.x101.DataComponentPropertyType |
getField(String name,
net.opengis.swe.x101.DataRecordType dataRecord)
|
net.opengis.sensorML.x101.IdentificationDocument.Identification |
getIdentification(net.opengis.sensorML.x101.SensorMLDocument smlDoc)
Gets the first Identification entry of the first SensorML member. |
String |
getIdValueFrom(String name,
net.opengis.sensorML.x101.IdentificationDocument.Identification smlIdentification)
Finds the value from a given sml:identification that matches either name . |
String |
getIdValueFrom(String name,
String definition,
net.opengis.sensorML.x101.IdentificationDocument.Identification smlIdentification)
Finds the value from a given sml:identification that matches either name or
definition . |
net.opengis.sensorML.x101.InterfaceDocument.Interface |
getServiceInterface(String name,
net.opengis.sensorML.x101.InterfacesDocument.Interfaces interfaces)
|
net.opengis.sensorML.x101.SensorMLDocument |
getSmlFrom(org.apache.xmlbeans.XmlObject smlContainer)
|
String |
getStringValue(net.opengis.swe.x101.DataComponentPropertyType field)
|
boolean |
isComponent(net.opengis.sensorML.x101.AbstractProcessType process)
|
boolean |
isScalar(net.opengis.swe.x101.DataComponentPropertyType field)
|
boolean |
isSystem(net.opengis.sensorML.x101.AbstractProcessType process)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public net.opengis.sensorML.x101.SensorMLDocument cachedDocument
public static final String UNIQUE_ID_NAME
public static final String LONG_NAME_NAME
public static final String SHORT_NAME_NAME
public static final String OGC_UNIQUE_ID_URN
public static final String OGC_LONG_NAME_URN
public static final String OGC_SHORT_NAME_URN
Constructor Detail |
---|
public SmlHelper()
Method Detail |
---|
public net.opengis.sensorML.x101.SensorMLDocument getSmlFrom(org.apache.xmlbeans.XmlObject smlContainer) throws org.apache.xmlbeans.XmlException
smlContainer
- the xml container containing the SensorML description
org.apache.xmlbeans.XmlException
- if parsing to SensorML fails.public net.opengis.sensorML.x101.SensorMLDocument getCachedSmlFrom(org.apache.xmlbeans.XmlObject smlContainer) throws org.apache.xmlbeans.XmlException
clearCachedSml()
.
smlContainer
- the xml container containing the SensorML description
org.apache.xmlbeans.XmlException
- if parsing to SensorML fails.#getSmlFrom(ProcedureDescription)
,
clearCachedSml()
public void clearCachedSml()
public net.opengis.sensorML.x101.SystemType asSystem(net.opengis.sensorML.x101.AbstractProcessType process)
public net.opengis.sensorML.x101.ComponentType asComponent(net.opengis.sensorML.x101.AbstractProcessType process)
public String findUniqueIdFrom(net.opengis.sensorML.x101.IdentificationDocument.Identification smlIdentification)
public net.opengis.sensorML.x101.IdentificationDocument.Identification getIdentification(net.opengis.sensorML.x101.SensorMLDocument smlDoc)
smlDoc
- the sensor description document.
null
if not found.public String getIdValueFrom(String name, net.opengis.sensorML.x101.IdentificationDocument.Identification smlIdentification)
name
.
name
- the name to search for (mandatory)identifier
- the sml:identifier to search
true
if name
or definition
could be found in the
sml:identifierpublic String getIdValueFrom(String name, String definition, net.opengis.sensorML.x101.IdentificationDocument.Identification smlIdentification)
name
or
definition
.
name
- the name to search for (mandatory)definition
- the definition to search for (optional)identifier
- the sml:identifier to search
true
if name
or definition
could be found in the
sml:identifierpublic boolean isComponent(net.opengis.sensorML.x101.AbstractProcessType process)
public boolean isSystem(net.opengis.sensorML.x101.AbstractProcessType process)
public net.opengis.sensorML.x101.InterfaceDocument.Interface getServiceInterface(String name, net.opengis.sensorML.x101.InterfacesDocument.Interfaces interfaces)
public String getStringValue(net.opengis.swe.x101.DataComponentPropertyType field)
public net.opengis.swe.x101.DataComponentPropertyType getField(String name, net.opengis.swe.x101.DataRecordType dataRecord)
public boolean isScalar(net.opengis.swe.x101.DataComponentPropertyType field)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |