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


Java AllowedTokens类代码示例

本文整理汇总了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;
}
 
开发者ID:sensiasoft,项目名称:sensorhub,代码行数:23,代码来源:FakeSensorControl1.java

示例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();
    }
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:28,代码来源:XMLStreamBindings.java

示例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();
    }
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:27,代码来源:XMLStreamBindings.java

示例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;
}
 
开发者ID:sensiasoft,项目名称:sensorhub,代码行数:14,代码来源:FakeSensorControl2.java

示例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();
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:11,代码来源:CategoryImpl.java

示例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;
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:11,代码来源:CategoryImpl.java

示例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);
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:11,代码来源:CategoryImpl.java

示例8: getConstraint

import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
@Override
public AllowedTokens getConstraint()
{
    if (constraint == null)
        return null;
    return constraint.getValue();
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:8,代码来源:CategoryRangeImpl.java

示例9: getConstraintProperty

import net.opengis.swe.v20.AllowedTokens; //导入依赖的package包/类
@Override
public OgcProperty<AllowedTokens> getConstraintProperty()
{
    if (constraint == null)
        constraint = new OgcPropertyImpl<AllowedTokens>();
    return constraint;
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:8,代码来源:CategoryRangeImpl.java

示例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);
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:8,代码来源:CategoryRangeImpl.java

示例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();
    }
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:36,代码来源:XMLStreamBindings.java

示例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();
    }
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:38,代码来源:XMLStreamBindings.java

示例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();
    }
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:36,代码来源:XMLStreamBindings.java

示例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;
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:16,代码来源:XMLStreamBindings.java

示例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();
    }
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:35,代码来源:XMLStreamBindings.java


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