|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.joost.instruction.AbstractInstruction
net.sf.joost.instruction.NodeBase
net.sf.joost.instruction.GroupBase
public abstract class GroupBase
Base class for stx:group
(class GroupFactory.Instance
)
and stx:transform
(class TransformFactory.Instance
) elements.
The stx:transform
root element is also a group.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.joost.instruction.NodeBase |
---|
NodeBase.End |
Field Summary | |
---|---|
protected Vector |
children
Vector of the children |
private Vector |
containedGlobalTemplates
Vector of all contained global templates in this group Used only temporarily during compiling the transformation sheet. |
protected GroupBase[] |
containedGroups
Contained groups in this group |
private Vector |
containedGroupTemplates
Vector of all contained group templates in this group. |
private Hashtable |
containedPublicProcedures
Table of all contained public and global procedures in this group Used only temporarily during compiling the transformation sheet. |
private Vector |
containedPublicTemplates
Vector of all contained public templates in this group. |
(package private) Hashtable |
globalProcedures
Table of all global procedures in the transformation sheet, stems from the parent group |
String |
groupName
Expanded name of this group |
(package private) Hashtable |
groupProcedures
Table of the group procedures visible for this group |
TemplateFactory.Instance[] |
groupTemplates
The templates from containedGroupTemplates as array |
private VariableBase[] |
groupVariables
Group variables |
Hashtable |
namedGroups
Table of named groups: key = group name, value = group object. |
GroupBase |
parentGroup
parent group |
byte |
passThrough
The rule how to process unmatched events (from stx:options' pass-through ) |
boolean |
recognizeCdata
Should CDATA section be recognized (from stx:options' recognize-cdata )? |
boolean |
stripSpace
Should white-space only text nodes be stripped (from stx:options' strip-space )? |
Hashtable |
visibleProcedures
Visible procedures: procedures from this group and public templates from subgroups |
TemplateFactory.Instance[] |
visibleTemplates
Visible templates: templates from this group and public templates from subgroups |
Fields inherited from class net.sf.joost.instruction.NodeBase |
---|
lastChild, localFieldStack, nodeEnd, parent, preserveSpace, publicId, qName, scopedVariables, systemId |
Fields inherited from class net.sf.joost.instruction.AbstractInstruction |
---|
colNo, lineNo, next |
Fields inherited from interface net.sf.joost.Constants |
---|
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS |
Constructor Summary | |
---|---|
protected |
GroupBase(String qName,
NodeBase parent,
ParseContext context,
byte passThrough,
boolean stripSpace,
boolean recognizeCdata)
|
Method Summary | |
---|---|
protected void |
addGroupProcedures(Hashtable pTable)
Add the procedures from pTable to the group procedures
of this group and all sub-groups. |
protected void |
addGroupTemplates(Vector tVec)
Add the templates from tVec to the group templates
of this group and all sub-groups. |
boolean |
compile(int pass,
ParseContext context)
Determines the visible templates for this group in pass 0 and the array of group templates in pass 1. |
void |
enterRecursionLevel(Context context)
Enters a recursion level by creating a new set of group variable instances. |
void |
exitRecursionLevel(Context context)
Exits a recursion level by removing the current group variable instances. |
Vector |
getGlobalTemplates()
Returns the globally visible templates in this group (and all sub-groups). |
TemplateFactory.Instance[] |
getVisibleTemplates()
returns the value of visibleTemplates |
void |
initGroupVariables(Context context)
Initializes recursively the group variables of this group and all contained sub-groups (breadth first). |
void |
insert(NodeBase node)
Insert a new node as a child of this element |
protected void |
onDeepCopy(AbstractInstruction copy,
HashMap copies)
Callback that will be called when a clone of this instance has been created. |
short |
process(Context c)
Save local variables if needed. |
boolean |
processable()
|
Methods inherited from class net.sf.joost.instruction.NodeBase |
---|
declareVariable, getNode, getNodeEnd, mayDropEnd, processEnd, setEndLocation, toString |
Methods inherited from class net.sf.joost.instruction.AbstractInstruction |
---|
deepCopy, deepHashtableCopy, deepTemplateArrayCopy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public byte passThrough
stx:options' pass-through
)
public boolean stripSpace
stx:options' strip-space
)?
public boolean recognizeCdata
stx:options' recognize-cdata
)?
private Vector containedPublicTemplates
private Vector containedGroupTemplates
private Vector containedGlobalTemplates
public TemplateFactory.Instance[] visibleTemplates
public TemplateFactory.Instance[] groupTemplates
containedGroupTemplates
as array
private Hashtable containedPublicProcedures
Hashtable groupProcedures
Hashtable globalProcedures
public Hashtable visibleProcedures
protected GroupBase[] containedGroups
public Hashtable namedGroups
public GroupBase parentGroup
private VariableBase[] groupVariables
public String groupName
protected Vector children
Constructor Detail |
---|
protected GroupBase(String qName, NodeBase parent, ParseContext context, byte passThrough, boolean stripSpace, boolean recognizeCdata)
Method Detail |
---|
public void insert(NodeBase node) throws SAXParseException
NodeBase
insert
in class NodeBase
node
- the node to be inserted
SAXParseException
public boolean compile(int pass, ParseContext context) throws SAXException
compile
in class NodeBase
pass
- the number of invocations already performed on this nodecontext
- the parse context
true
if another invocation in the next pass is
necessary, false
if the compiling is complete.
This instance returns false
.
SAXException
- if conflicts were encounteredpublic void initGroupVariables(Context context) throws SAXException
SAXException
public void enterRecursionLevel(Context context) throws SAXException
SAXException
public void exitRecursionLevel(Context context)
protected void addGroupTemplates(Vector tVec)
tVec
to the group templates
of this group and all sub-groups.
tVec
- a Vector containing the templatesprotected void addGroupProcedures(Hashtable pTable) throws SAXParseException
pTable
to the group procedures
of this group and all sub-groups.
pTable
- a Hashtable containing the procedures
SAXParseException
- if one of the procedures is already definedpublic Vector getGlobalTemplates()
compile(int, net.sf.joost.stx.ParseContext)
in the parent
group, which adds in turn the returned vector to its vector of the
global templates.
The field containedGlobalTemplates
will be set to
null
afterwards to allow garbage collection.
public boolean processable()
processable
in class NodeBase
true
if NodeBase.process(net.sf.joost.stx.Context)
can be invoked on this
node, and false
otherwisepublic short process(Context c) throws SAXException
NodeBase
process
in class NodeBase
c
- the current context
Constants.PR_CONTINUE
SAXException
- if an error occurs (in a derived class)public TemplateFactory.Instance[] getVisibleTemplates()
visibleTemplates
protected void onDeepCopy(AbstractInstruction copy, HashMap copies)
AbstractInstruction
onDeepCopy
in class NodeBase
copy
- the created clonescopies
- the map of already copied objects
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |