org.deegree.feature.types.property
Class AbstractPropertyType

java.lang.Object
  extended by org.deegree.feature.types.property.AbstractPropertyType
All Implemented Interfaces:
PropertyType
Direct Known Subclasses:
ArrayPropertyType, CodePropertyType, CustomPropertyType, EnvelopePropertyType, MeasurePropertyType, ObjectPropertyType, SimplePropertyType, StringOrRefPropertyType

public abstract class AbstractPropertyType
extends Object
implements PropertyType

Abstract base class for PropertyTypes that defines common fields and methods.

Common to all AbstractPropertyTypes are the following:

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Field Summary
protected  int maxOccurs
          The maximum number of times that this property must be present, or -1 (=unbounded).
protected  int minOccurs
          The minimum number of times that this property must be present.
protected  QName name
          The name of the property.
protected  PropertyType[] substitutions
          The possible substitutions (including this PropertyType), never null and always at least one entry.
 
Constructor Summary
protected AbstractPropertyType(QName name, int minOccurs, int maxOccurs, org.apache.xerces.xs.XSElementDeclaration elDecl, List<PropertyType> substitutions)
          Creates a new AbstractPropertyType instance.
 
Method Summary
 org.apache.xerces.xs.XSElementDeclaration getElementDecl()
          Returns the XML schema element declaration for this property type.
 int getMaxOccurs()
          Specifies the maximum number of times that this property must be present in a feature instance.
 int getMinOccurs()
          Specifies the minimum number of times that this property must be present in a feature instance.
 QName getName()
          Returns the name of the property.
 PropertyType[] getSubstitutions()
          Returns the possible substitutions that are defined for this PropertyType.
 boolean isAbstract()
          Returns whether this PropertyType declaration is abstract.
 boolean isNillable()
          Returns whether this PropertyType declaration allows for setting the xsi:nil="true" attribute in a GML representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final QName name
The name of the property.


minOccurs

protected final int minOccurs
The minimum number of times that this property must be present.


maxOccurs

protected final int maxOccurs
The maximum number of times that this property must be present, or -1 (=unbounded).


substitutions

protected final PropertyType[] substitutions
The possible substitutions (including this PropertyType), never null and always at least one entry.

Constructor Detail

AbstractPropertyType

protected AbstractPropertyType(QName name,
                               int minOccurs,
                               int maxOccurs,
                               org.apache.xerces.xs.XSElementDeclaration elDecl,
                               List<PropertyType> substitutions)
Creates a new AbstractPropertyType instance.

Parameters:
name - name of the property
minOccurs - minimum number of times that this property must be present
maxOccurs - maximum number of times that this property must be present, or -1 (=unbounded)
elDecls - corresponding XML schema element declaration, can be null
substitutions - the possible concrete substitutions, can be null
Method Detail

getName

public QName getName()
Description copied from interface: PropertyType
Returns the name of the property.

Specified by:
getName in interface PropertyType
Returns:
the name of the property

getMinOccurs

public int getMinOccurs()
Description copied from interface: PropertyType
Specifies the minimum number of times that this property must be present in a feature instance.

Specified by:
getMinOccurs in interface PropertyType
Returns:
the minimum number of times that this property must be present

getMaxOccurs

public int getMaxOccurs()
Description copied from interface: PropertyType
Specifies the maximum number of times that this property must be present in a feature instance.

Specified by:
getMaxOccurs in interface PropertyType
Returns:
the maximum number of times that this property must be present, or -1 (=unbounded)

isAbstract

public boolean isAbstract()
Description copied from interface: PropertyType
Returns whether this PropertyType declaration is abstract.

Specified by:
isAbstract in interface PropertyType
Returns:
true, if it is abstract, false otherwise

getSubstitutions

public PropertyType[] getSubstitutions()
Description copied from interface: PropertyType
Returns the possible substitutions that are defined for this PropertyType. NOTE: This is needed for a number of GML application schemas (e.g. CityGML) that define properties using abstract element declarations and provide multiple concrete substitutable elements.

Specified by:
getSubstitutions in interface PropertyType
Returns:
the possible substitutions (including this PropertyType), never null and always at least one entry

isNillable

public boolean isNillable()
Description copied from interface: PropertyType
Returns whether this PropertyType declaration allows for setting the xsi:nil="true" attribute in a GML representation.

Specified by:
isNillable in interface PropertyType
Returns:
true, if code>xsi:nil="true" is permitted, false otherwise

getElementDecl

public org.apache.xerces.xs.XSElementDeclaration getElementDecl()
Description copied from interface: PropertyType
Returns the XML schema element declaration for this property type.

Specified by:
getElementDecl in interface PropertyType
Returns:
element declaration, or null (if the property type was not generated from XML schema)


Copyright © 2011. All Rights Reserved.