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

java.lang.Object
  extended by org.jboss.xb.binding.sunday.unmarshalling.TermBinding
      extended by org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
AllBinding, ChoiceBinding, SequenceBinding, UnorderedSequenceBinding

public abstract class ModelGroupBinding
extends TermBinding
implements Cloneable

Version:
$Revision: 3007 $
Author:
Alexey Loubyansky

Nested Class Summary
 class ModelGroupBinding.Cursor
           
 
Field Summary
protected  ParticleHandler handler
           
protected  org.jboss.logging.Logger log
           
protected  QName qName
          The qualifed name for global groups
protected  boolean requiredParticle
           
 
Fields inherited from class org.jboss.xb.binding.sunday.unmarshalling.TermBinding
addMethodMetaData, beforeMarshallingCallback, beforeSetParentCallback, classMetaData, mapEntryKey, mapEntryMetaData, mapEntryValue, propertyMetaData, putMethodMetaData, schema, skip, valueAdapter, valueMetaData
 
Constructor Summary
protected ModelGroupBinding(SchemaBinding schema)
           
 
Method Summary
 void addParticle(ParticleBinding particle)
          Model group that is passed in as an argument to this method must be fully populated with element, wildcard and child model group bindings.
 Object clone()
           
abstract  ElementBinding getArrayItem()
           
abstract  String getGroupType()
           
 ParticleHandler getHandler()
           
abstract  Collection<ParticleBinding> getParticles()
           
 QName getQName()
          Get the qName.
 boolean hasRequiredParticle()
           
 boolean isElement()
           
 boolean isModelGroup()
           
 boolean isSkip()
           
 boolean isWildcard()
           
 boolean mayStartWith(QName qName)
          This method is not actually used during parsing.
protected abstract  boolean mayStartWith(QName qName, Set<ModelGroupBinding> set)
           
abstract  ModelGroupBinding.Cursor newCursor(ParticleBinding particle)
           
 void setHandler(ParticleHandler handler)
           
 void setQName(QName name)
          Set the qName.
 String toString()
           
 
Methods inherited from class org.jboss.xb.binding.sunday.unmarshalling.TermBinding
getAddMethodMetaData, getBeforeMarshallingCallback, getBeforeSetParentCallback, getClassMetaData, getMapEntryMetaData, getPropertyMetaData, getPutMethodMetaData, getSchema, getValueAdapter, getValueMetaData, isMapEntryKey, isMapEntryValue, setAddMethodMetaData, setBeforeMarshallingCallback, setBeforeSetParentCallback, setClassMetaData, setMapEntryKey, setMapEntryMetaData, setMapEntryValue, setPropertyMetaData, setPutMethodMetaData, setSkip, setValueAdapter, setValueMetaData
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected final org.jboss.logging.Logger log

qName

protected QName qName
The qualifed name for global groups


requiredParticle

protected boolean requiredParticle

handler

protected ParticleHandler handler
Constructor Detail

ModelGroupBinding

protected ModelGroupBinding(SchemaBinding schema)
Method Detail

getQName

public QName getQName()
Get the qName.

Returns:
the qName.

setQName

public void setQName(QName name)
Set the qName.

Parameters:
name - the qName.
Throws:
IllegalArgumentException - for a null qName

getHandler

public ParticleHandler getHandler()

setHandler

public void setHandler(ParticleHandler handler)

getArrayItem

public abstract ElementBinding getArrayItem()

addParticle

public void addParticle(ParticleBinding particle)
Model group that is passed in as an argument to this method must be fully populated with element, wildcard and child model group bindings.

Parameters:
particle -

getParticles

public abstract Collection<ParticleBinding> getParticles()

hasRequiredParticle

public boolean hasRequiredParticle()

mayStartWith

public boolean mayStartWith(QName qName)
This method is not actually used during parsing. It's here only for internal tests.

Parameters:
qName - an element name
Returns:
true if the model group may start with the specified element

newCursor

public abstract ModelGroupBinding.Cursor newCursor(ParticleBinding particle)

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

mayStartWith

protected abstract boolean mayStartWith(QName qName,
                                        Set<ModelGroupBinding> set)

isSkip

public boolean isSkip()
Specified by:
isSkip in class TermBinding

isModelGroup

public boolean isModelGroup()
Specified by:
isModelGroup in class TermBinding

isWildcard

public boolean isWildcard()
Specified by:
isWildcard in class TermBinding

isElement

public boolean isElement()
Specified by:
isElement in class TermBinding

toString

public String toString()
Overrides:
toString in class Object

getGroupType

public abstract String getGroupType()


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