org.jbind.xml.schema.compiler
Class BaseCartridge

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.ComponentVisitor
      extended byorg.jbind.xml.schema.compiler.AbstractCartridge
          extended byorg.jbind.xml.schema.compiler.BaseCartridge
All Implemented Interfaces:
IBinder, ICartridge, IComponentVisitor
Direct Known Subclasses:
BehaviourCartridge, DataCartridge

public abstract class BaseCartridge
extends AbstractCartridge


Constructor Summary
BaseCartridge(java.lang.String aCartridgeAttributePrefix, java.lang.String aNamePrefix, java.lang.String aNameSuffix)
           
 
Method Summary
protected  void addIndent()
           
protected  java.lang.String behaviourBaseClass(IAnyType aType, java.lang.String aPackage)
           
protected  void doVisitAttrDescEnd(IAttrDesc aComponent)
           
protected  boolean doVisitAttrDescStart(IAttrDesc aComponent)
           
protected  void doVisitAttrGroupDescEnd(IAttrGroupDesc aComponent)
           
protected  boolean doVisitAttrGroupDescStart(IAttrGroupDesc aComponent)
           
protected  void doVisitElemDescEnd(IElemDesc aComponent)
           
protected  boolean doVisitElemDescStart(IElemDesc aComponent)
           
protected  void doVisitElemGroupDescEnd(IElemGroupDesc aComponent)
           
protected  boolean doVisitElemGroupDescStart(IElemGroupDesc aComponent)
           
 IFileInfo generate(IComponent aComponent)
          Generates code for the specified component.
protected  ICartridge getBehaviourClassCartridge()
           
protected  ICartridge getBehaviourInterfaceCartridge()
           
protected  ICartridge getDataClassCartridge()
           
protected  ICartridge getDataInterfaceCartridge()
           
 java.lang.String getNamePrefix(IComponent aComponent)
          Gets the name prefix.
 java.lang.String getNameSuffix(IComponent aComponent)
          Gets the name suffix.
 void initCartridge(ICartridgeMgr aCartrigedMgr)
           
protected abstract  java.lang.String interfaceOrClass()
           
protected  void removeIndent()
           
protected  void setNotEmpty()
           
protected  void setOuterComponent(IComponent aComponent)
           
protected  java.lang.String staticOrPublic()
           
protected  void writeLn(java.lang.Object anObject)
           
protected  void writeMultiLn(java.lang.String aString)
           
 
Methods inherited from class org.jbind.xml.schema.compiler.AbstractCartridge
constant, getBinding, getCartridgeNo, getInnerName, getNameForPackage, getSubPackage, getUsableFqName, setCartridgeNo
 
