org.gxml.sa
Interface GxMetaBridge<A,S,T>


public interface GxMetaBridge<A,S,T>

A processing context parameterized by atom(s) and type(s).


Method Summary
 void accept(T type, GxMetaVisitor<A,S,T> visitor)
          Implementation of the visitor pattern.
 T ancestorAxis(T type)
          Computes the type resulting from the application of the ancestor axis.
 T ancestorOrSelfAxis(T type)
          Computes the type resulting from the application of the ancestor-or-self axis.
 T atomSet(T type)
          Returns a type denoting fn:data(arg).
 T attributeAxis(T type)
          Computes the type resulting from the application of the attribute axis.
 T attributeType(SmName<S> name, T type)
          Returns a type denoting an attribute of the specified name and type.
 T attributeWild(T type)
           
 T childAxis(T type)
          Computes the type resulting from the application of the child axis.
 T choice(T one, T two)
          Returns a type denoting a choice of two types.
 T commentTest(T arg)
          Applies the comment() test to the argument.
 T commentType()
          Returns a type denoting a single comment node.
 T concat(T lhs, T rhs)
          Returns a type denoting the combined sequence of two types.
 T contentType(T type)
           type contentType(type) DocumentTest ElementTest | SchemaElementTest
 T descendantAxis(T type)
          Computes the type resulting from the application of the descendant axis.
 T descendantOrSelfAxis(T type)
          Computes the type resulting from the application of the descendant-or-self axis.
 T documentType(T contentType)
          Returns a type denoting a single document node with the specified content.
 T elementTest(T arg)
          Applies an element() test to the argument.
 T elementType(SmName<S> name, T type, boolean nillable)
          Returns a type denoting an element of the specified name, type and nillability.
 T elementWild(T type, boolean nillable)
           
 T emptyType()
          Returns a type denoting "empty-sequence()".
 T followingAxis(T type)
          Computes the type resulting from the application of the following axis.
 T followingSiblingAxis(T type)
          Computes the type resulting from the application of the following-sibling axis.
 GxAtomBridge<A,S> getAtomBridge()
          Returns the GxAtomBridge implementation.
 SmAttribute<A,S> getAttributeDeclaration(SmName<S> attributeName)
           
 SmElement<A,S> getElementDeclaration(SmName<S> elementName)
           
 SmName<S> getName(T type)
          Returns the name of the specified type definition.
 GxNameBridge<S> getNameBridge()
          Returns the GxNameBridge implementation.
 T getType(SmNativeType nativeType)
          Returns the specified type definition given a built in type.
 SmType<A,S> getTypeDefinition(SmName<S> typeName)
          Returns the specified type definition.
 T handle(SmSequenceType<A,S> sequenceType)
          Converts the specified type into an opaque handle.
 T interleave(T one, T two)
          Returns a type denoting the interleave of two types.
 T itemType()
          Returns a type denoting a single item.
 void load(java.net.URI schemaLocation, java.io.InputStream istream, java.net.URI systemId, SmExceptionHandler errors, SmMetaLoadArgs args)
          Loads a top-level schema from a byte stream.
 void loadFromNoNamespaceSchemaLocation(java.net.URI baseURI, java.net.URI schemaLocation, SmMetaLoadArgs args)
          Loads schema components into this processing context from the specified schemaLocation.
 void loadFromSchemaLocation(java.net.URI baseURI, java.net.URI namespace, java.net.URI schemaLocation, SmMetaLoadArgs args)
          Loads schema components into this processing context from the specified namespace and schemaLocation.
 T multiply(T argument, GxQuantifier multiplier)
          Multiplies the cardinality of the specified type by a specified cardinality.
 T namespaceAxis(T type)
          Computes the type resulting from the application of the namespace axis.
 T namespaceTest(T arg)
          Applies the namespace() test to the argument.
 T namespaceType()
          Returns a type denoting a single namespace node.
 T nodeTest(T arg)
          Applies the node() test to the argument.
 T nodeType()
          Returns a type denoting a single node.
 T noneType()
          Returns a type denoting an error.
 T oneOrMore(T type)
          Multiply the cardinality of the specified type by optional (+).
 T optional(T type)
          Multiply the cardinality of the specified type by optional (?).
 T parentAxis(T type)
          Computes the type resulting from the application of the parent axis.
 T precedingAxis(T type)
          Computes the type resulting from the application of the preceding axis.
 T precedingSiblingAxis(T type)
          Computes the type resulting from the application of the preceding-sibling axis.
 T prime(T type)
          Extracts all item types from the argument type and combines them into a choice.
 T processingInstructionTest(T arg, java.lang.String name)
          Applies the processing-instruction(name) test to the argument.
 T processingInstructionType(java.lang.String name)
          Returns a type denoting a single processing-instruction node.
 GxQuantifier quantifier(T type)
          Approximates the possible number of items in the argument type.
 boolean sameAs(T one, T two)
           
 T schemaAttribute(SmName<S> attributeName)
          Returns a type denoting "schema-attribute(attributeName)".
 T schemaElement(SmName<S> elementDeclaration)
          Returns a type denoting "schema-element(elementName)".
 T schemaType(SmName<S> typeName)
          Returns a type denoting "schema-type(typeName)".
 T selfAxis(T type)
          Computes the type resulting from the application of the self axis.
 boolean subtype(T lhs, T rhs)
          Determines whether the actual type is a sub-type of the expected type.
 T textTest(T arg)
          Applies the text() test to the argument.
 T textType()
          Returns a type denoting a single text node.
 java.lang.String toString(T type, GxNamespaceResolver<S> mappings, S defaultElementAndTypeNamespace)
          Computes the String representation of the specified type in SequenceType syntax.
 T[] typeArray(int size)
          Allocates an empty array of types.
 T zeroOrMore(T type)
          Multiply the cardinality of the specified type by optional (*).
 

