com.pega.pegarules.pub.services.xsd
Interface XSDComponentBuilder


public interface XSDComponentBuilder

Utility methods for constructing XML Schema component objects from a given WSDL or XML Schema input document

Version:
$Revision: 3677 $ $Date: 2010-03-05 13:27:46 -0500 (Fri, 05 Mar 2010) $
Author:
Peter Tandara-Kuhns

Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String VERSION
           
 
Method Summary
 boolean elementHasComplexType(javax.xml.namespace.QName aElemRef)
          Check if a particular element has a reference to a named complex type definition, or a local in-line complex type definition.
 java.util.List getAbstractElementQNames()
          Get a list of qualified names for all global element declarations that have the 'abstract' attribute set with a value of "true".
 java.util.List getAbstractTypeQNames()
          Get a list of qualified names for all global attribute declarations that have the 'abstract' attribute set with a value of "true".
 XSDAttributeGroupDefinition getAttributeGroupDefinition(javax.xml.namespace.QName aGroupRef)
          Get the attribute group definition component object associated with the given qualified name.
 java.util.List getAttributeGroupNames(java.lang.String aNamespaceURI)
          Get a list of names for all global attribute group definitions that belong to the given namespace URI.
 java.util.List getAttributeGroupQNames()
          Get a list of qualified names for all global attribute group definitions in all referenced schema documents.
 java.util.List getComplexTypeNames(java.lang.String aNamespaceURI)
          Get a list of names for all global complex type definitions that belong to the given namespace URI.
 java.util.List getComplexTypeQNames()
          Get a list of qualified names for all global complex type definitions in all referenced schema documents.
 java.util.List getDefinedNamespaceURIs()
          Get a list of namespace URI's that the referenced WSDL or XML Schema documents define.
 java.lang.String getDocumentSummary()
          Get a summary of all documents that were loaded as a result of document 'import' or 'include' references in the root document or any of the other referenced documents.
 XSDAttributeDeclaration getGlobalAttributeDeclaration(javax.xml.namespace.QName aAttrRef)
          Get the attribute declaration component object associated with the given qualified name.
 java.util.List getGlobalAttributeNames(java.lang.String aNamespaceURI)
          Get a list of names for all global attribute declarations that belong to the given namespace URI.
 java.util.List getGlobalAttributeQNames()
          Get a list of qualified names for all global attribute declarations in all referenced schema documents.
 XSDElementDeclaration getGlobalElementDeclaration(javax.xml.namespace.QName aElemRef)
          Get the element declaration component object associated with the given qualified name.
 java.util.List getGlobalElementNames(java.lang.String aNamespaceURI)
          Get a list of names for all global element declarations that belong to the given namespace URI.
 java.util.List getGlobalElementQNames()
          Get a list of qualified names for all global element declarations in all referenced schema documents.
 java.util.List getModelGroupNames(java.lang.String aNamespaceURI)
          Get a list of names for all global model group definitions that belong to the given namespace URI.
 java.util.List getModelGroupQNames()
          Get a list of qualified names for all global model group definitions in all referenced schema documents.
 XSDComplexTypeDefinition getNamedComplexTypeDefinition(javax.xml.namespace.QName aTypeRef)
          Get the complex type definition component object associated with the given qualified name.
 XSDModelGroupDefinition getNamedModelGroupDefinition(javax.xml.namespace.QName aGroupRef)
          Get the model group definition component object associated with the given qualified name.
 XSDSimpleTypeDefinition getNamedSimpleTypeDefinition(javax.xml.namespace.QName aTypeRef)
          Get the simple type definition component object associated with the given qualified name.
 java.util.List getParseWarnings()
          Get a list of all non-fatal warning messages that occurred while parsing any of the referenced documents or traversing their content.
 java.util.List getReferencedDocumentLocations()
          Get a list of absolute URL or PRFile paths for all documents that were loaded as a result of document 'import' or 'include' references in the root document or any of the other referenced documents.
 XSDComponentList getSchemaDocuments(java.lang.String aNamespaceURI)
          Get the list of schema document component objects associated with the given namespace URI.
 java.util.List getSimpleTypeNames(java.lang.String aNamespaceURI)
          Get a list of names for all global simple type definitions that belong to the given namespace URI.
 java.util.List getSimpleTypeQNames()
          Get a list of qualified names for all global simple type definitions in all referenced schema documents.
 java.util.List getSubstituteElementQNames(javax.xml.namespace.QName aElemRef)
          Get a list of qualified names for all named complex type definitions that use the 'substitutionGroup' attribute to declare membership in a substitution group hierarchy.
 java.util.List getSubstituteTypeQNames(javax.xml.namespace.QName aTypeRef)
          Get a list of qualified names for all named complex type definitions that use type extension or restriction to create a type hierarchy.
 java.lang.String getTargetNamespaceValue()
          Return the value of the 'targetNamespace' attribute of the root document element.
 boolean hasSubstituteTypes()
          Check if there are any substitution types defined on any type name.
 boolean isAttributeDeclared(javax.xml.namespace.QName aAttrRef)
          Check if a particular attribute has been declared in any of the referenced schema documents.
 boolean isAttributeGroupDefined(javax.xml.namespace.QName aGroupRef)
          Check if a particular attribute group has been defined in any of the referenced schema documents.
 boolean isComplexTypeDefined(javax.xml.namespace.QName aTypeRef)
          Check if a particular complex type has been defined in any of the referenced schema documents.
 boolean isElementDeclared(javax.xml.namespace.QName aElemRef)
          Check if a particular element has been declared in any of the referenced schema documents.
 boolean isModelGroupDefined(javax.xml.namespace.QName aGroupRef)
          Check if a particular model group has been defined in any of the referenced schema documents.
 boolean isNamespaceDefined(java.lang.String aNamespaceURI)
          Check if a given namespace URI is defined by one or more of the referenced WSDL or XML Schema documents.
 boolean isSimpleTypeDefined(javax.xml.namespace.QName aTypeRef)
          Check if a particular simple type has been defined in any of the referenced schema documents.
 void loadAllReferencedDocuments()
          Load all documents associated with the URL or PRFile that was used to initialize the component builder.
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
Method Detail

