Package org.opengis.cite.iso19142.util

# Class AppSchemaUtils

java.lang.Object
org.opengis.cite.iso19142.util.AppSchemaUtils

public class AppSchemaUtils extends Object
Utility methods for accessing and analyzing components of GML application schemas.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AppSchemaUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static List<org.apache.xerces.xs.XSElementDeclaration>`
  `getAllFeatureProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)`
  Produces a list of all properties for a specified feature type.
  `static QName`
  `getBuiltInDatatype(org.apache.xerces.xs.XSElementDeclaration propDecl)`
  Determines the built-in XML Schema datatype from which the given element declaration is derived.
  `static org.apache.xerces.xs.XSElementDeclaration`
  `getComplexPropertyValue(org.apache.xerces.xs.XSElementDeclaration propertyDecl)`
  Returns the expected value of the given (complex) property declaration.
  `static List<org.apache.xerces.xs.XSElementDeclaration>`
  `getFeaturePropertiesByType(org.apache.xerces.xs.XSModel model, QName featureTypeName, org.apache.xerces.xs.XSTypeDefinition typeDef)`
  Produces a list of feature properties where the property value has a type derived from the given (simple or complex) type definition.
  `static List<org.apache.xerces.xs.XSElementDeclaration>`
  `getNillableProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)`
  Produces a list of nillable properties for the specified feature type.
  `static List<org.apache.xerces.xs.XSElementDeclaration>`
  `getRequiredProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)`
  Produces a list of all required properties for a given feature type.
  `static List<org.apache.xerces.xs.XSElementDeclaration>`
  `getSimpleFeatureProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)`
  Produces a list of properties for a specified feature type that have either (a) a simple type definition or (b) a complex type definition with a simple content model.
  `static Set<org.apache.xerces.xs.XSTypeDefinition>`
  `getSimpleTemporalDataTypes(org.apache.xerces.xs.XSModel model)`
  Returns a set of primitive, non-recurring temporal data type definitions, including: xsd:dateTime ("yyyy-MM-dd'T'HH:mm:ssZ") xsd:date ("yyyy-MM-ddZ") xsd:gYearMonth ("yyyy-MM") xsd:gYear ("yyyy")
  `static List<org.apache.xerces.xs.XSElementDeclaration>`
  `getTemporalFeatureProperties(org.apache.xerces.xs.XSModel model, QName featureType)`
  Finds all simple and complex temporal properties defined for a particular feature type.
  `static void`
  `removeDeprecatedGMLElements(List<org.apache.xerces.xs.XSElementDeclaration> elemDecls, org.apache.xerces.xs.XSModel model)`
  Removes deprecated GML feature properties from a given list of element declarations.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AppSchemaUtils

    public AppSchemaUtils()

- ## Method Details

  - ### getFeaturePropertiesByType

    public static List<org.apache.xerces.xs.XSElementDeclaration> getFeaturePropertiesByType(org.apache.xerces.xs.XSModel model, QName featureTypeName, org.apache.xerces.xs.XSTypeDefinition typeDef)
    Produces a list of feature properties where the property value has a type derived from the given (simple or complex) type definition.
    Parameters:
      `model` - An XSModel object representing an application schema.
      `featureTypeName` - A qualified feature type name.
      `typeDef` - A (simple or complex) type definition that characterizes the property value domain.
    Returns:
      A List<XSElementDeclaration> containing matching feature properties; the list may be empty.

  - ### getNillableProperties

    public static List<org.apache.xerces.xs.XSElementDeclaration> getNillableProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)
    Produces a list of nillable properties for the specified feature type. The absence of such a property value is explicitly indicated by setting the attribute xsi:nil="true".
    Parameters:
      `model` - An XSModel object representing an application schema.
      `featureTypeName` - A qualified feature type name.
    Returns:
      A List<XSElementDeclaration> containing elements that may have nil values.

  - ### getAllFeatureProperties

    public static List<org.apache.xerces.xs.XSElementDeclaration> getAllFeatureProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)
    Produces a list of all properties for a specified feature type.
    Parameters:
      `model` - An XSModel object representing an application schema.
      `featureTypeName` - A qualified feature type name.
    Returns:
      A List<XSElementDeclaration> containing one or more element declarations defining feature properties.

  - ### getSimpleFeatureProperties

    public static List<org.apache.xerces.xs.XSElementDeclaration> getSimpleFeatureProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)
    Produces a list of properties for a specified feature type that have either (a) a simple type definition or (b) a complex type definition with a simple content model. The standard GML properties are ignored.
    Parameters:
      `model` - An XSModel object representing an application schema.
      `featureTypeName` - A qualified feature type name.
    Returns:
      A List<XSElementDeclaration> containing one or more element declarations defining properties with a simple content model.

  - ### getRequiredProperties

    public static List<org.apache.xerces.xs.XSElementDeclaration> getRequiredProperties(org.apache.xerces.xs.XSModel model, QName featureTypeName)
    Produces a list of all required properties for a given feature type.
    Parameters:
      `model` - An XSModel object representing an application schema.
      `featureTypeName` - A qualified feature type name.
    Returns:
      A List<XSElementDeclaration> defining zero or more elements which must occur in a valid instance.

  - ### removeDeprecatedGMLElements

    public static void removeDeprecatedGMLElements(List<org.apache.xerces.xs.XSElementDeclaration> elemDecls, org.apache.xerces.xs.XSModel model)
    Removes deprecated GML feature properties from a given list of element declarations. The currently deprecated elements are listed below.
    - gml:metaDataProperty
    - gml:location
    Parameters:
      `elemDecls` - A List of XSElementDeclaration objects.
      `model` - An XSModel object representing a GML application schema.

  - ### getBuiltInDatatype

    public static QName getBuiltInDatatype(org.apache.xerces.xs.XSElementDeclaration propDecl)
    Determines the built-in XML Schema datatype from which the given element declaration is derived. The corresponding type definition may be either a simple type or a complex type with a simple content model.
    Parameters:
      `propDecl` - An element declaration (simple content).
    Returns:
      A QName specifying an XML Schema datatype.

  - ### getSimpleTemporalDataTypes

    public static Set<org.apache.xerces.xs.XSTypeDefinition> getSimpleTemporalDataTypes(org.apache.xerces.xs.XSModel model)
    Returns a set of primitive, non-recurring temporal data type definitions, including:
    - xsd:dateTime ("yyyy-MM-dd'T'HH:mm:ssZ")
    - xsd:date ("yyyy-MM-ddZ")
    - xsd:gYearMonth ("yyyy-MM")
    - xsd:gYear ("yyyy")
    Parameters:
      `model` - An XSModel object representing an application schema.
    Returns:
      A Set of simple type definitions corresponding to temporal data types.

  - ### getComplexPropertyValue

    public static org.apache.xerces.xs.XSElementDeclaration getComplexPropertyValue(org.apache.xerces.xs.XSElementDeclaration propertyDecl)
    Returns the expected value of the given (complex) property declaration.
    Parameters:
      `propertyDecl` - An element declaration for some feature property.
    Returns:
      An element declaration corresponding to the expected child element, or null if the property has a simple content model.

  - ### getTemporalFeatureProperties

    public static List<org.apache.xerces.xs.XSElementDeclaration> getTemporalFeatureProperties(org.apache.xerces.xs.XSModel model, QName featureType)
    Finds all simple and complex temporal properties defined for a particular feature type.
    Parameters:
      `model` - A representation of a GML application schema.
      `featureType` - The qualified name of a feature type.
    Returns:
      A list of element declarations corresponding to properties that have temporal values; it may be empty.