Method Detail

accept

void accept(T type,
            GxMetaVisitor<A,S,T> visitor)
Implementation of the visitor pattern.

Parameters:
type - The type that accepts the visitor.
visitor - The visitor.

ancestorAxis

T ancestorAxis(T type)
Computes the type resulting from the application of the ancestor axis.


ancestorOrSelfAxis

T ancestorOrSelfAxis(T type)
Computes the type resulting from the application of the ancestor-or-self axis.


atomSet

T atomSet(T type)
Returns a type denoting fn:data(arg).

Parameters:
type -

attributeAxis

T attributeAxis(T type)
Computes the type resulting from the application of the attribute axis.


attributeType

T attributeType(SmName<S> name,
                T type)
Returns a type denoting an attribute of the specified name and type.

Parameters:
name - The name of the attribute. A value of null return the empty-sequence type.
type - The type of the attribute. May be null for xs:anySimpleType.

attributeWild

T attributeWild(T type)

childAxis

T childAxis(T type)
Computes the type resulting from the application of the child axis.


choice

T choice(T one,
         T two)
Returns a type denoting a choice of two types.


commentTest

T commentTest(T arg)
Applies the comment() test to the argument.


commentType

T commentType()
Returns a type denoting a single comment node.


concat

T concat(T lhs,
         T rhs)
Returns a type denoting the combined sequence of two types.


contentType

T contentType(T type)
type contentType(type)
DocumentTest ElementTest | SchemaElementTest


descendantAxis

T descendantAxis(T type)
Computes the type resulting from the application of the descendant axis.


descendantOrSelfAxis

T descendantOrSelfAxis(T type)
Computes the type resulting from the application of the descendant-or-self axis.


documentType

T documentType(T contentType)
Returns a type denoting a single document node with the specified content.


elementTest

T elementTest(T arg)
Applies an element() test to the argument.


elementType

T elementType(SmName<S> name,
              T type,
              boolean nillable)
Returns a type denoting an element of the specified name, type and nillability.

Parameters:
name - The name of the element. A value of null return the empty-sequence type.
type - The type of the element. May be null for xs:untyped.
nillable - The nillable flag.

elementWild

T elementWild(T type,
              boolean nillable)

emptyType

T emptyType()
Returns a type denoting "empty-sequence()".


followingAxis

T followingAxis(T type)
Computes the type resulting from the application of the following axis.


followingSiblingAxis

T followingSiblingAxis(T type)
Computes the type resulting from the application of the following-sibling axis.


getAtomBridge

GxAtomBridge<A,S> getAtomBridge()
Returns the GxAtomBridge implementation.


getAttributeDeclaration

SmAttribute<A,S> getAttributeDeclaration(SmName<S> attributeName)

getElementDeclaration

SmElement<A,S> getElementDeclaration(SmName<S> elementName)

getName

SmName<S> getName(T type)
Returns the name of the specified type definition.

Parameters:
type - The type definition.

getNameBridge

GxNameBridge<S> getNameBridge()
Returns the GxNameBridge implementation.


getType

T getType(SmNativeType nativeType)
Returns the specified type definition given a built in type.

Parameters:
nativeType - The built in type definition.

getTypeDefinition

SmType<A,S> getTypeDefinition(SmName<S> typeName)
Returns the specified type definition.

Parameters:
typeName - The name of the type definition.

handle

T handle(SmSequenceType<A,S> sequenceType)
Converts the specified type into an opaque handle.


interleave

T interleave(T one,
             T two)
Returns a type denoting the interleave of two types.


itemType

T itemType()
Returns a type denoting a single item.


load

void load(java.net.URI schemaLocation,
          java.io.InputStream istream,
          java.net.URI systemId,
          SmExceptionHandler errors,
          SmMetaLoadArgs args)
          throws SmAbortException
Loads a top-level schema from a byte stream.

