wxtpages
Class unitTransformation

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

public class unitTransformation
extends unit

Objects of this type administrates a transformation (XSLT) file.

See Also:
Serialized Form

Field Summary
protected  java.util.HashMap m_optionMap
          options for the transformation, according to http://www.w3.org/TR/xslt#output
 
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_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
unitTransformation(unitGroup master, org.w3c.dom.Element elt)
          Creates a new instance of unitTransformation
unitTransformation(unitGroup master, java.lang.String name, java.lang.String location)
          Creates a new instance of unitTransformation
 
Method Summary
 java.util.HashMap getOptions()
          Get the options
 java.util.HashMap getParameters()
          Get the parameters
 unitTransformation getTransformation()
          Get the transformation for this transformation
 java.lang.String getTransformationID()
          Get the ID for this transformation
 boolean prepare(unit p, java.lang.String theCommonName, java.lang.String theCommonValue)
          Prepare this unittransformation 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, getNodeList, getOption, getOriginalAsString, getOriginalUri, getProperties, getReporter, getTransformationAsString, 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
 

Field Detail

m_optionMap

protected java.util.HashMap m_optionMap
options for the transformation, according to http://www.w3.org/TR/xslt#output

Constructor Detail

unitTransformation

public unitTransformation(unitGroup master,
                          org.w3c.dom.Element elt)
                   throws java.lang.Exception
Creates a new instance of unitTransformation

Parameters:
master - The unitGroup object that owns this unit
elt - The script node that defines this transformation
Throws:
java.lang.Exception - when we cannot establish the object

unitTransformation

public unitTransformation(unitGroup master,
                          java.lang.String name,
                          java.lang.String location)
                   throws java.lang.Exception
Creates a new instance of unitTransformation

Parameters:
name - The name, ID, of the transformation as given in the script
location - The location of the transformation file
master - The unitGroup object that owns this unit
Throws:
java.lang.Exception - when we cannot establish the object
Method Detail

getTransformationID

public java.lang.String getTransformationID()
Get the ID for this transformation

Overrides:
getTransformationID in class unit
Returns:
the Id that defines this transformation

getTransformation

public unitTransformation getTransformation()
Get the transformation for this transformation

Overrides:
getTransformation in class unit
Returns:
null, allways since a transformation can have no transformation

getParameters

public java.util.HashMap getParameters()
Get the parameters

Returns:
The HashMap with all parameter name- value pairs. These are the parameters set in the script only. Parameters set on usage, T(), are the responsibility of the user.

getOptions

public java.util.HashMap getOptions()
Get the options

Overrides:
getOptions in class unit
Returns:
The HashMap with all option name- value pairs

prepare

public boolean prepare(unit p,
                       java.lang.String theCommonName,
                       java.lang.String theCommonValue)
Prepare this unittransformation with imports from non-content files. Does nothing since such import is not available.

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