本文整理汇总了Java中net.opengis.swe.v20.AbstractSWEIdentifiable类的典型用法代码示例。如果您正苦于以下问题:Java AbstractSWEIdentifiable类的具体用法?Java AbstractSWEIdentifiable怎么用?Java AbstractSWEIdentifiable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractSWEIdentifiable类属于net.opengis.swe.v20包,在下文中一共展示了AbstractSWEIdentifiable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readEncodedValuesPropertyType
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Read method for EncodedValuesPropertyType complex type
*/
public EncodedValues readEncodedValuesPropertyType(XMLStreamReader reader, AbstractSWEIdentifiable blockComponent, DataEncoding encoding) throws XMLStreamException
{
EncodedValues bean = factory.newEncodedValuesProperty();
Map<String, String> attrMap = collectAttributes(reader);
readPropertyAttributes(attrMap, bean);
String text = reader.getElementText();
if (text != null && text.trim().length() > 0)
{
if (blockComponent instanceof DataArray)
bean.setAsText((DataArray)blockComponent, encoding, text);
else if (blockComponent instanceof DataStream)
bean.setAsText((DataStream)blockComponent, encoding, text);
}
else if (!bean.hasHref())
return null;
return bean;
}
示例2: writeEncodedValuesPropertyType
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Write method for EncodedValuesPropertyType complex type
*/
public void writeEncodedValuesPropertyType(XMLStreamWriter writer, AbstractSWEIdentifiable blockComponent, DataEncoding encoding, EncodedValues bean) throws XMLStreamException
{
writePropertyAttributes(writer, bean);
if (!bean.hasHref())
{
String text = null;
if (blockComponent instanceof DataArray)
text = bean.getAsText((DataArray)blockComponent, encoding);
else if (blockComponent instanceof DataStream)
text = bean.getAsText((DataStream)blockComponent, encoding);
if (text != null)
writer.writeCharacters(text);
}
}
示例3: wrapOutputWithDataStream
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
protected void wrapOutputWithDataStream(String outputName, DataComponent dataStruct, DataEncoding encoding)
{
OgcProperty<AbstractSWEIdentifiable> output = sensorDescription.getOutputList().getProperty(outputName);
if (output == null || !(output.getValue() instanceof DataStream))
{
DataStream ds = new SWEFactory().newDataStream();
ds.setElementType(outputName, dataStruct);
ds.setEncoding(encoding);
if (output == null)
sensorDescription.addOutput(outputName, ds);
else
output.setValue(ds);
}
}
示例4: scanIOList
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
protected void scanIOList(OgcPropertyList<AbstractSWEIdentifiable> ioList, Map<String, DataComponent> ioMap, boolean isOutput) throws ProcessException
{
int numSignals = ioList.size();
for (int i=0; i<numSignals; i++)
{
String ioName = ioList.getProperty(i).getName();
AbstractSWEIdentifiable ioDesc = ioList.get(i);
DataComponent ioComponent = SMLHelper.getIOComponent(ioDesc);
ioComponent.setName(ioName);
ioMap.put(ioName, ioComponent.copy());
if (isOutput)
outputInterfaces.put(ioName, new SMLOutputInterface(this, ioComponent));
}
}
示例5: readAbstractSWEIdentifiableTypeElements
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Reads elements of AbstractSWEIdentifiableType complex type
*/
public void readAbstractSWEIdentifiableTypeElements(XMLStreamReader reader, AbstractSWEIdentifiable bean) throws XMLStreamException
{
this.readAbstractSWETypeElements(reader, bean);
boolean found;
String val;
// identifier
// need to check for NS URI here because there is a conflict with SensorML identifier in IdentifierList
found = checkElementQName(reader, NS_URI, "identifier");
if (found)
{
val = reader.getElementText();
if (val != null)
bean.setIdentifier(trimStringValue(val));
reader.nextTag();
}
// label
found = checkElementName(reader, "label");
if (found)
{
val = reader.getElementText();
if (val != null)
bean.setLabel(trimStringValue(val));
reader.nextTag();
}
// description
found = checkElementName(reader, "description");
if (found)
{
val = reader.getElementText();
if (val != null)
bean.setDescription(trimStringValue(val));
reader.nextTag();
}
}
示例6: writeAbstractSWEIdentifiableTypeElements
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Writes elements of AbstractSWEIdentifiableType complex type
*/
public void writeAbstractSWEIdentifiableTypeElements(XMLStreamWriter writer, AbstractSWEIdentifiable bean) throws XMLStreamException
{
this.writeAbstractSWETypeElements(writer, bean);
// identifier
if (bean.isSetIdentifier())
{
writer.writeStartElement(NS_URI, "identifier");
writer.writeCharacters(bean.getIdentifier());
writer.writeEndElement();
}
// label
if (bean.isSetLabel())
{
writer.writeStartElement(NS_URI, "label");
writer.writeCharacters(bean.getLabel());
writer.writeEndElement();
}
// description
if (bean.isSetDescription())
{
writer.writeStartElement(NS_URI, "description");
writer.writeCharacters(bean.getDescription());
writer.writeEndElement();
}
}
示例7: readAbstractSWEIdentifiable
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Dispatcher method for reading elements derived from AbstractSWEIdentifiable
*/
public AbstractSWEIdentifiable readAbstractSWEIdentifiable(XMLStreamReader reader) throws XMLStreamException
{
String localName = reader.getName().getLocalPart();
if (localName.equals("DataRecord"))
return readDataRecord(reader);
else if (localName.equals("Vector"))
return readVector(reader);
else if (localName.equals("DataArray"))
return readDataArray(reader);
else if (localName.equals("Matrix"))
return readMatrix(reader);
else if (localName.equals("DataStream"))
return readDataStream(reader);
else if (localName.equals("DataChoice"))
return readDataChoice(reader);
else if (localName.equals("Count"))
return readCount(reader);
else if (localName.equals("CategoryRange"))
return readCategoryRange(reader);
else if (localName.equals("QuantityRange"))
return readQuantityRange(reader);
else if (localName.equals("Time"))
return readTime(reader);
else if (localName.equals("TimeRange"))
return readTimeRange(reader);
else if (localName.equals("Boolean"))
return readBoolean(reader);
else if (localName.equals("Text"))
return readText(reader);
else if (localName.equals("Category"))
return readCategory(reader);
else if (localName.equals("Quantity"))
return readQuantity(reader);
else if (localName.equals("CountRange"))
return readCountRange(reader);
throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader));
}
示例8: getIOComponent
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Helper to get the input/output/parameter component description whether
* the IO is wrapped in a DataInterface or DataStream or given as a raw
* DataComponent.
* @param ioDef
* @return DataComponent
*/
public static DataComponent getIOComponent(AbstractSWEIdentifiable ioDef)
{
if (ioDef instanceof DataInterface)
return ((DataInterface)ioDef).getData().getElementType();
else if (ioDef instanceof DataStream)
return ((DataStream)ioDef).getElementType();
else
return (DataComponent)ioDef;
}
示例9: getIOEncoding
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Helper to get the input/output/parameter encoding description whether
* the IO is wrapped in a DataInterface or DataStream.<br/>
* This method returns null if the IO is described as a raw DataComponent.
* @param ioDef
* @return DataComponent
*/
public static DataEncoding getIOEncoding(AbstractSWEIdentifiable ioDef)
{
if (ioDef instanceof DataInterface)
return ((DataInterface)ioDef).getData().getEncoding();
else if (ioDef instanceof DataStream)
return ((DataStream)ioDef).getEncoding();
else
return null;
}
示例10: getComponentIndex
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
public int getComponentIndex(String name)
{
AbstractSWEIdentifiable comp = this.get(name);
if (comp == null)
return -1;
return indexOf(comp);
}
示例11: readAbstractSWEIdentifiableTypeAttributes
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Reads attributes of AbstractSWEIdentifiableType complex type
*/
public void readAbstractSWEIdentifiableTypeAttributes(Map<String, String> attrMap, AbstractSWEIdentifiable bean) throws XMLStreamException
{
this.readAbstractSWETypeAttributes(attrMap, bean);
}
示例12: writeAbstractSWEIdentifiableTypeAttributes
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
/**
* Writes attributes of AbstractSWEIdentifiableType complex type
*/
public void writeAbstractSWEIdentifiableTypeAttributes(XMLStreamWriter writer, AbstractSWEIdentifiable bean) throws XMLStreamException
{
this.writeAbstractSWETypeAttributes(writer, bean);
}
示例13: getInput
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
@Override
public AbstractSWEIdentifiable getInput(String name)
{
return inputData.get(name);
}
示例14: getOutput
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
@Override
public AbstractSWEIdentifiable getOutput(String name)
{
return outputData.get(name);
}
示例15: getParameter
import net.opengis.swe.v20.AbstractSWEIdentifiable; //导入依赖的package包/类
@Override
public AbstractSWEIdentifiable getParameter(String name)
{
return paramData.get(name);
}