org.apache.ws.jaxme.xs

Interface XSSchema

All Superinterfaces:
XSObject, XSOpenAttrs
Known Subinterfaces:
JAXBSchema
Known Implementing Classes:
JAXBSchemaImpl, XSSchemaImpl

public interface XSSchema
extends XSOpenAttrs

This interface is what you are probably most interested in: The logical XML Schema representation.
Author:
Jochen Wiedmann

Method Summary

void
add(XSAnnotation pAnnotation)
Adds a new annotation to the schema.
void
add(XSAttribute pAttribute)
Adds a new attribute to the schema.
void
add(XSAttributeGroup pGroup)
Adds a new attribute group to the schema.
void
add(XSElement pElement)
Adds a new element to the schema.
void
add(XSGroup pGroup)
Adds a new group to the schema.
void
add(XSIdentityConstraint ic)
Adds a new identity constraint to the schema.
void
add(XSKeyRef rf)
Adds a new key ref to the schema.
void
add(XSNotation pNotation)
Adds a new notation to the schema.
void
add(XSType pType)
Adds a new type to the schema.
XSAnnotation[]
getAnnotations()
Returns the array of annotations.
XSAttribute
getAttribute(XsQName pName)
Returns the attribute with the given name.
XSAttributeGroup
getAttributeGroup(XsQName pName)
Returns the attribute group with the given name.
XSAttributeGroup[]
getAttributeGroups()
Returns the array of global attribute groups.
XSAttribute[]
getAttributes()
Returns the array of global attributes.
XSType[]
getBuiltinTypes()
Returns the array of builtin types.
Object[]
getChilds()
Returns all the schema annotations, types, groups, attribute groups, elements, and attributes, in the order of declaration.
XSContext
getContext()
Returns the schemas context.
XSElement
getElement(XsQName pName)
Returns the element with the given name.
XSElement[]
getElements()
Returns the array of global elements.
XSGroup
getGroup(XsQName pName)
Returns the group with the given name.
XSGroup[]
getGroups()
Returns the array of global groups.
Map
getIdentityConstraints()
Returns a map of XSIdentityConstraint objects.
Map
getKeyRefs()
Returns a map of XSKeyRef objects.
XsAnyURI
getTargetNamespace()
Returns the schemas target namespace.
XSType
getType(XsQName pName)
Returns the type with the given name.
XSType[]
getTypes()
Returns the array of global types.
XSObjectFactory
getXSObjectFactory()
Returns the schemas object factory.
void
redefine(XSAttributeGroup pGroup)
Redefines an existing attribute group in the schema.
void
redefine(XSGroup pGroup)
Redefines an existing group in the schema.
void
redefine(XSType pType)
Redefines an existing type in the schema.

Methods inherited from interface org.apache.ws.jaxme.xs.XSObject

getLocator, getParentObject, getXSSchema, isTopLevelObject, validate

Methods inherited from interface org.apache.ws.jaxme.xs.XSOpenAttrs

getOpenAttributes

Method Details

add

public void add(XSAnnotation pAnnotation)
Adds a new annotation to the schema.

add

public void add(XSAttribute pAttribute)
            throws SAXException
Adds a new attribute to the schema.

add

public void add(XSAttributeGroup pGroup)
            throws SAXException
Adds a new attribute group to the schema.

add

public void add(XSElement pElement)
            throws SAXException
Adds a new element to the schema.

add

public void add(XSGroup pGroup)
            throws SAXException
Adds a new group to the schema.

add

public void add(XSIdentityConstraint ic)
            throws SAXException
Adds a new identity constraint to the schema.

add

public void add(XSKeyRef rf)
            throws SAXException
Adds a new key ref to the schema.

add

public void add(XSNotation pNotation)
            throws SAXException
Adds a new notation to the schema.

add

public void add(XSType pType)
            throws SAXException
Adds a new type to the schema.

getAnnotations

public XSAnnotation[] getAnnotations()
Returns the array of annotations.

getAttribute

public XSAttribute getAttribute(XsQName pName)
Returns the attribute with the given name.

getAttributeGroup

public XSAttributeGroup getAttributeGroup(XsQName pName)
Returns the attribute group with the given name.

getAttributeGroups

public XSAttributeGroup[] getAttributeGroups()
Returns the array of global attribute groups.

getAttributes

public XSAttribute[] getAttributes()
Returns the array of global attributes.

getBuiltinTypes

public XSType[] getBuiltinTypes()
Returns the array of builtin types. This includes simple and complex types.
See Also:
getTypes()

getChilds

public Object[] getChilds()
Returns all the schema annotations, types, groups, attribute groups, elements, and attributes, in the order of declaration.

getContext

public XSContext getContext()
Returns the schemas context.

getElement

public XSElement getElement(XsQName pName)
Returns the element with the given name.

getElements

public XSElement[] getElements()
Returns the array of global elements.

getGroup

public XSGroup getGroup(XsQName pName)
Returns the group with the given name.

getGroups

public XSGroup[] getGroups()
Returns the array of global groups.

getIdentityConstraints

public Map getIdentityConstraints()
Returns a map of XSIdentityConstraint objects. The key is the constraints name. The map is immutable.

getKeyRefs

public Map getKeyRefs()
Returns a map of XSKeyRef objects. The key is the key refs name. The map is immutable.

getTargetNamespace

public XsAnyURI getTargetNamespace()
Returns the schemas target namespace. Note, that a logical schema can combine elements, attributes, groups, and types of various namespaces by importing other syntactical schemas with different namespaces. Thus the logical schemas target namespace is in fact the target namespace of the outermost syntactical schema.
Returns:
Target namespace or null for null (default namespace)

getType

public XSType getType(XsQName pName)
Returns the type with the given name. This may be a builtin type or a type defined by the schema.

getTypes

public XSType[] getTypes()
Returns the array of global types. This includes simple and complex types. The builtin types are not included.

getXSObjectFactory

public XSObjectFactory getXSObjectFactory()
Returns the schemas object factory.

redefine

public void redefine(XSAttributeGroup pGroup)
            throws SAXException
Redefines an existing attribute group in the schema.

redefine

public void redefine(XSGroup pGroup)
            throws SAXException
Redefines an existing group in the schema.

redefine

public void redefine(XSType pType)
            throws SAXException
Redefines an existing type in the schema.