org.jbind.xml.schema.compiler
Class AbstractCartridge

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

public abstract class AbstractCartridge
extends ComponentVisitor
implements ICartridge


Constructor Summary
AbstractCartridge()
           
 
Method Summary
protected static java.lang.String constant(java.lang.String aString)
          Converts a string into a valid java constant.
protected  IBinding getBinding(IComponent aComponent)
           
 int getCartridgeNo()
           
 java.lang.String getInnerName(IComponent aComponent)
           
 java.lang.String getNameForPackage(IComponent aComponent, java.lang.String aPackage)
          Gets the name of a component when referenced from a specified package.
 java.lang.String getSubPackage()
          Gets the sub package.
 java.lang.String getUsableFqName(IComponent aComponent)
           
 void initCartridge(ICartridgeMgr aCartrigedMgr)
           
 void setCartridgeNo(int aNumber)
           
 
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, doVisitAttrDescEnd, doVisitAttrDescStart, doVisitAttrGroupDeclEnd, doVisitAttrGroupDeclStart, doVisitAttrGroupDescEnd, doVisitAttrGroupDescStart, doVisitAttrGroupRefEnd, doVisitAttrGroupRefStart, doVisitAttrRefEnd, doVisitAttrRefOrDeclEnd, doVisitAttrRefOrDeclStart, doVisitAttrRefStart, doVisitAttrWildcardEnd, doVisitAttrWildcardStart, doVisitChoiceDeclEnd, doVisitChoiceDeclStart, doVisitChoiceDescEnd, doVisitChoiceDescStart, doVisitChoiceRefEnd, doVisitChoiceRefStart, doVisitComplexTypeEnd, doVisitComplexTypeStart, doVisitComponentEnd, doVisitComponentStart, doVisitContentDescEnd, doVisitContentDescStart, doVisitElemDeclEnd, doVisitElemDeclStart, doVisitElemDescEnd, doVisitElemDescStart, doVisitElemGroupDescEnd, doVisitElemGroupDescStart, 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, generate, getEditHint, getNamePrefix, getNameSuffix, 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

AbstractCartridge

public AbstractCartridge()
Method Detail

getCartridgeNo

public final int getCartridgeNo()
Specified by:
getCartridgeNo in interface ICartridge

setCartridgeNo

public final void setCartridgeNo(int aNumber)
Specified by:
setCartridgeNo in interface ICartridge

initCartridge

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

getSubPackage

public java.lang.String getSubPackage()
Description copied from interface: ICartridge
Gets the sub package. The file generated by the cartridge can be located in a common sub package. The cartridge sub package is appended to the schema (root) package.

Specified by:
getSubPackage in interface ICartridge
Returns:
(optional).

constant

protected static java.lang.String constant(java.lang.String aString)
Converts a string into a valid java constant.

Parameters:
aString - (required).
Returns:
(required).

getUsableFqName

public java.lang.String getUsableFqName(IComponent aComponent)
Specified by:
getUsableFqName in interface ICartridge

getNameForPackage

public java.lang.String getNameForPackage(IComponent aComponent,
                                          java.lang.String aPackage)
Description copied from interface: ICartridge
Gets the name of a component when referenced from a specified package. If a component is referenced from the same package it belongs to then only the name is returned otherwise the fully qualified name.

Specified by:
getNameForPackage in interface ICartridge
Parameters:
aComponent - (required).
aPackage - (required).
Returns:
(required).

getInnerName

public java.lang.String getInnerName(IComponent aComponent)

getBinding

protected IBinding getBinding(IComponent aComponent)