Methods inherited from class org.jbind.xml.schema.cmp.ComponentVisitor
doAfterVisit, doBeforeVisit, doVisitAllDeclEnd, doVisitAllDeclStart, doVisitAllDescEnd, doVisitAllDescStart, doVisitAllRefEnd, doVisitAllRefStart, doVisitAnySimpleTypeEnd, doVisitAnySimpleTypeStart, doVisitAnyTypeEnd, doVisitAnyTypeStart, doVisitAtomicTypeEnd, doVisitAtomicTypeStart, doVisitAttrDeclEnd, doVisitAttrDeclStart, doVisitAttrGroupDeclEnd, doVisitAttrGroupDeclStart, doVisitAttrGroupRefEnd, doVisitAttrGroupRefStart, doVisitAttrRefEnd, doVisitAttrRefOrDeclEnd, doVisitAttrRefOrDeclStart, doVisitAttrRefStart, doVisitAttrWildcardEnd, doVisitAttrWildcardStart, doVisitChoiceDeclEnd, doVisitChoiceDeclStart, doVisitChoiceDescEnd, doVisitChoiceDescStart, doVisitChoiceRefEnd, doVisitChoiceRefStart, doVisitComplexTypeEnd, doVisitComplexTypeStart, doVisitComponentEnd, doVisitComponentStart, doVisitContentDescEnd, doVisitContentDescStart, doVisitElemDeclEnd, doVisitElemDeclStart, doVisitElemRefEnd, doVisitElemRefOrDeclEnd, doVisitElemRefOrDeclStart, doVisitElemRefStart, doVisitElemWildcardEnd, doVisitElemWildcardStart, doVisitListTypeEnd, doVisitListTypeStart, doVisitNotationEnd, doVisitNotationStart, doVisitSequenceDeclEnd, doVisitSequenceDeclStart, doVisitSequenceDescEnd, doVisitSequenceDescStart, doVisitSequenceRefEnd, doVisitSequenceRefStart, doVisitUnionTypeEnd, doVisitUnionTypeStart, shallVisitSubComponents, visitAllDeclEnd, visitAllDeclStart, visitAllRefEnd, visitAllRefStart, visitAnySimpleTypeEnd, visitAnySimpleTypeStart, visitAnyTypeEnd, visitAnyTypeStart, visitAtomicTypeEnd, visitAtomicTypeStart, visitAttrDeclEnd, visitAttrDeclStart, visitAttrGroupDeclEnd, visitAttrGroupDeclStart, visitAttrGroupRefEnd, visitAttrGroupRefStart, visitAttrRefEnd, visitAttrRefStart, visitAttrWildcardEnd, visitAttrWildcardStart, visitChoiceDeclEnd, visitChoiceDeclStart, visitChoiceRefEnd, visitChoiceRefStart, visitComplexTypeEnd, visitComplexTypeStart, visitElemDeclEnd, visitElemDeclStart, visitElemRefEnd, visitElemRefStart, visitElemWildcardEnd, visitElemWildcardStart, visitListTypeEnd, visitListTypeStart, visitNotationEnd, visitNotationStart, visitSequenceDeclEnd, visitSequenceDeclStart, visitSequenceRefEnd, visitSequenceRefStart, visitUnionTypeEnd, visitUnionTypeStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.schema.compiler.ICartridge
createBuiltInBinding, getEditHint, isUpToDate, overwrite
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponentVisitor
shallVisitSubComponents, visitAllDeclEnd, visitAllDeclStart, visitAllRefEnd, visitAllRefStart, visitAnySimpleTypeEnd, visitAnySimpleTypeStart, visitAnyTypeEnd, visitAnyTypeStart, visitAtomicTypeEnd, visitAtomicTypeStart, visitAttrDeclEnd, visitAttrDeclStart, visitAttrGroupDeclEnd, visitAttrGroupDeclStart, visitAttrGroupRefEnd, visitAttrGroupRefStart, visitAttrRefEnd, visitAttrRefStart, visitAttrWildcardEnd, visitAttrWildcardStart, visitChoiceDeclEnd, visitChoiceDeclStart, visitChoiceRefEnd, visitChoiceRefStart, visitComplexTypeEnd, visitComplexTypeStart, visitElemDeclEnd, visitElemDeclStart, visitElemRefEnd, visitElemRefStart, visitElemWildcardEnd, visitElemWildcardStart, visitListTypeEnd, visitListTypeStart, visitNotationEnd, visitNotationStart, visitSequenceDeclEnd, visitSequenceDeclStart, visitSequenceRefEnd, visitSequenceRefStart, visitUnionTypeEnd, visitUnionTypeStart
 
Methods inherited from interface org.jbind.xml.schema.compiler.IBinder
createGlobalAnyTypeBinding, createGlobalAttrDeclBinding, createGlobalAttrGroupBinding, createGlobalElemDeclBinding, createGlobalGroupDeclBinding, createInnerAnyTypeBinding, createInnerAttrDeclBinding, createInnerAttrGroupBinding, createInnerAttrRefBinding, createInnerAttrWildcardBinding, createInnerElemDeclBinding, createInnerElemRefBinding, createInnerElemWildcardBinding, createInnerGroupRefOrDeclBinding
 