Parameters:
schemaLocation - This parameter depends upon what convention is used to name schema files. It is used to prevent circular references in schemaLocation(s) from causing infinite loops. This location corresponds to the logical URI used by a catalog i.e. a public identifier.
istream - The byte stream to load.
systemId - The full absolute URI of the schema. This may be used as the base-uri of the schema document.
errors - An exception handler.
args - Arguments that configure how the schemas are loaded.
Throws:
SmAbortException - If the loading is aborted. Usually because the user throws an exception from the error handler.

loadFromNoNamespaceSchemaLocation

void loadFromNoNamespaceSchemaLocation(java.net.URI baseURI,
                                       java.net.URI schemaLocation,
                                       SmMetaLoadArgs args)
                                       throws java.io.IOException
Loads schema components into this processing context from the specified schemaLocation.
This is used for loading the xsi:noNamespaceSchemaLocation.

Parameters:
baseURI - The URI of the document containing the schemaLocation hint.
schemaLocation - The location that contains a copy of a schema used to author a document.
args - Arguments that configure how the schemas are loaded.
Throws:
java.io.IOException - if an I/O exception occurs while attempting to read from the specified location.

loadFromSchemaLocation

void loadFromSchemaLocation(java.net.URI baseURI,
                            java.net.URI namespace,
                            java.net.URI schemaLocation,
                            SmMetaLoadArgs args)
                            throws java.io.IOException
Loads schema components into this processing context from the specified namespace and schemaLocation.
This is used for loading the xsi:schemaLocation.

Parameters:
baseURI - The URI of the document containing the schemaLocation hint.
namespace - The namespace containing the schema components.
schemaLocation - The location that contains a copy of a schema used to author a document.
args - Arguments that configure how the schemas are loaded.
Throws:
java.io.IOException - if an I/O exception occurs while attempting to read from the specified location.

multiply

T multiply(T argument,
           GxQuantifier multiplier)
Multiplies the cardinality of the specified type by a specified cardinality.


namespaceAxis

T namespaceAxis(T type)
Computes the type resulting from the application of the namespace axis.


namespaceTest

T namespaceTest(T arg)
Applies the namespace() test to the argument.


namespaceType

T namespaceType()
Returns a type denoting a single namespace node.


nodeTest

T nodeTest(T arg)
Applies the node() test to the argument.


nodeType

T nodeType()
Returns a type denoting a single node.


noneType

T noneType()
Returns a type denoting an error.


oneOrMore

T oneOrMore(T type)
Multiply the cardinality of the specified type by optional (+).


optional

T optional(T type)
Multiply the cardinality of the specified type by optional (?).


parentAxis

T parentAxis(T type)
Computes the type resulting from the application of the parent axis.


precedingAxis

T precedingAxis(T type)
Computes the type resulting from the application of the preceding axis.


precedingSiblingAxis

T precedingSiblingAxis(T type)
Computes the type resulting from the application of the preceding-sibling axis.


prime

T prime(T type)
Extracts all item types from the argument type and combines them into a choice.


processingInstructionTest

T processingInstructionTest(T arg,
                            java.lang.String name)
Applies the processing-instruction(name) test to the argument.


processingInstructionType

T processingInstructionType(java.lang.String name)
Returns a type denoting a single processing-instruction node.


quantifier

GxQuantifier quantifier(T type)
Approximates the possible number of items in the argument type.


sameAs

boolean sameAs(T one,
               T two)

schemaAttribute

T schemaAttribute(SmName<S> attributeName)
Returns a type denoting "schema-attribute(attributeName)".


schemaElement

T schemaElement(SmName<S> elementDeclaration)
Returns a type denoting "schema-element(elementName)".


schemaType

T schemaType(SmName<S> typeName)
Returns a type denoting "schema-type(typeName)".


selfAxis

T selfAxis(T type)
Computes the type resulting from the application of the self axis.


subtype

boolean subtype(T lhs,
                T rhs)
Determines whether the actual type is a sub-type of the expected type.

Parameters:
lhs -
rhs -

textTest

T textTest(T arg)
Applies the text() test to the argument.


textType

T textType()
Returns a type denoting a single text node.


toString

java.lang.String toString(T type,
                          GxNamespaceResolver<S> mappings,
                          S defaultElementAndTypeNamespace)
                          throws GxException
Computes the String representation of the specified type in SequenceType syntax.

Parameters:
type - The type to be serialized.
mappings - A resolver from namespaces to prefixes.
defaultElementAndTypeNamespace - The default namespace for element names.
Throws:
GxException

typeArray

T[] typeArray(int size)
Allocates an empty array of types.

Parameters:
size - The size of the array of types.

zeroOrMore

T zeroOrMore(T type)
Multiply the cardinality of the specified type by optional (*).



Copyright © 2009 TIBCO Software Inc. All Rights Reserved.