getTargetNamespaceValue

java.lang.String getTargetNamespaceValue()
                                         throws PRException
Return the value of the 'targetNamespace' attribute of the root document element.

Returns:
the targetNamespace value, or the empty string if the attribute is missing
Throws:
PRException - when a fatal parse error occurs

loadAllReferencedDocuments

void loadAllReferencedDocuments()
                                throws PRException
Load all documents associated with the URL or PRFile that was used to initialize the component builder. Multiple documents may be loaded as a result of document 'import' or 'include' references in the root document or any of the other referenced documents. This step is not strictly required, but can be used to identify document dependencies, or detect any invalid document references.

Throws:
PRException - when a fatal parse error occurs

getDocumentSummary

java.lang.String getDocumentSummary()
                                    throws PRException
Get a summary of all documents that were loaded as a result of document 'import' or 'include' references in the root document or any of the other referenced documents.

Returns:
the document summary as a string
Throws:
PRException - when a fatal parse error occurs

getReferencedDocumentLocations

java.util.List getReferencedDocumentLocations()
                                              throws PRException
Get a list of absolute URL or PRFile paths for all documents that were loaded as a result of document 'import' or 'include' references in the root document or any of the other referenced documents.

Returns:
the list of location string values
Throws:
PRException - when a fatal parse error occurs

getDefinedNamespaceURIs

java.util.List getDefinedNamespaceURIs()
                                       throws PRException
Get a list of namespace URI's that the referenced WSDL or XML Schema documents define. Namespaces are defined by declaring a 'targetNamespace' attribute value. If the root document does not contain a 'targetNamespace' attribute, the resulting list will contain the empty string.

Returns:
the list of namespace URI string values
Throws:
PRException - when a fatal parse error occurs

isNamespaceDefined

boolean isNamespaceDefined(java.lang.String aNamespaceURI)
                           throws PRException
Check if a given namespace URI is defined by one or more of the referenced WSDL or XML Schema documents.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
true if the namespace is defined, false otherwise
Throws:
PRException - when a fatal parse error occurs

getGlobalElementQNames

java.util.List getGlobalElementQNames()
                                      throws PRException
Get a list of qualified names for all global element declarations in all referenced schema documents.

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getGlobalAttributeQNames

java.util.List getGlobalAttributeQNames()
                                        throws PRException
Get a list of qualified names for all global attribute declarations in all referenced schema documents.

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getComplexTypeQNames

java.util.List getComplexTypeQNames()
                                    throws PRException
Get a list of qualified names for all global complex type definitions in all referenced schema documents.

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getSimpleTypeQNames

java.util.List getSimpleTypeQNames()
                                   throws PRException
Get a list of qualified names for all global simple type definitions in all referenced schema documents.

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getModelGroupQNames

java.util.List getModelGroupQNames()
                                   throws PRException
Get a list of qualified names for all global model group definitions in all referenced schema documents.

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getAttributeGroupQNames