Constructor Detail

BaseCartridge

public BaseCartridge(java.lang.String aCartridgeAttributePrefix,
                     java.lang.String aNamePrefix,
                     java.lang.String aNameSuffix)
Method Detail

getNamePrefix

public java.lang.String getNamePrefix(IComponent aComponent)
Description copied from interface: ICartridge
Gets the name prefix. The name prefix is used when the name of a binding is determined.

Returns:
(required).

getNameSuffix

public java.lang.String getNameSuffix(IComponent aComponent)
Description copied from interface: ICartridge
Gets the name suffix. The name suffix is used when the name of a binding is determined.

Returns:
(required).

generate

public IFileInfo generate(IComponent aComponent)
                   throws XmlException
Description copied from interface: ICartridge
Generates code for the specified component.

Parameters:
aComponent - (required).
Returns:
(optional). The generated code.
Throws:
XmlException

writeLn

protected void writeLn(java.lang.Object anObject)

writeMultiLn

protected void writeMultiLn(java.lang.String aString)

setNotEmpty

protected void setNotEmpty()

setOuterComponent

protected void setOuterComponent(IComponent aComponent)

addIndent

protected void addIndent()

removeIndent

protected void removeIndent()

initCartridge

public void initCartridge(ICartridgeMgr aCartrigedMgr)
Specified by:
initCartridge in interface ICartridge
Overrides:
initCartridge in class AbstractCartridge

getDataInterfaceCartridge

protected ICartridge getDataInterfaceCartridge()

getDataClassCartridge

protected ICartridge getDataClassCartridge()

getBehaviourInterfaceCartridge

protected ICartridge getBehaviourInterfaceCartridge()

getBehaviourClassCartridge

protected ICartridge getBehaviourClassCartridge()

interfaceOrClass

protected abstract java.lang.String interfaceOrClass()

staticOrPublic

protected java.lang.String staticOrPublic()

doVisitElemGroupDescStart

protected boolean doVisitElemGroupDescStart(IElemGroupDesc aComponent)
                                     throws XmlException
Overrides:
doVisitElemGroupDescStart in class ComponentVisitor
Throws:
XmlException

doVisitElemGroupDescEnd

protected void doVisitElemGroupDescEnd(IElemGroupDesc aComponent)
                                throws XmlException
Overrides:
doVisitElemGroupDescEnd in class ComponentVisitor
Throws:
XmlException

doVisitAttrGroupDescStart

protected boolean doVisitAttrGroupDescStart(IAttrGroupDesc aComponent)
                                     throws XmlException
Overrides:
doVisitAttrGroupDescStart in class ComponentVisitor
Throws:
XmlException

doVisitAttrGroupDescEnd

protected void doVisitAttrGroupDescEnd(IAttrGroupDesc aComponent)
                                throws XmlException
Overrides:
doVisitAttrGroupDescEnd in class ComponentVisitor
Throws:
XmlException

doVisitAttrDescStart

protected boolean doVisitAttrDescStart(IAttrDesc aComponent)
                                throws XmlException
Overrides:
doVisitAttrDescStart in class ComponentVisitor
Throws:
XmlException

doVisitAttrDescEnd

protected void doVisitAttrDescEnd(IAttrDesc aComponent)
                           throws XmlException
Overrides:
doVisitAttrDescEnd in class ComponentVisitor
Throws:
XmlException

doVisitElemDescStart

protected boolean doVisitElemDescStart(IElemDesc aComponent)
                                throws XmlException
Overrides:
doVisitElemDescStart in class ComponentVisitor
Throws:
XmlException

doVisitElemDescEnd

protected void doVisitElemDescEnd(IElemDesc aComponent)
                           throws XmlException
Overrides:
doVisitElemDescEnd in class ComponentVisitor
Throws:
XmlException

behaviourBaseClass

protected java.lang.String behaviourBaseClass(IAnyType aType,
                                              java.lang.String aPackage)