org.jbind.xml.schema.compiler
Class BehaviourCartridge

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

public abstract class BehaviourCartridge
extends BaseCartridge


Constructor Summary
BehaviourCartridge(java.lang.String aCartridgeAttributePrefix, java.lang.String aNamePrefix, java.lang.String aNameSuffix)
           
 
Method Summary
 IBinding createGlobalAnyTypeBinding(IComponent aComponent, java.lang.String aRootPackage, boolean aUseBuiltInClassesOnly)
           
 IBinding createGlobalAttrDeclBinding(IComponent aComponent, java.lang.String aRootPackage, boolean aUseBuiltInClassesOnly)
           
 IBinding createGlobalAttrGroupBinding(IComponent aComponent, java.lang.String aRootPackage, boolean aUseBuiltInClassesOnly)
           
 IBinding createGlobalElemDeclBinding(IComponent aComponent, java.lang.String aRootPackage, boolean aUseBuiltInClassesOnly)
           
 IBinding createGlobalGroupDeclBinding(IComponent aComponent, java.lang.String aRootPackage, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerAnyTypeBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerAttrDeclBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerAttrGroupBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerAttrRefBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerAttrWildcardBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerElemDeclBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerElemRefBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerElemWildcardBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
 IBinding createInnerGroupRefOrDeclBinding(IComponent aComponent, IBinding aParentBinding, boolean aUseBuiltInClassesOnly)
           
protected  void doVisitAnyTypeEnd(IAnyType aType)
           
protected  boolean doVisitAnyTypeStart(IAnyType aType)
           
protected abstract  java.lang.String getDeclaration(IAnyType aType)
           
 IMessage getEditHint(java.io.File aFile, IComponent aComponent)
          Gets a message that is output if a file generated by this cartridge must be edited manually.
 boolean isUpToDate(java.io.Reader aReader, IFileInfo aFileInfo)
          Checks if the previous code is up to date.
 boolean overwrite()
          Determines if any previous code is overwritten.
 
Methods inherited from class org.jbind.xml.schema.compiler.BaseCartridge
addIndent, behaviourBaseClass, doVisitAttrDescEnd, doVisitAttrDescStart, doVisitAttrGroupDescEnd, doVisitAttrGroupDescStart, doVisitElemDescEnd, doVisitElemDescStart, doVisitElemGroupDescEnd, doVisitElemGroupDescStart, generate, getBehaviourClassCartridge, getBehaviourInterfaceCartridge, getDataClassCartridge, getDataInterfaceCartridge, getNamePrefix, getNameSuffix, initCartridge, interfaceOrClass, removeIndent, setNotEmpty, setOuterComponent, staticOrPublic, writeLn, writeMultiLn
 
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, 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
 
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
 

Constructor Detail

BehaviourCartridge

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

overwrite

public boolean overwrite()
Description copied from interface: ICartridge
Determines if any previous code is overwritten.

Returns:
Returns true iff previous code is overwritten.

getDeclaration

protected abstract java.lang.String getDeclaration(IAnyType aType)

getEditHint

public IMessage getEditHint(java.io.File aFile,
                            IComponent aComponent)
Description copied from interface: ICartridge
Gets a message that is output if a file generated by this cartridge must be edited manually. This method may only be called if overwrite returns false.

Parameters:
aFile - (required).
aComponent - (required).
Returns:
(required).

isUpToDate

public boolean isUpToDate(java.io.Reader aReader,
                          IFileInfo aFileInfo)
                   throws java.lang.Exception
Description copied from interface: ICartridge
Checks if the previous code is up to date.

Parameters:
aReader - (required). Reads the previous code.
aFileInfo - (required). The file info returned from the generate method.
Returns:
Returns true iff the previous code is up to date.
Throws:
java.lang.Exception

createGlobalAnyTypeBinding

public IBinding createGlobalAnyTypeBinding(IComponent aComponent,
                                           java.lang.String aRootPackage,
                                           boolean aUseBuiltInClassesOnly)

createGlobalAttrDeclBinding

public IBinding createGlobalAttrDeclBinding(IComponent aComponent,
                                            java.lang.String aRootPackage,
                                            boolean aUseBuiltInClassesOnly)

createGlobalGroupDeclBinding

public IBinding createGlobalGroupDeclBinding(IComponent aComponent,
                                             java.lang.String aRootPackage,
                                             boolean aUseBuiltInClassesOnly)

createGlobalElemDeclBinding

public IBinding createGlobalElemDeclBinding(IComponent aComponent,
                                            java.lang.String aRootPackage,
                                            boolean aUseBuiltInClassesOnly)

createGlobalAttrGroupBinding

public IBinding createGlobalAttrGroupBinding(IComponent aComponent,
                                             java.lang.String aRootPackage,
                                             boolean aUseBuiltInClassesOnly)

createInnerAnyTypeBinding

public IBinding createInnerAnyTypeBinding(IComponent aComponent,
                                          IBinding aParentBinding,
                                          boolean aUseBuiltInClassesOnly)

createInnerAttrRefBinding

public IBinding createInnerAttrRefBinding(IComponent aComponent,
                                          IBinding aParentBinding,
                                          boolean aUseBuiltInClassesOnly)

createInnerAttrDeclBinding

public IBinding createInnerAttrDeclBinding(IComponent aComponent,
                                           IBinding aParentBinding,
                                           boolean aUseBuiltInClassesOnly)

createInnerAttrWildcardBinding

public IBinding createInnerAttrWildcardBinding(IComponent aComponent,
                                               IBinding aParentBinding,
                                               boolean aUseBuiltInClassesOnly)

createInnerGroupRefOrDeclBinding

public IBinding createInnerGroupRefOrDeclBinding(IComponent aComponent,
                                                 IBinding aParentBinding,
                                                 boolean aUseBuiltInClassesOnly)

createInnerElemRefBinding

public IBinding createInnerElemRefBinding(IComponent aComponent,
                                          IBinding aParentBinding,
                                          boolean aUseBuiltInClassesOnly)

createInnerElemDeclBinding

public IBinding createInnerElemDeclBinding(IComponent aComponent,
                                           IBinding aParentBinding,
                                           boolean aUseBuiltInClassesOnly)

createInnerElemWildcardBinding

public IBinding createInnerElemWildcardBinding(IComponent aComponent,
                                               IBinding aParentBinding,
                                               boolean aUseBuiltInClassesOnly)

createInnerAttrGroupBinding

public IBinding createInnerAttrGroupBinding(IComponent aComponent,
                                            IBinding aParentBinding,
                                            boolean aUseBuiltInClassesOnly)

doVisitAnyTypeStart

protected boolean doVisitAnyTypeStart(IAnyType aType)
Overrides:
doVisitAnyTypeStart in class ComponentVisitor

doVisitAnyTypeEnd

protected void doVisitAnyTypeEnd(IAnyType aType)
Overrides:
doVisitAnyTypeEnd in class ComponentVisitor