java.util.List getAttributeGroupQNames()
                                       throws PRException
Get a list of qualified names for all global attribute group definitions in all referenced schema documents.

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getGlobalElementNames

java.util.List getGlobalElementNames(java.lang.String aNamespaceURI)
                                     throws PRException
Get a list of names for all global element declarations that belong to the given namespace URI.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
a list of string values
Throws:
PRException - when a fatal parse error occurs

getGlobalAttributeNames

java.util.List getGlobalAttributeNames(java.lang.String aNamespaceURI)
                                       throws PRException
Get a list of names for all global attribute declarations that belong to the given namespace URI.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
a list of string values
Throws:
PRException - when a fatal parse error occurs

getComplexTypeNames

java.util.List getComplexTypeNames(java.lang.String aNamespaceURI)
                                   throws PRException
Get a list of names for all global complex type definitions that belong to the given namespace URI.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
a list of string values
Throws:
PRException - when a fatal parse error occurs

getSimpleTypeNames

java.util.List getSimpleTypeNames(java.lang.String aNamespaceURI)
                                  throws PRException
Get a list of names for all global simple type definitions that belong to the given namespace URI.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
a list of string values
Throws:
PRException - when a fatal parse error occurs

getModelGroupNames

java.util.List getModelGroupNames(java.lang.String aNamespaceURI)
                                  throws PRException
Get a list of names for all global model group definitions that belong to the given namespace URI.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
a list of string values
Throws:
PRException - when a fatal parse error occurs

getAttributeGroupNames

java.util.List getAttributeGroupNames(java.lang.String aNamespaceURI)
                                      throws PRException
Get a list of names for all global attribute group definitions that belong to the given namespace URI.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
a list of string values
Throws:
PRException - when a fatal parse error occurs

isElementDeclared

boolean isElementDeclared(javax.xml.namespace.QName aElemRef)
                          throws PRException
Check if a particular element has been declared in any of the referenced schema documents.

Parameters:
aElemRef - the qualified name of the global element declaration
Returns:
true if the element is declared, false otherwise
Throws:
PRException - when a fatal parse error occurs

isAttributeDeclared

boolean isAttributeDeclared(javax.xml.namespace.QName aAttrRef)
                            throws PRException
Check if a particular attribute has been declared in any of the referenced schema documents.

Parameters:
aAttrRef - the qualified name of the global attribute declaration
Returns:
true if the attribute is declared, false otherwise
Throws:
PRException - when a fatal parse error occurs

isComplexTypeDefined

boolean isComplexTypeDefined(javax.xml.namespace.QName aTypeRef)
                             throws PRException
Check if a particular complex type has been defined in any of the referenced schema documents.

Parameters:
aTypeRef - the qualified name of the complex type definition
Returns:
true if the attribute is declared, false otherwise
Throws:
PRException - when a fatal parse error occurs

isSimpleTypeDefined

boolean isSimpleTypeDefined(javax.xml.namespace.QName aTypeRef)
                            throws PRException
Check if a particular simple type has been defined in any of the referenced schema documents.

Parameters:
aTypeRef - the qualified name of the simple type definition
Returns:
true if the attribute is declared, false otherwise
Throws:
PRException - when a fatal parse error occurs

isModelGroupDefined

boolean isModelGroupDefined(javax.xml.namespace.QName aGroupRef)
                            throws PRException
Check if a particular model group has been defined in any of the referenced schema documents.

Parameters:
aGroupRef - the qualified name of the model group definition
Returns:
true if the attribute is declared, false otherwise
Throws:
PRException - when a fatal parse error occurs

isAttributeGroupDefined

boolean isAttributeGroupDefined(javax.xml.namespace.QName aGroupRef)
                                throws PRException
Check if a particular attribute group has been defined in any of the referenced schema documents.

Parameters:
aGroupRef - the qualified name of the attribute group definition
Returns:
true if the attribute is declared, false otherwise
Throws:
PRException - when a fatal parse error occurs

elementHasComplexType

boolean elementHasComplexType(javax.xml.namespace.QName aElemRef)
                              throws PRException
Check if a particular element has a reference to a named complex type definition, or a local in-line complex type definition. Use this method to determine if the referenced element is complex without building the entire in-memory data structure for the element.

Parameters:
aElemRef - the qualified name of the global element declaration
Returns:
true if the element has a complex type definition, false otherwise
Throws:
PRException - when a fatal parse error occurs

getAbstractElementQNames

java.util.List getAbstractElementQNames()
                                        throws PRException
Get a list of qualified names for all global element declarations that have the 'abstract' attribute set with a value of "true".

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getAbstractTypeQNames

