public class UniqueNameFeatureTypeImpl extends FeatureTypeImpl
FeatureTypeImpl
that avoids equality tests on feature types with
cyclic definitions by considering features types to be equal if and only if their names are
equal.
Users of this class must not create multiple instances with the same name unless they represent the same type, because other parts of the implementation will assume they are equal, and if they are not, Bad Things Will Happen.
It should be noted that app-schema does not support the multiple definition XSD types with the
same name. This restriction allows multiple XSD elements and thus WFS feature types (with
different names) to have the same XSD type, because the XSD type can be recognised by name even
if it has a cyclic definition. This simplified equality testing allows FeatureTypeCache
to handle these types, despite their cyclic definition preventing a full recursive implementation
of equals(Object)
equals(). Unit test coverage is in GeoServer app-schema-test
DuplicateTypeTest.
GEOT-3354
identified
binding, description, isAbstract, name, restrictions, superType, userData
Constructor and Description |
---|
UniqueNameFeatureTypeImpl(Name name,
Collection<PropertyDescriptor> schema,
GeometryDescriptor defaultGeometry,
boolean isAbstract,
List<Filter> restrictions,
AttributeType superType,
InternationalString description) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Delegates to the type name
Name.equals(Object) . |
int |
hashCode()
Delegates to type name
Name.hashCode() . |
getCoordinateReferenceSystem, getGeometryDescriptor
getBinding, getDescriptor, getDescriptor, getDescriptors, isInline, toString
createDefaultValue, getSuper, isIdentified, parse
getDescription, getName, getRestrictions, getUserData, isAbstract
isIdentified
getBinding, getDescriptor, getDescriptor, getDescriptors, isInline
getSuper
getDescription, getName, getRestrictions, getUserData, isAbstract
public UniqueNameFeatureTypeImpl(Name name, Collection<PropertyDescriptor> schema, GeometryDescriptor defaultGeometry, boolean isAbstract, List<Filter> restrictions, AttributeType superType, InternationalString description)
public int hashCode()
Name.hashCode()
.hashCode
in interface PropertyType
hashCode
in class FeatureTypeImpl
FeatureTypeImpl.hashCode()
public boolean equals(Object other)
Name.equals(Object)
.equals
in interface PropertyType
equals
in class FeatureTypeImpl
other
- the object to be tested for equality.FeatureTypeImpl.equals(java.lang.Object)
Copyright © 1996–2019 Geotools. All rights reserved.