org.jboss.xb.binding.sunday.unmarshalling
Class SchemaBinding

java.lang.Object
  extended by org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding

public class SchemaBinding
extends Object

A SchemaBinding is a collection of binding objects (TypeBinding, ChoiceBinding, ElementBinding, ModelGroupBinding, SequenceBinding, WildcardBinding) for a single namespace keyed by the QNames of the schema components.

Version:
$Revision: 2913 $
Author:
Alexey Loubyansky

Constructor Summary
SchemaBinding()
           
 
Method Summary
 void addElement(ElementBinding element)
           
 ElementBinding addElement(QName name, TypeBinding type)
           
 void addGroup(QName name, ModelGroupBinding group)
           
 void addPrefixMapping(String prefix, String ns)
           
 void addType(TypeBinding type)
           
 ElementBinding getElement(QName name)
           
 ParticleBinding getElementParticle(QName name)
           
 Iterator<ParticleBinding> getElementParticles()
           
 Iterator<ElementBinding> getElements()
           
 ModelGroupBinding getGroup(QName name)
           
 Iterator<ModelGroupBinding> getGroups()
           
 String getNamespace(String prefix)
           
 Set<String> getNamespaces()
          Get the namespaces.
 PackageMetaData getPackageMetaData()
           
 SchemaBindingResolver getSchemaResolver()
           
 String getSimpleContentProperty()
           
 TypeBinding getType(QName qName)
           
 Iterator<TypeBinding> getTypes()
           
 XOPMarshaller getXopMarshaller()
           
 XOPUnmarshaller getXopUnmarshaller()
           
 boolean isIgnoreLowLine()
           
 boolean isIgnoreUnresolvedFieldOrClass()
           
 boolean isIgnoreWhitespacesInMixedContent()
           
 boolean isNormalizeSpace()
           
 boolean isReplacePropertyRefs()
           
 boolean isStrictSchema()
           
 boolean isUnmarshalListsToArrays()
           
 boolean isUnresolvedContentBoundToDOM()
           
 boolean isUseNoArgCtorIfFound()
           
 void setIgnoreLowLine(boolean ignoreLowLine)
          Where '_' should be considered as a word separator or a part of the Java identifier when mapping XML names to Java identifiers.
 void setIgnoreUnresolvedFieldOrClass(boolean ignoreUnresolvedFieldOrClass)
          If a field is not found in the parent class to set child value on or a class an element is bound to an exception will be thrown if this property is false.
 void setIgnoreWhitespacesInMixedContent(boolean value)
           
 void setNamespaces(Set<String> namespaces)
          Set the namespaces.
 void setNormalizeSpace(boolean value)
           
 void setPackageMetaData(PackageMetaData packageMetaData)
           
 void setReplacePropertyRefs(boolean flag)
           
 void setSchemaResolver(SchemaBindingResolver schemaResolver)
           
 void setSimpleContentProperty(String simpleContentProperty)
          Set the default property name to use for simple content bindings
 void setStrictSchema(boolean strictSchema)
          If strict-schema is true then all the elements and attributes in XML content being parsed must be bound in this instance of SchemaBinding (except attributes from xmlns and xsi namespaces), otherwise a runtime exception is thrown.
 void setUnmarshalListsToArrays(boolean unmarshalListsToArrays)
          Should list xml types be unmarshalled as arrays
 void setUnresolvedContentBoundToDOM(boolean toDom)
           
 void setUseNoArgCtorIfFound(boolean useNoArgCtorIfFound)
          Should the default no-arg ctor be used to create the java instance
 void setXopMarshaller(XOPMarshaller xopMarshaller)
           
 void setXopUnmarshaller(XOPUnmarshaller xopUnmarshaller)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaBinding

public SchemaBinding()
Method Detail

addPrefixMapping

public void addPrefixMapping(String prefix,
                             String ns)

getNamespace

public String getNamespace(String prefix)

getNamespaces

public Set<String> getNamespaces()
Get the namespaces.

Returns:
the namespaces.

setNamespaces

public void setNamespaces(Set<String> namespaces)
Set the namespaces.

Parameters:
namespaces - the namespaces.
Throws:
IllegalArgumentException - for null spaces

getType

public TypeBinding getType(QName qName)