java.util.List getAbstractTypeQNames()
                                     throws PRException
Get a list of qualified names for all global attribute declarations that have the 'abstract' attribute set with a value of "true".

Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getSubstituteElementQNames

java.util.List getSubstituteElementQNames(javax.xml.namespace.QName aElemRef)
                                          throws PRException
Get a list of qualified names for all named complex type definitions that use the 'substitutionGroup' attribute to declare membership in a substitution group hierarchy. The resulting list contains the qualified names of all elements that are valid runtime substitutes for the given qualified element name.

Parameters:
aElemRef - the qualified name of the substitutable element
Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

getSubstituteTypeQNames

java.util.List getSubstituteTypeQNames(javax.xml.namespace.QName aTypeRef)
                                       throws PRException
Get a list of qualified names for all named complex type definitions that use type extension or restriction to create a type hierarchy. The resulting list contains the qualified names of all complex types that are valid runtime substitutes for the given qualified type name. NOTE: The type of an element in an XML instance can be overridden through the use of the 'xsi:type' attribute.

Parameters:
aTypeRef - the qualified name of the substitutable complex type
Returns:
a list of javax.xml.namespace.QName values
Throws:
PRException - when a fatal parse error occurs

hasSubstituteTypes

boolean hasSubstituteTypes()
                           throws PRException
Check if there are any substitution types defined on any type name.

Returns:
true if substitutes exist; return false if no substitutes exist
Throws:
PRException - when a fatal parse error occurs

getSchemaDocuments

XSDComponentList getSchemaDocuments(java.lang.String aNamespaceURI)
                                    throws PRException
Get the list of schema document component objects associated with the given namespace URI. List elements are of type XSDSchemaDocument.

Parameters:
aNamespaceURI - the namespace URI value to look up
Returns:
a list of XSD schema document component object values
Throws:
PRException - when a fatal parse error occurs

getGlobalElementDeclaration

XSDElementDeclaration getGlobalElementDeclaration(javax.xml.namespace.QName aElemRef)
                                                  throws PRException
Get the element declaration component object associated with the given qualified name.

Parameters:
aElemRef - the qualified name of the global element declaration
Returns:
the XSD component object
Throws:
PRException - for an invalid QName or when a fatal parse error occurs

getGlobalAttributeDeclaration

XSDAttributeDeclaration getGlobalAttributeDeclaration(javax.xml.namespace.QName aAttrRef)
                                                      throws PRException
Get the attribute declaration component object associated with the given qualified name.

Parameters:
aAttrRef - the qualified name of the global attribute declaration
Returns:
the XSD component object
Throws:
PRException - for an invalid QName or when a fatal parse error occurs

getNamedComplexTypeDefinition

XSDComplexTypeDefinition getNamedComplexTypeDefinition(javax.xml.namespace.QName aTypeRef)
                                                       throws PRException
Get the complex type definition component object associated with the given qualified name.

Parameters:
aTypeRef - the qualified name of the complex type definition
Returns:
the XSD component object
Throws:
PRException - for an invalid QName or when a fatal parse error occurs

getNamedSimpleTypeDefinition

XSDSimpleTypeDefinition getNamedSimpleTypeDefinition(javax.xml.namespace.QName aTypeRef)
                                                     throws PRException
Get the simple type definition component object associated with the given qualified name.

Parameters:
aTypeRef - the qualified name of the simple type definition
Returns:
the XSD component object
Throws:
PRException - for an invalid QName or when a fatal parse error occurs

getNamedModelGroupDefinition

XSDModelGroupDefinition getNamedModelGroupDefinition(javax.xml.namespace.QName aGroupRef)
                                                     throws PRException
Get the model group definition component object associated with the given qualified name.

Parameters:
aGroupRef - the qualified name of the model group definition
Returns:
the XSD component object
Throws:
PRException - for an invalid QName or when a fatal parse error occurs

getAttributeGroupDefinition

XSDAttributeGroupDefinition getAttributeGroupDefinition(javax.xml.namespace.QName aGroupRef)
                                                        throws PRException
Get the attribute group definition component object associated with the given qualified name.

Parameters:
aGroupRef - the qualified name of the attribute group definition
Returns:
the XSD component object
Throws:
PRException - for an invalid QName or when a fatal parse error occurs

getParseWarnings

java.util.List getParseWarnings()
Get a list of all non-fatal warning messages that occurred while parsing any of the referenced documents or traversing their content.

Returns:
a list of warning message string values


Copyright © 2012 Pegasystems Inc. All Rights Reserved.