|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
wxtpages.unit
wxtpages.unitGroup
An instance of unitGroup owns and administrates a group (hierarchy) of pages that belong to one and the same group according to the script. An instance of unitGroup in turn is owned by scripthandler. The unitGroup instances with the owned pages are (re)created each time the script is parsed.
Field Summary | |
protected java.util.HashMap |
m_addressMap
Addressing to be used for addressrecalculation for this group: tag - attribute pairs. affected by element adressing in script |
protected java.util.Vector |
m_execCommands
commands - direct exec's: wxtutil.commandDescrition |
protected java.util.Vector |
m_secondPhasePages
Pages that should be built in the second phase of a build process because they contain elements that are depending on established content in other pages |
protected java.util.HashMap |
m_templateMap
templates, ID - Absolute URI pairs |
protected java.util.HashMap |
m_transformationMap
transformations, ID - Absolute URI pairs |
Fields inherited from class wxtpages.unit |
CONTENT_TYPE, DBCONTENT_TYPE, GROUP_TYPE, m_absoluteUri, m_description, m_Doc, m_GroupMaster, m_lastTimeUsed, m_myElement, m_name, m_optionMap, m_originalUri, m_parameterMap, m_propertyMap, m_txtContent, m_type, PAGE_TYPE, TEMPLATE_TYPE, TEXTCONTENT_TYPE, TRANSFORMATION_TYPE, UNIT_TYPE |
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
unitGroup(org.w3c.dom.Element elt,
scripthandler scripth)
Creates a new instance of unitGoup |
Method Summary | |
boolean |
buildForced(javax.swing.JProgressBar pBar,
java.util.Vector units)
Build everything or selection unconditionally Commands are executed first, before all pages All pages are assembled from scratch. |
boolean |
buildUpdated(javax.swing.JProgressBar pBar,
java.util.Vector buildList)
Build only pages that have content, template or transformation objects that are updated from an other programs since last build. |
protected void |
collectFromScript()
Get some data from the node in the script that defines this group: Attributes: the location that serves as anchor for this group of pages name Siblings: templates, transformations, properties, options, addressing Children: description, common, templates, transformations, properties, options, addressing, execCommands |
void |
displayProperties(javax.swing.JFrame dialogOwner)
Show the properties of this unitgroup in a dialog box |
unitPage |
findPageByName(java.lang.String pagename)
Find a page in this group with a given name If more than one match, the first found in a preorder traversel is returned |
unitPage |
findPageByPartialRef(java.lang.String path)
Find a page in this group whos absolute URI ends with the given pathpart If more than one match, the first found in a preorder traversel is returned |
int |
getAUniquenumber()
Get a sufficiently unique integer value to help differentiate between pagelocal anchors in one and the same page with same name |
java.net.URI |
getBuildAnchorURI()
Get the anchor for this group, that is the absolute uri we are building pages relative to in this group |
java.lang.String |
getCommonCatalog()
Get common catalog (value), that is where the common resources are actually stored for this group. |
java.lang.String |
getCommonName()
Get common name, that is what the common catalog is called in files in this group. |
unit |
getContent(int ix)
Try to access a contentobject by its index |
indexTable |
getIndexTableByName(java.lang.String tabname)
Try to find an indexTable by its name |
int |
getPageCount()
Get number of pages in this group |
java.lang.String |
getPageCountAsString()
Get number of pages in this group as string |
java.util.Vector |
getPageLocations()
Get a list of all pagelocations in the group |
java.util.Vector |
getPages()
Get a list of all pages in the group |
scripthandler |
getScriptHandler()
Get the scripthandler that administrates this and all other groups in the script. |
unitTemplate |
getTemplate(java.lang.String tmplt)
Try to access a template by its id |
unitTransformation |
getTransformation(java.lang.String trans)
Try to access a transformation by its id |
boolean |
prepare(unit p,
java.lang.String theCommonName,
java.lang.String theCommonValue)
Prepare this unitGroup with imports from non-content files. |
int |
registerContent(unit uc)
Register a unitContent object as found by a page |
protected void |
registerForSecondPhase(unitPage p)
Register a page that must be built in a second phase. |
void |
registerIndexedWord(java.lang.String tabname,
java.lang.String word,
unitPage page,
java.lang.String fragment)
Register a new entry to an index table |
void |
registerTemplate(java.lang.String name,
unitTemplate ut)
Register a new template to the hashmap that holds templates: m_templateMap |
void |
registerTransformation(java.lang.String name,
unitTransformation ut)
Register a new transformation to the hashmap that holds transformations: m_transformationMap |
javax.swing.JPopupMenu |
setUpPopMenu(javax.swing.JPopupMenu theMenu,
javax.swing.JFrame main)
Set up a popupMenu for this unitGroup. |
boolean |
templateExist(java.lang.String tmplt)
Check if a template with a certain ID is registered |
java.lang.String |
toString()
m_name as a string representation of this group |
boolean |
transformationExist(java.lang.String trans)
Check if a transformation with a certain ID is registered |
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Vector m_secondPhasePages
protected java.util.HashMap m_templateMap
protected java.util.HashMap m_transformationMap
protected java.util.Vector m_execCommands
protected java.util.HashMap m_addressMap
Constructor Detail |
public unitGroup(org.w3c.dom.Element elt, scripthandler scripth) throws java.lang.Exception
elt
- The group-element from the script that defines this groupscripth
- The instance of scripthandler that administrates the script and owns this unitGroup instance
java.lang.Exception
- when the object cannot be establishedMethod Detail |
public java.net.URI getBuildAnchorURI()
public java.lang.String getCommonName()
public java.lang.String getCommonCatalog()
public int getPageCount()
public java.lang.String getPageCountAsString()
public java.lang.String toString()
toString
in class unit
public unitTemplate getTemplate(java.lang.String tmplt)
tmplt
- The id we want
public void registerTemplate(java.lang.String name, unitTemplate ut)
name
- The id we will use to access this templateut
- The unitTemplatepublic boolean templateExist(java.lang.String tmplt)
tmplt
- The ID to look for
public unitTransformation getTransformation(java.lang.String trans)
trans
- The id we want
public void registerTransformation(java.lang.String name, unitTransformation ut)
name
- The id we will use to access this templateut
- The unitTransformationpublic boolean transformationExist(java.lang.String trans)
trans
- The ID to look for
public scripthandler getScriptHandler()
public unit getContent(int ix)
ix
- The content object we are looking for
public int registerContent(unit uc)
uc
- The new unitContent object
public int getAUniquenumber()
public java.util.Vector getPageLocations()
public java.util.Vector getPages()
public javax.swing.JPopupMenu setUpPopMenu(javax.swing.JPopupMenu theMenu, javax.swing.JFrame main)
setUpPopMenu
in class unit
theMenu
- The menu we will preparemain
- The frame that owns the menu
public void displayProperties(javax.swing.JFrame dialogOwner)
displayProperties
in class unit
dialogOwner
- The frame that will own this dialog.protected void collectFromScript() throws java.lang.Exception
java.lang.Exception
- When missing locationpublic unitPage findPageByName(java.lang.String pagename)
If more than one match, the first found in a preorder traversel is returned
pagename
- The name of the page we are looking for
public unitPage findPageByPartialRef(java.lang.String path)
If more than one match, the first found in a preorder traversel is returned
path
- The part of path we are looking for
public indexTable getIndexTableByName(java.lang.String tabname)
tabname
- The name
public void registerIndexedWord(java.lang.String tabname, java.lang.String word, unitPage page, java.lang.String fragment)
tabname
- The name of the indextableword
- The wordpage
- The pagefragment
- The fragmentprotected void registerForSecondPhase(unitPage p)
p
- The unitPage object that is registeredpublic boolean buildForced(javax.swing.JProgressBar pBar, java.util.Vector units)
All pages are assembled from scratch. All content units are reloaded and all PI's on pages are reevaluated
units
- the pages to build, null is all pagespBar
- The progressBar to update
public boolean buildUpdated(javax.swing.JProgressBar pBar, java.util.Vector buildList)
pBar
- The progress bar that is updated, may be nullbuildList
- All pages regardless of group which are candidates for building
public boolean prepare(unit p, java.lang.String theCommonName, java.lang.String theCommonValue)
prepare
in class unit
p
- The unit that will use this unit as content, may be nulltheCommonName
- The name used for common resources in the materialtheCommonValue
- The value that we will use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |