wxtpages
Class unitContent

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended bywxtpages.unit
          extended bywxtpages.unitContent
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class unitContent
extends unit

unitContent instances holds pieces of content that will be placed in templates to form a page. An instance of unitContent may or may not match a content element in the script.

See Also:
Serialized Form

Field Summary
 
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
unitContent(unitGroup master, org.w3c.dom.Element elt, unit owner)
          Creates a new instance of unitContent, as it appears in the script
unitContent(unitGroup master, java.lang.String loc, unit owner)
          Creates a new instance of unitContent based on PI:import
 
Method Summary
 org.w3c.dom.NodeList getNodeList(command cmd)
          Get a list of nodes according to the xpath specifyed in cmd
 boolean prepare(unit p, java.lang.String theCommonName, java.lang.String theCommonValue)
          Prepare this unitContent with imports from non-content files.
 
Methods inherited from class wxtpages.unit
addTransformationParameters, browseUnit, build, calculateAbsoluteAddress, controlLinks, correctAllAddressingInDocument, correctAllAddressingInFragment, correctOneCommonLink, correctStyleAttributes, correctStyleElements, correctStyleString, displayProperties, editUnit, establishDom, getAbsoluteUri, getAbsoluteUriAsString, getAsText, getDescription, getDoc, getDocCopy, getEncoding, getFileName, getName, getOption, getOptions, getOriginalAsString, getOriginalUri, getProperties, getReporter, getTransformation, getTransformationAsString, getTransformationID, getTransformationParameterMap, getType, getURItoAsString, isSameAs, isUpdatedAfterUse, killDocument, loadAsText, makeComment, makeImageRefToPage, makeRefToPage, saveFromDOM, setEncoding, setNowAsLastTimeUsed, setReporter, setTransformationFromString, setTransformationId, setUpPopMenu, toString
 
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
 

Constructor Detail

unitContent

public unitContent(unitGroup master,
                   org.w3c.dom.Element elt,
                   unit owner)
            throws java.lang.Exception
Creates a new instance of unitContent, as it appears in the script

Parameters:
master - The unitGroup object that owns this content object
elt - The element in the script that defines this unitContent object
owner - The unit that owns this unitContent, normally a unitPage-object
Throws:
java.lang.Exception - when the object cannot be established

unitContent

public unitContent(unitGroup master,
                   java.lang.String loc,
                   unit owner)
            throws java.lang.Exception
Creates a new instance of unitContent based on PI:import

Parameters:
master - The unitGroup object that owns this content object
loc - Where the unitContent object is stored
owner - The unit that owns this unitContent, normally a unitPage-object
Throws:
java.lang.Exception - when the object cannot be established
Method Detail

prepare

public boolean prepare(unit p,
                       java.lang.String theCommonName,
                       java.lang.String theCommonValue)
Prepare this unitContent with imports from non-content files. Does necessary address calculations. Calls super (unit) prepare

Overrides:
prepare in class unit
Parameters:
p - The unit that will use this unit as content, may not be null
theCommonName - The name used for common resources in the material
theCommonValue - The value that we will use
Returns:
false if a fatal error occurs during preparation, true otherwise

getNodeList

public org.w3c.dom.NodeList getNodeList(command cmd)
Get a list of nodes according to the xpath specifyed in cmd

Overrides:
getNodeList in class unit
Parameters:
cmd - The command that controls the listproduction
Returns:
a list of all elements collected from this unitContent