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: 1.24 $
Author:
Alexey Loubyansky

Constructor Summary
SchemaBinding()
           
 
Method Summary
 void addElement(ElementBinding element)
           
 ElementBinding addElement(javax.xml.namespace.QName name, TypeBinding type)
           
 void addType(TypeBinding type)
           
 ElementBinding getElement(javax.xml.namespace.QName name)
           
 ParticleBinding getElementParticle(javax.xml.namespace.QName name)
           
 Iterator getElementParticles()
           
 Iterator getElements()
           
 PackageMetaData getPackageMetaData()
           
 SchemaBindingResolver getSchemaResolver()
           
 String getSimpleContentProperty()
           
protected static TypeBinding getSimpleType(javax.xml.namespace.QName name)
           
 TypeBinding getType(javax.xml.namespace.QName qName)
           
 Iterator getTypes()
           
 XOPMarshaller getXopMarshaller()
           
 XOPUnmarshaller getXopUnmarshaller()
           
 boolean isIgnoreLowLine()
           
 boolean isIgnoreUnresolvedFieldOrClass()
           
 boolean isReplacePropertyRefs()
           
 boolean isStrictSchema()
           
 boolean isUnmarshalListsToArrays()
           
 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 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 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

getSimpleType

protected static TypeBinding getSimpleType(javax.xml.namespace.QName name)

getType

public TypeBinding getType(javax.xml.namespace.QName qName)

addType

public void addType(TypeBinding type)

getElement

public ElementBinding getElement(javax.xml.namespace.QName name)

getElementParticle

public ParticleBinding getElementParticle(javax.xml.namespace.QName name)

addElement

public void addElement(ElementBinding element)

addElement

public ElementBinding addElement(javax.xml.namespace.QName name,
                                 TypeBinding type)

getElements

public Iterator getElements()

getElementParticles

public Iterator getElementParticles()

getTypes

public Iterator getTypes()

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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.