use of org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType in project ddf by codice.
the class TestGenericFeatureConverter method buildStatesMetacardType.
private MetacardType buildStatesMetacardType() {
XmlSchema schema = new XmlSchema();
schema.getElements().putAll(buildStatesElementMap(schema));
return new FeatureMetacardType(schema, new QName(STATES_FEATURE_TYPE), new ArrayList<String>(), Wfs20Constants.GML_3_2_NAMESPACE);
}
use of org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType in project ddf by codice.
the class TestGenericFeatureConverter method buildMetacardType.
private MetacardType buildMetacardType() {
XmlSchema schema = new XmlSchema();
schema.getElements().putAll(buildElementMap(schema));
return new FeatureMetacardType(schema, new QName(FEATURE_TYPE), new ArrayList<String>(), Wfs20Constants.GML_3_2_NAMESPACE);
}
use of org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType in project ddf by codice.
the class FeatureMetacardTypeTest method testfeatureMetacardTypeFindDateProperties.
@Test
public void testfeatureMetacardTypeFindDateProperties() {
XmlSchema schema = new XmlSchema();
XmlSchemaElement dateElement = new XmlSchemaElement(schema, true);
dateElement.setSchemaType(new XmlSchemaSimpleType(schema, false));
dateElement.setSchemaTypeName(Constants.XSD_DATE);
dateElement.setName(ELEMENT_NAME_1);
XmlSchemaElement dateTimeElement = new XmlSchemaElement(schema, true);
dateTimeElement.setSchemaType(new XmlSchemaSimpleType(schema, false));
dateTimeElement.setSchemaTypeName(Constants.XSD_DATETIME);
dateTimeElement.setName(ELEMENT_NAME_2);
schema.getElements().put(new QName(ELEMENT_NAME_1), dateElement);
schema.getElements().put(new QName(ELEMENT_NAME_2), dateTimeElement);
FeatureMetacardType featureMetacardType = new FeatureMetacardType(schema, FEATURE_TYPE, NON_QUERYABLE_PROPS, Wfs20Constants.GML_3_2_NAMESPACE);
assertAttributeDescriptor(featureMetacardType, ELEMENT_NAME_1, BasicTypes.DATE_TYPE);
assertAttributeDescriptor(featureMetacardType, ELEMENT_NAME_2, BasicTypes.DATE_TYPE);
}
use of org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType in project ddf by codice.
the class FeatureMetacardTypeTest method testfeatureMetacardTypeFindIntegerProperties.
@Test
public void testfeatureMetacardTypeFindIntegerProperties() {
XmlSchema schema = new XmlSchema();
XmlSchemaElement integerElement = new XmlSchemaElement(schema, true);
integerElement.setSchemaType(new XmlSchemaSimpleType(schema, false));
integerElement.setSchemaTypeName(Constants.XSD_INTEGER);
integerElement.setName(ELEMENT_NAME_1);
XmlSchemaElement intElement = new XmlSchemaElement(schema, true);
intElement.setSchemaType(new XmlSchemaSimpleType(schema, false));
intElement.setSchemaTypeName(Constants.XSD_INT);
intElement.setName(ELEMENT_NAME_2);
XmlSchemaElement positivieIntegerElement = new XmlSchemaElement(schema, true);
positivieIntegerElement.setSchemaType(new XmlSchemaSimpleType(schema, false));
positivieIntegerElement.setSchemaTypeName(Constants.XSD_POSITIVEINTEGER);
positivieIntegerElement.setName(ELEMENT_NAME_3);
schema.getElements().put(new QName(ELEMENT_NAME_1), integerElement);
schema.getElements().put(new QName(ELEMENT_NAME_2), intElement);
schema.getElements().put(new QName(ELEMENT_NAME_3), positivieIntegerElement);
FeatureMetacardType featureMetacardType = new FeatureMetacardType(schema, FEATURE_TYPE, NON_QUERYABLE_PROPS, Wfs20Constants.GML_3_2_NAMESPACE);
assertAttributeDescriptor(featureMetacardType, ELEMENT_NAME_1, BasicTypes.STRING_TYPE);
assertAttributeDescriptor(featureMetacardType, ELEMENT_NAME_2, BasicTypes.INTEGER_TYPE);
assertAttributeDescriptor(featureMetacardType, ELEMENT_NAME_3, BasicTypes.STRING_TYPE);
}
use of org.codice.ddf.spatial.ogc.wfs.catalog.common.FeatureMetacardType in project ddf by codice.
the class FeatureMetacardTypeTest method testfeatureMetacardTypeFindBooleanProperties.
@Test
public void testfeatureMetacardTypeFindBooleanProperties() {
XmlSchema schema = new XmlSchema();
XmlSchemaElement booleanElement = new XmlSchemaElement(schema, true);
booleanElement.setSchemaType(new XmlSchemaSimpleType(schema, false));
booleanElement.setSchemaTypeName(Constants.XSD_BOOLEAN);
booleanElement.setName(ELEMENT_NAME_1);
schema.getElements().put(new QName(ELEMENT_NAME_1), booleanElement);
FeatureMetacardType featureMetacardType = new FeatureMetacardType(schema, FEATURE_TYPE, NON_QUERYABLE_PROPS, Wfs20Constants.GML_3_2_NAMESPACE);
assertAttributeDescriptor(featureMetacardType, ELEMENT_NAME_1, BasicTypes.BOOLEAN_TYPE);
}
Aggregations