|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.feature.Types
public class Types
This is a set of utility methods used when implementing types.
This set of classes captures the all important how does it work questions, particularly with respect to super types.
FIXME: These methods need a Q&A check to confirm correct use of Super TODO: Cannot tell the difference in intent from FeatureTypes
Constructor Summary | |
---|---|
Types()
|
Method Summary | |
---|---|
static org.opengis.feature.type.Name |
degloseName(java.lang.String prefixedName,
org.xml.sax.helpers.NamespaceSupport namespaces)
Takes a prefixed attribute name and returns an Name by looking which namespace
belongs the prefix to in AppSchemaDataAccessDTO.getNamespaces() . |
static org.opengis.feature.type.PropertyDescriptor |
descriptor(org.opengis.feature.type.ComplexType type,
org.opengis.feature.type.Name name)
Returns the first descriptor matching the given name within the given type. |
static org.opengis.feature.type.PropertyDescriptor |
descriptor(org.opengis.feature.type.ComplexType type,
org.opengis.feature.type.Name name,
org.opengis.feature.type.AttributeType actualType)
|
static org.opengis.feature.type.PropertyDescriptor |
descriptor(org.opengis.feature.type.ComplexType type,
java.lang.String name)
Returns the first descriptor matching the given local name within the given type. |
static org.opengis.feature.type.PropertyDescriptor |
descriptor(org.opengis.feature.type.ComplexType type,
java.lang.String name,
org.opengis.feature.type.AttributeType actualType)
Returns the first descriptor matching the given local name within the given type. |
static org.opengis.feature.type.PropertyDescriptor |
descriptor(org.opengis.feature.type.ComplexType type,
java.lang.String name,
java.lang.String namespace)
Returns the first descriptor matching the given name + namespace within the given type. |
static java.util.List |
descriptors(org.opengis.feature.type.ComplexType type,
org.opengis.feature.type.Name name)
Returns the set of descriptors matching the given name. |
static java.util.List |
descriptors(org.opengis.feature.type.ComplexType type,
java.lang.String name)
Returns the set of descriptors matching the given local name within the given type. |
static boolean |
equals(org.opengis.feature.type.Name name,
javax.xml.namespace.QName qName)
|
static java.lang.String[] |
fromNames(org.opengis.feature.type.Name[] attributeNames)
Convenience method for turning an array of qualified names into a list of non qualified names. |
static java.lang.String[] |
fromTypeNames(org.opengis.feature.type.Name[] typeNames)
Convenience method for turning an array of qualified names into a list of non qualified names. |
static boolean |
isSuperType(org.opengis.feature.type.PropertyType type,
org.opengis.feature.type.PropertyType parent)
Determines if parent is a super type of type |
static org.opengis.feature.type.Name[] |
names(org.opengis.feature.type.ComplexType type)
Returns The name of attributes defined in the type. |
static java.lang.Object |
parse(org.opengis.feature.type.AttributeType type,
java.lang.Object content)
Converts content into a format which is used to store it internally within an attribute of a specific type. |
static org.opengis.feature.type.Name |
toName(javax.xml.namespace.QName name)
Deprecated. use #toTypeName(QName |
static org.opengis.feature.type.Name[] |
toNames(java.lang.String[] names)
Creates a set of attribute names from a set of strings. |
static javax.xml.namespace.QName |
toQName(org.opengis.feature.type.Name featurePath)
|
static javax.xml.namespace.QName |
toQName(org.opengis.feature.type.Name featurePath,
org.xml.sax.helpers.NamespaceSupport ns)
|
static org.opengis.feature.type.Name |
toTypeName(javax.xml.namespace.QName name)
|
static org.opengis.feature.type.Name[] |
toTypeNames(java.lang.String[] names)
Creates a set of type names from a set of strings. |
static org.opengis.feature.type.Name |
typeName(org.opengis.feature.type.Name name)
Creates a type name from another name. |
static org.opengis.feature.type.Name |
typeName(java.lang.String name)
Creates a type name from a single non-qualified string. |
static org.opengis.feature.type.Name |
typeName(java.lang.String namespace,
java.lang.String name)
Creates an attribute name from a single non-qualified string. |
static void |
validate(org.opengis.feature.Attribute attribute)
Validates anattribute. |
static void |
validate(org.opengis.feature.Attribute attribute,
java.lang.Object attributeContent)
Validates content against an attribute. |
static void |
validate(org.opengis.feature.type.AttributeType type,
org.opengis.feature.Attribute attribute,
java.lang.Object attributeContent)
|
protected static void |
validate(org.opengis.feature.type.AttributeType type,
org.opengis.feature.Attribute attribute,
java.lang.Object attributeContent,
boolean isSuper)
|
static void |
validate(org.opengis.feature.ComplexAttribute attribute)
|
static void |
validate(org.opengis.feature.ComplexAttribute attribute,
java.util.Collection content)
|
protected static void |
validate(org.opengis.feature.type.ComplexType type,
org.opengis.feature.ComplexAttribute attribute,
java.util.Collection content)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Types()
Method Detail |
---|
public static org.opengis.feature.type.Name[] names(org.opengis.feature.type.ComplexType type)
type
- The type.public static org.opengis.feature.type.Name typeName(java.lang.String name)
name
- The name, may be null
public static org.opengis.feature.type.Name typeName(java.lang.String namespace, java.lang.String name)
name
- The name, may be nullnamespace
- The scope or namespace, may be null.
public static org.opengis.feature.type.Name typeName(org.opengis.feature.type.Name name)
name
- The other name.public static org.opengis.feature.type.Name[] toNames(java.lang.String[] names)
This method returns null if names == null.
The ith name has getLocalPart() == names[i] and getNamespaceURI() == null
public static org.opengis.feature.type.Name[] toTypeNames(java.lang.String[] names)
This method returns null if names == null.
The ith name has getLocalPart() == names[i] and getNamespaceURI() == null
public static java.lang.String[] fromNames(org.opengis.feature.type.Name[] attributeNames)
public static java.lang.String[] fromTypeNames(org.opengis.feature.type.Name[] typeNames)
public static org.opengis.feature.type.PropertyDescriptor descriptor(org.opengis.feature.type.ComplexType type, java.lang.String name)
type
- The type, non null.name
- The name, non null.
public static org.opengis.feature.type.PropertyDescriptor descriptor(org.opengis.feature.type.ComplexType type, java.lang.String name, org.opengis.feature.type.AttributeType actualType)
type
- The type, non null.name
- The name, non null.
public static org.opengis.feature.type.PropertyDescriptor descriptor(org.opengis.feature.type.ComplexType type, org.opengis.feature.type.Name name, org.opengis.feature.type.AttributeType actualType)
public static org.opengis.feature.type.PropertyDescriptor descriptor(org.opengis.feature.type.ComplexType type, java.lang.String name, java.lang.String namespace)
type
- The type, non null.name
- The name, non null.namespace
- The namespace, non null.
public static org.opengis.feature.type.PropertyDescriptor descriptor(org.opengis.feature.type.ComplexType type, org.opengis.feature.type.Name name)
type
- The type, non null.name
- The name, non null.
public static java.util.List descriptors(org.opengis.feature.type.ComplexType type, java.lang.String name)
type
- The type, non null.name
- The name, non null.
public static java.util.List descriptors(org.opengis.feature.type.ComplexType type, org.opengis.feature.type.Name name)
type
- The type, non null.name
- The name, non null.
public static boolean isSuperType(org.opengis.feature.type.PropertyType type, org.opengis.feature.type.PropertyType parent)
parent
is a super type of type
type
- The type in question.parent
- The possible parent type.public static java.lang.Object parse(org.opengis.feature.type.AttributeType type, java.lang.Object content) throws java.lang.IllegalArgumentException
value
- the object to attempt parsing of.
java.lang.IllegalArgumentException
- if parsing is attempted and is unsuccessful.public static void validate(org.opengis.feature.Attribute attribute) throws org.opengis.feature.IllegalAttributeException
Same result as calling:
validate(attribute.type(), attribute)
attribute
- The attribute.
IllegalAttributeException
- In the event that content violates any restrictions specified by the
attribute.
org.opengis.feature.IllegalAttributeException
public static void validate(org.opengis.feature.Attribute attribute, java.lang.Object attributeContent) throws org.opengis.feature.IllegalAttributeException
attribute
- The attribute.attributeContent
- Content of attribute.
IllegalAttributeException
- In the event that content violates any restrictions specified by the
attribute.
org.opengis.feature.IllegalAttributeException
public static void validate(org.opengis.feature.type.AttributeType type, org.opengis.feature.Attribute attribute, java.lang.Object attributeContent) throws org.opengis.feature.IllegalAttributeException
org.opengis.feature.IllegalAttributeException
protected static void validate(org.opengis.feature.type.AttributeType type, org.opengis.feature.Attribute attribute, java.lang.Object attributeContent, boolean isSuper) throws org.opengis.feature.IllegalAttributeException
org.opengis.feature.IllegalAttributeException
public static void validate(org.opengis.feature.ComplexAttribute attribute) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void validate(org.opengis.feature.ComplexAttribute attribute, java.util.Collection content) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
protected static void validate(org.opengis.feature.type.ComplexType type, org.opengis.feature.ComplexAttribute attribute, java.util.Collection content) throws org.opengis.feature.IllegalAttributeException
org.opengis.feature.IllegalAttributeException
public static javax.xml.namespace.QName toQName(org.opengis.feature.type.Name featurePath)
public static javax.xml.namespace.QName toQName(org.opengis.feature.type.Name featurePath, org.xml.sax.helpers.NamespaceSupport ns)
public static org.opengis.feature.type.Name toName(javax.xml.namespace.QName name)
#toTypeName(QName
name
-
public static org.opengis.feature.type.Name toTypeName(javax.xml.namespace.QName name)
public static boolean equals(org.opengis.feature.type.Name name, javax.xml.namespace.QName qName)
public static org.opengis.feature.type.Name degloseName(java.lang.String prefixedName, org.xml.sax.helpers.NamespaceSupport namespaces) throws java.lang.IllegalArgumentException
Name
by looking which namespace
belongs the prefix to in AppSchemaDataAccessDTO.getNamespaces()
.
prefixedName
- , namespaces
java.lang.IllegalArgumentException
- if prefixedName
has no declared namespace in
app-schema config file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |