Refine search
private static AttributeType build_TIMEPOSITIONUNION_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "TimePositionUnion"), java.lang.Object.class, false, false, Collections.<Filter>emptyList(), XSSchema.ANYSIMPLETYPE_TYPE, null); return builtType; }
public ComplexAttribute testAnyTypeTest(QName typeName, String classValue) { Name myType = new NameImpl(typeName.getNamespaceURI(), typeName.getLocalPart()); List<Property> properties = new ArrayList<Property>(); List<PropertyDescriptor> propertyDescriptors = new ArrayList<PropertyDescriptor>(); // assume attributes from same namespace as typename Name attName = new NameImpl(typeName.getNamespaceURI(), "class"); // Name name, Class<?> binding, boolean isAbstract, List<Filter> restrictions, // PropertyType superType, InternationalString description AttributeType p = new AttributeTypeImpl(attName, String.class, false, false, null, null, null); AttributeDescriptor pd = new AttributeDescriptorImpl(p, attName, 0, 0, false, null); propertyDescriptors.add(pd); properties.add(new AttributeImpl(classValue, pd, null)); ComplexTypeImpl at = new ComplexTypeImpl( myType, propertyDescriptors, false, false, Collections.EMPTY_LIST, null, null); AttributeDescriptorImpl ai = new AttributeDescriptorImpl(at, myType, 0, 0, false, null); return new ComplexAttributeImpl(properties, ai, null); }
private static AttributeType build_TIMEUNITTYPE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "TimeUnitType"), java.lang.Object.class, false, false, Collections.<Filter>emptyList(), XSSchema.ANYSIMPLETYPE_TYPE, null); return builtType; }
public ComplexAttribute createUnrestrictedAttr(QName typeName, String contents) { Name unrestrictedType = new NameImpl(typeName.getNamespaceURI(), typeName.getLocalPart()); Name attName = new NameImpl(null, "simpleContent"); AttributeType p = new AttributeTypeImpl(attName, String.class, false, false, null, null, null); AttributeDescriptor pd = new AttributeDescriptorImpl(p, attName, 0, 0, true, null);
private static AttributeType build__ISSPHERE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "_isSphere"), java.lang.Object.class, false, false, Collections.<Filter>emptyList(), XSSchema.STRING_TYPE, null); return builtType; }
private AttributeDescriptor override(AttributeDescriptor type, AttributeDescriptor override) { int max = override.getMaxOccurs(); if (max < 0) max = type.getMinOccurs(); int min = override.getMinOccurs(); if (min < 0) min = type.getMinOccurs(); String name = override.getLocalName(); if (name == null) name = type.getLocalName(); List restrictions = override(type.getType().getRestrictions(), override.getType().getRestrictions()); Class javaType = override.getType().getBinding(); if (javaType == null) javaType = type.getType().getBinding(); boolean isNilable = override.isNillable(); Object defaultValue = override.getDefaultValue(); if (defaultValue == null) defaultValue = type.getDefaultValue(); // WARNING cannot copy metadata! return new AttributeDescriptorImpl( new AttributeTypeImpl( new NameImpl(name), javaType, false, false, restrictions, null, null), new NameImpl(name), min, max, isNilable, defaultValue); }
private static AttributeType build_LINEARRINGPROPERTYTYPE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "LinearRingPropertyType"), org.locationtech.jts.geom.LinearRing.class, false, false, Collections.<Filter>emptyList(), XSSchema.ANYTYPE_TYPE, null); return builtType; }
public ComplexAttribute gmlCodeType(QName typeName, String value, String codeSpace) { Name myType = new NameImpl(typeName.getNamespaceURI(), typeName.getLocalPart()); Name attName = new NameImpl("codeSpace"); new AttributeTypeImpl(attName, String.class, false, false, null, null, null); AttributeDescriptor pd = new AttributeDescriptorImpl(p, attName, 0, 0, false, null); new AttributeTypeImpl( new NameImpl("simpleContent"), String.class, false,
private static AttributeType build_MULTIPOINTTYPE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "MultiPointType"), org.locationtech.jts.geom.MultiPoint.class, false, false, Collections.<Filter>emptyList(), ABSTRACTGEOMETRICAGGREGATETYPE_TYPE, null); return builtType; }
public ComplexAttribute gmlMeasureType(QName typeName, String value, String uom) { Name myType = new NameImpl(typeName.getNamespaceURI(), typeName.getLocalPart()); Name attName = new NameImpl("uom"); new AttributeTypeImpl(attName, String.class, false, false, null, null, null); AttributeDescriptor pd = new AttributeDescriptorImpl(p, attName, 0, 0, false, null); new AttributeTypeImpl( new NameImpl("simpleContent"), String.class, false,
private static AttributeType build_SURFACEPROPERTYTYPE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "SurfacePropertyType"), org.locationtech.jts.geom.Polygon.class, false, false, Collections.<Filter>emptyList(), XSSchema.ANYTYPE_TYPE, null); return builtType; }
/** * Make sure no xlink:href is created if id is not set. * * @throws Exception */ public void testXlinkHrefNull() throws Exception { AttributeType attType = new AttributeTypeImpl( new NameImpl("someAttributeType"), String.class, false, false, null, null, null); AttributeImpl node = new AttributeImpl(null, attType, null); ReferenceTypeBinding binding = new ReferenceTypeBinding(); Object xlink = binding.getProperty(node, XLINK.HREF); assertNull(xlink); }
private static AttributeType build_MULTILINESTRINGPROPERTYTYPE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "MultiLineStringPropertyType"), org.locationtech.jts.geom.MultiLineString.class, false, false, Collections.<Filter>emptyList(), XSSchema.ANYTYPE_TYPE, null); return builtType; }
/** * Test xlink:href returns gml:id. * * @throws Exception */ public void testXlinkHref() throws Exception { AttributeType attType = new AttributeTypeImpl( new NameImpl("someAttributeType"), String.class, false, false, null, null, null); AttributeImpl node = new AttributeImpl(null, attType, null); final String ID = "something"; node.getUserData().put("gml:id", ID); ReferenceTypeBinding binding = new ReferenceTypeBinding(); Object xlink = binding.getProperty(node, XLINK.HREF); assertNotNull(xlink); assertEquals("#" + ID, xlink.toString()); } }
private static AttributeType build_SIGNTYPE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "SignType"), java.lang.Object.class, false, false, Collections.<Filter>emptyList(), XSSchema.STRING_TYPE, null); return builtType; }
public static FeatureType createFeatureType() { FeatureTypeFactory tfac = new UniqueNameFeatureTypeFactoryImpl(); Name fName = new NameImpl(EG, "complexFeatureType"); new AttributeTypeImpl( SIMPLE_ATTRIBUTE, String.class, new AttributeTypeImpl( SINGLE_LEAF_ATTRIBUTE, String.class, new AttributeTypeImpl( MULTI_LEAF_ATTRIBUTE, String.class,
private static AttributeType build_KNOTTYPESTYPE_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "KnotTypesType"), java.lang.Object.class, false, false, Collections.<Filter>emptyList(), XSSchema.STRING_TYPE, null); return builtType; }
public void testAddMandatoryProperties() { AttributeType at = new AttributeTypeImpl( new NameImpl("String"), String.class, false, new AttributeDescriptorImpl(at, new NameImpl("att1"), 0, 1, false, null); AttributeDescriptor descr2 = new AttributeDescriptorImpl(at, new NameImpl("att2"), 0, 1, false, null);
private static AttributeType build_NAMELIST_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "NameList"), java.lang.Object.class, false, false, Collections.<Filter>emptyList(), XSSchema.ANYSIMPLETYPE_TYPE, null); return builtType; }
private static AttributeType build_NCNAMELIST_TYPE() { AttributeType builtType; builtType = new AttributeTypeImpl( new NameImpl("http://www.opengis.net/gml", "NCNameList"), java.lang.Object.class, false, false, Collections.<Filter>emptyList(), XSSchema.ANYSIMPLETYPE_TYPE, null); return builtType; }