public class XMLSchemaModelUtils extends Object
| Constructor and Description |
|---|
XMLSchemaModelUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<org.apache.xerces.xs.XSParticle> |
getAllElementParticles(org.apache.xerces.xs.XSParticle particle)
Returns all constituent particles corresponding to element declarations.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getAllElementsInParticle(org.apache.xerces.xs.XSParticle particle)
Returns all element declarations contained in the given particle schema
component.
|
static Set<String> |
getApplicationNamespaces(org.apache.xerces.xs.XSModel model)
Returns a list of application-specific namespace names declared in a
schema.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getCoverageDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of coverage elements in the application
namespace(s).
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getCRSDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of CRS declarations in the application namespace(s).
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getDefinitionDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of definition elements declared in the application
namespace(s), including dictionaries.
|
static Set<org.apache.xerces.xs.XSTypeDefinition> |
getDerivedTypeDefinitions(org.apache.xerces.xs.XSModel model,
org.apache.xerces.xs.XSTypeDefinition baseType,
short derivationMethod)
Returns the set of type definitions that are derived from the given base
type using the specified method.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getElementDeclarationsByType(org.apache.xerces.xs.XSModel model,
org.apache.xerces.xs.XSTypeDefinition baseType)
Returns a list of element declarations (globally and locally scoped)
whose type definition either matches the given base type or derives from
it by extension.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getElementsByAffiliation(org.apache.xerces.xs.XSModel model,
org.apache.xerces.xs.XSElementDeclaration head)
Returns a collection of element declarations that may substitute
(directly or indirectly) for the specified element.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getExplicitGeometryProperties(org.apache.xerces.xs.XSModel model)
Returns a list of geometry properties explicitly declared in an
application namespace.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getFeatureDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of concrete feature element declarations in the
application namespace(s).
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getGeometryDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of concrete geometry element declarations in the
application namespace(s).
|
static Set<org.apache.xerces.xs.XSComplexTypeDefinition> |
getGlobalComplexTypeDefinitions(org.apache.xerces.xs.XSModel model)
Returns a collection of top-level complex types defined in all
application namespaces.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getGlobalElementsByType(org.apache.xerces.xs.XSModel model,
org.apache.xerces.xs.XSTypeDefinition typeDef)
Returns a list of globally-scoped (top-level) element declarations whose
type definition either matches the given type or derives from it by
extension.
|
static void |
getHeadElements(Set<org.apache.xerces.xs.XSElementDeclaration> headElems,
org.apache.xerces.xs.XSElementDeclaration propValue)
Identifies the set of (head) elements for which the given element can
substitute.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getImplicitProperties(org.apache.xerces.xs.XSModel model,
org.apache.xerces.xs.XSElementDeclaration headElem)
Returns a list of implicitly defined GML properties whose expected value
is substitutable for the specified head element.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getLocalElementsByType(org.apache.xerces.xs.XSModel model,
org.apache.xerces.xs.XSTypeDefinition typeDef,
SchemaComponentFilter typeFilter)
Returns a list of locally-scoped element declarations whose type
definition either matches the given type or derives from it by extension.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getObservationDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of observation elements declared in the application
namespace(s).
|
static QName |
getQName(org.apache.xerces.xs.XSObject xsObject)
Gets the name of the given XML Schema component.
|
static Set<org.apache.xerces.xs.XSComplexTypeDefinition> |
getReferencedComplexTypeDefinitions(org.apache.xerces.xs.XSModel model)
Returns a collection of complex type definitions referenced by global
elements declared in all application namespaces.
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getTimeObjectDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of temporal element declarations in the application
namespace(s).
|
static List<org.apache.xerces.xs.XSElementDeclaration> |
getTopologyDeclarations(org.apache.xerces.xs.XSModel model)
Returns a collection of topology element declarations in the application
namespace(s).
|
static boolean |
propertyHasValueDomain(org.apache.xerces.xs.XSComplexTypeDefinition typeDef,
org.apache.xerces.xs.XSElementDeclaration headElem)
Determines whether or not a given complex property type has a specified
value domain.
|
(package private) static void |
removeGmlElementsFromList(List<org.apache.xerces.xs.XSElementDeclaration> elemDecls)
Removes elements declared in the standard GML namespace (
"http://www.opengis.net/gml/3.2"), leaving only
those residing in an application namespace.
|
public static List<org.apache.xerces.xs.XSElementDeclaration> getFeatureDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getGeometryDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getExplicitGeometryProperties(org.apache.xerces.xs.XSModel model)
model - An XSModel object incorporating application schema components.public static List<org.apache.xerces.xs.XSElementDeclaration> getImplicitProperties(org.apache.xerces.xs.XSModel model, org.apache.xerces.xs.XSElementDeclaration headElem)
model - An XSModel object incorporating application schema components.headElem - The head of the substitution group to which the property value
belongs.public static boolean propertyHasValueDomain(org.apache.xerces.xs.XSComplexTypeDefinition typeDef,
org.apache.xerces.xs.XSElementDeclaration headElem)
typeDef - A complex type definition that resembles a GML property type.headElem - The head element indicating the type of the property value(s).public static void getHeadElements(Set<org.apache.xerces.xs.XSElementDeclaration> headElems, org.apache.xerces.xs.XSElementDeclaration propValue)
headElems - The set to be populated with head element declarations. The
set will always contain the given element declaration, which
could serve as a head element itself.propValue - A global element declaration that is presumably affiliated
with some substitution group.public static List<org.apache.xerces.xs.XSElementDeclaration> getTopologyDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getTimeObjectDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getCRSDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getCoverageDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getObservationDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getDefinitionDeclarations(org.apache.xerces.xs.XSModel model)
model - An XSModel object representing the application schema.public static List<org.apache.xerces.xs.XSElementDeclaration> getElementsByAffiliation(org.apache.xerces.xs.XSModel model, org.apache.xerces.xs.XSElementDeclaration head)
model - An XSModel object incorporating application schema components.head - The head of the substitution group.public static List<org.apache.xerces.xs.XSElementDeclaration> getGlobalElementsByType(org.apache.xerces.xs.XSModel model, org.apache.xerces.xs.XSTypeDefinition typeDef)
model - An XSModel object incorporating application schema components.typeDef - A simple or complex type defining the content model of the
desired elements. It may be an ancestor type.public static List<org.apache.xerces.xs.XSElementDeclaration> getLocalElementsByType(org.apache.xerces.xs.XSModel model, org.apache.xerces.xs.XSTypeDefinition typeDef, SchemaComponentFilter typeFilter)
getEnclosingCTDefinition method. The type definitions to be examined may
be restricted using a component filter.model - An XSModel object incorporating application schema components.typeDef - A simple or complex type defining the content model of the
desired elements. It may be an ancestor type.typeFilter - A schema component filter that determines which type
definitions will be examined; if null, all complex
types defined in application namespaces will be inspected.public static List<org.apache.xerces.xs.XSElementDeclaration> getAllElementsInParticle(org.apache.xerces.xs.XSParticle particle)
particle - An XSParticle representing a particle component.public static List<org.apache.xerces.xs.XSParticle> getAllElementParticles(org.apache.xerces.xs.XSParticle particle)
particle - A particle schema component to inspect.public static Set<org.apache.xerces.xs.XSComplexTypeDefinition> getReferencedComplexTypeDefinitions(org.apache.xerces.xs.XSModel model)
model - An XSModel object.public static Set<org.apache.xerces.xs.XSComplexTypeDefinition> getGlobalComplexTypeDefinitions(org.apache.xerces.xs.XSModel model)
model - An XSModel object.public static Set<String> getApplicationNamespaces(org.apache.xerces.xs.XSModel model)
model - An XSModel object incorporating application schema components.public static Set<org.apache.xerces.xs.XSTypeDefinition> getDerivedTypeDefinitions(org.apache.xerces.xs.XSModel model, org.apache.xerces.xs.XSTypeDefinition baseType, short derivationMethod)
model - An XSModel object containing schema components.baseType - The base (ancestor) type.derivationMethod - A bit combination representing a subset of {
DERIVATION_RESTRICTION, DERIVATION_EXTENSION,
DERIVATION_UNION, DERIVATION_LIST }.public static List<org.apache.xerces.xs.XSElementDeclaration> getElementDeclarationsByType(org.apache.xerces.xs.XSModel model, org.apache.xerces.xs.XSTypeDefinition baseType)
model - An XSModel object incorporating application schema components
from one or more namespaces.baseType - A simple or complex type defining the content model of the
desired elements. It may be an ancestor type.public static QName getQName(org.apache.xerces.xs.XSObject xsObject)
xsObject - An XSObject representing a schema component.static void removeGmlElementsFromList(List<org.apache.xerces.xs.XSElementDeclaration> elemDecls)
elemDecls - A List of element declarations.Copyright © 2023 Open Geospatial Consortium. All rights reserved.