本文整理汇总了Java中net.opengis.swe.v20.AllowedTokens类的典型用法代码示例。如果您正苦于以下问题:Java AllowedTokens类的具体用法?Java AllowedTokens怎么用?Java AllowedTokens使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AllowedTokens类属于net.opengis.swe.v20包,在下文中一共展示了AllowedTokens类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCommandDescription
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
@Override
public DataComponent getCommandDescription()
{
DataComponent record = new DataRecordImpl(3);
record.setName(this.name);
record.setDefinition("urn:blabla:command");
Quantity q = new QuantityImpl();
q.setDefinition("urn:blabla:samplingPeriod");
q.getUom().setCode("s");
record.addComponent("samplingPeriod", q);
Category c = new CategoryImpl();
c.setDefinition("urn:blabla:sensitivity");
AllowedTokens tokens = new AllowedTokensImpl();
tokens.addValue("HIGH");
tokens.addValue("LOW");
c.setConstraint(tokens);
record.addComponent("sens", c);
return record;
}
示例2: writeTextTypeElements
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Writes elements of TextType complex type
* @param writeInlineValues
*/
public void writeTextTypeElements(XMLStreamWriter writer, Text bean, boolean writeInlineValues) throws XMLStreamException
{
this.writeAbstractSimpleComponentTypeElements(writer, bean);
// constraint
if (bean.isSetConstraint())
{
writer.writeStartElement(NS_URI, "constraint");
OgcProperty<AllowedTokens> constraintProp = bean.getConstraintProperty();
writePropertyAttributes(writer, constraintProp);
if (constraintProp.hasValue() && !constraintProp.hasHref())
this.writeAllowedTokens(writer, bean.getConstraint());
writer.writeEndElement();
}
// value
if (bean.isSetValue() && writeInlineValues)
{
writer.writeStartElement(NS_URI, "value");
writer.writeCharacters(bean.getValue());
writer.writeEndElement();
}
}
示例3: writeAllowedTokensTypeElements
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Writes elements of AllowedTokensType complex type
*/
public void writeAllowedTokensTypeElements(XMLStreamWriter writer, AllowedTokens bean) throws XMLStreamException
{
this.writeAbstractSWETypeElements(writer, bean);
int numItems;
// value
numItems = bean.getValueList().size();
for (int i = 0; i < numItems; i++)
{
String item = bean.getValueList().get(i);
writer.writeStartElement(NS_URI, "value");
writer.writeCharacters(item);
writer.writeEndElement();
}
// pattern
if (bean.isSetPattern())
{
writer.writeStartElement(NS_URI, "pattern");
writer.writeCharacters(bean.getPattern());
writer.writeEndElement();
}
}
示例4: getCommandDescription
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
@Override
public DataComponent getCommandDescription()
{
Category c = new CategoryImpl();
c.setName(name);
c.setDefinition("urn:blabla:trigger");
AllowedTokens tokens = new AllowedTokensImpl();
tokens.addValue("NOW");
tokens.addValue("REPEAT");
tokens.addValue("STOP");
c.setConstraint(tokens);
return c;
}
示例5: getConstraint
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Gets the constraint property
*/
@Override
public AllowedTokens getConstraint()
{
if (constraint == null)
return null;
return constraint.getValue();
}
示例6: getConstraintProperty
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Gets extra info (name, xlink, etc.) carried by the constraint property
*/
@Override
public OgcProperty<AllowedTokens> getConstraintProperty()
{
if (constraint == null)
constraint = new OgcPropertyImpl<AllowedTokens>();
return constraint;
}
示例7: setConstraint
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Sets the constraint property
*/
@Override
public void setConstraint(AllowedTokens constraint)
{
if (this.constraint == null)
this.constraint = new OgcPropertyImpl<AllowedTokens>();
this.constraint.setValue(constraint);
}
示例8: getConstraint
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
@Override
public AllowedTokens getConstraint()
{
if (constraint == null)
return null;
return constraint.getValue();
}
示例9: getConstraintProperty
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
@Override
public OgcProperty<AllowedTokens> getConstraintProperty()
{
if (constraint == null)
constraint = new OgcPropertyImpl<AllowedTokens>();
return constraint;
}
示例10: setConstraint
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
@Override
public void setConstraint(AllowedTokens constraint)
{
if (this.constraint == null)
this.constraint = new OgcPropertyImpl<AllowedTokens>();
this.constraint.setValue(constraint);
}
示例11: writeCategoryRangeTypeElements
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Writes elements of CategoryRangeType complex type
* @param writeInlineValues
*/
public void writeCategoryRangeTypeElements(XMLStreamWriter writer, CategoryRange bean, boolean writeInlineValues) throws XMLStreamException
{
this.writeAbstractSimpleComponentTypeElements(writer, bean);
// codeSpace
if (bean.isSetCodeSpace())
{
writer.writeStartElement(NS_URI, "codeSpace");
writer.writeAttribute(XLINK_NS_URI, "href", bean.getCodeSpace());
writer.writeEndElement();
}
// constraint
if (bean.isSetConstraint())
{
writer.writeStartElement(NS_URI, "constraint");
OgcProperty<AllowedTokens> constraintProp = bean.getConstraintProperty();
writePropertyAttributes(writer, constraintProp);
if (constraintProp.hasValue() && !constraintProp.hasHref())
this.writeAllowedTokens(writer, bean.getConstraint());
writer.writeEndElement();
}
// value
if (bean.isSetValue() && writeInlineValues)
{
writer.writeStartElement(NS_URI, "value");
writer.writeCharacters(getStringValue(bean.getValue()));
writer.writeEndElement();
}
}
示例12: readTextTypeElements
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Reads elements of TextType complex type
*/
public void readTextTypeElements(XMLStreamReader reader, Text bean) throws XMLStreamException
{
this.readAbstractSimpleComponentTypeElements(reader, bean);
boolean found;
String val;
// constraint
found = checkElementName(reader, "constraint");
if (found)
{
OgcProperty<AllowedTokens> constraintProp = bean.getConstraintProperty();
readPropertyAttributes(reader, constraintProp);
reader.nextTag();
if (reader.getEventType() == XMLStreamConstants.START_ELEMENT)
{
constraintProp.setValue(this.readAllowedTokens(reader));
reader.nextTag(); // end property tag
}
reader.nextTag();
}
// value
found = checkElementName(reader, "value");
if (found)
{
val = reader.getElementText();
if (val != null)
bean.setValue(trimStringValue(val));
reader.nextTag();
}
}
示例13: writeCategoryTypeElements
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Writes elements of CategoryType complex type
* @param writeInlineValues
*/
public void writeCategoryTypeElements(XMLStreamWriter writer, Category bean, boolean writeInlineValues) throws XMLStreamException
{
this.writeAbstractSimpleComponentTypeElements(writer, bean);
// codeSpace
if (bean.isSetCodeSpace())
{
writer.writeStartElement(NS_URI, "codeSpace");
writer.writeAttribute(XLINK_NS_URI, "href", bean.getCodeSpace());
writer.writeEndElement();
}
// constraint
if (bean.isSetConstraint())
{
writer.writeStartElement(NS_URI, "constraint");
OgcProperty<AllowedTokens> constraintProp = bean.getConstraintProperty();
writePropertyAttributes(writer, constraintProp);
if (constraintProp.hasValue() && !constraintProp.hasHref())
this.writeAllowedTokens(writer, bean.getConstraint());
writer.writeEndElement();
}
// value
if (bean.isSetValue() && writeInlineValues)
{
writer.writeStartElement(NS_URI, "value");
writer.writeCharacters(bean.getValue());
writer.writeEndElement();
}
}
示例14: readAllowedTokensType
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Read method for AllowedTokensType complex type
*/
public AllowedTokens readAllowedTokensType(XMLStreamReader reader) throws XMLStreamException
{
AllowedTokens bean = factory.newAllowedTokens();
Map<String, String> attrMap = collectAttributes(reader);
this.readAllowedTokensTypeAttributes(attrMap, bean);
reader.nextTag();
this.readAllowedTokensTypeElements(reader, bean);
return bean;
}
示例15: readAllowedTokensTypeElements
import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
/**
* Reads elements of AllowedTokensType complex type
*/
public void readAllowedTokensTypeElements(XMLStreamReader reader, AllowedTokens bean) throws XMLStreamException
{
this.readAbstractSWETypeElements(reader, bean);
boolean found;
String val;
// value
do
{
found = checkElementName(reader, "value");
if (found)
{
val = reader.getElementText();
if (val != null)
bean.addValue(trimStringValue(val));
reader.nextTag();
}
}
while (found);
// pattern
found = checkElementName(reader, "pattern");
if (found)
{
val = reader.getElementText();
if (val != null)
bean.setPattern(trimStringValue(val));
reader.nextTag();
}
}