addType

public void addType(TypeBinding type)

getElement

public ElementBinding getElement(QName name)

getElementParticle

public ParticleBinding getElementParticle(QName name)

addElement

public void addElement(ElementBinding element)

addElement

public ElementBinding addElement(QName name,
                                 TypeBinding type)

getElements

public Iterator<ElementBinding> getElements()

getElementParticles

public Iterator<ParticleBinding> getElementParticles()

getTypes

public Iterator<TypeBinding> getTypes()

getGroup

public ModelGroupBinding getGroup(QName name)

addGroup

public void addGroup(QName name,
                     ModelGroupBinding group)

getGroups

public Iterator<ModelGroupBinding> getGroups()

getPackageMetaData

public PackageMetaData getPackageMetaData()

setPackageMetaData

public void setPackageMetaData(PackageMetaData packageMetaData)

getSchemaResolver

public SchemaBindingResolver getSchemaResolver()

setSchemaResolver

public void setSchemaResolver(SchemaBindingResolver schemaResolver)

isStrictSchema

public boolean isStrictSchema()

setStrictSchema

public void setStrictSchema(boolean strictSchema)
If strict-schema is true then all the elements and attributes in XML content being parsed must be bound in this instance of SchemaBinding (except attributes from xmlns and xsi namespaces), otherwise a runtime exception is thrown. The default value for this property is true.


isIgnoreUnresolvedFieldOrClass

public boolean isIgnoreUnresolvedFieldOrClass()

setIgnoreUnresolvedFieldOrClass

public void setIgnoreUnresolvedFieldOrClass(boolean ignoreUnresolvedFieldOrClass)
If a field is not found in the parent class to set child value on or a class an element is bound to an exception will be thrown if this property is false. Otherwise, the process will just go on (the default for now).


isReplacePropertyRefs

public boolean isReplacePropertyRefs()

setReplacePropertyRefs

public void setReplacePropertyRefs(boolean flag)
Parameters:
flag -

isIgnoreLowLine

public boolean isIgnoreLowLine()

setIgnoreLowLine

public void setIgnoreLowLine(boolean ignoreLowLine)
Where '_' should be considered as a word separator or a part of the Java identifier when mapping XML names to Java identifiers.


isUnmarshalListsToArrays

public boolean isUnmarshalListsToArrays()

setUnmarshalListsToArrays

public void setUnmarshalListsToArrays(boolean unmarshalListsToArrays)
Should list xml types be unmarshalled as arrays

Parameters:
unmarshalListsToArrays -

isUseNoArgCtorIfFound

public boolean isUseNoArgCtorIfFound()

setUseNoArgCtorIfFound

public void setUseNoArgCtorIfFound(boolean useNoArgCtorIfFound)
Should the default no-arg ctor be used to create the java instance

Parameters:
useNoArgCtorIfFound -

getSimpleContentProperty

public String getSimpleContentProperty()

setSimpleContentProperty

public void setSimpleContentProperty(String simpleContentProperty)
Set the default property name to use for simple content bindings

Parameters:
simpleContentProperty -

getXopUnmarshaller

public XOPUnmarshaller getXopUnmarshaller()
Returns:
schema default XOP unmarshaller

setXopUnmarshaller

public void setXopUnmarshaller(XOPUnmarshaller xopUnmarshaller)
Parameters:
xopUnmarshaller - schema default XOP unmarshaller

getXopMarshaller

public XOPMarshaller getXopMarshaller()
Returns:
schema default XOP marshaller

setXopMarshaller

public void setXopMarshaller(XOPMarshaller xopMarshaller)
Parameters:
xopMarshaller - schema default XOP marshaller

setUnresolvedContentBoundToDOM

public void setUnresolvedContentBoundToDOM(boolean toDom)

isUnresolvedContentBoundToDOM

public boolean isUnresolvedContentBoundToDOM()

isIgnoreWhitespacesInMixedContent

public boolean isIgnoreWhitespacesInMixedContent()

setIgnoreWhitespacesInMixedContent

public void setIgnoreWhitespacesInMixedContent(boolean value)

isNormalizeSpace

public boolean isNormalizeSpace()

setNormalizeSpace

public void setNormalizeSpace(boolean value)


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.