com.dat.cx
Class CxDataPort

java.lang.Object
  |
  +--com.dat.cx.CxComponent
        |
        +--com.dat.cx.CxPort
              |
              +--com.dat.cx.CxXmlPort
                    |
                    +--com.dat.cx.CxDataPort
All Implemented Interfaces:
CxExtendsListener, CxListener, CxPortInterface, CxSource, java.util.EventListener, com.d_a_t.expeval.ExpressionContext

public class CxDataPort
extends CxXmlPort

CxDataPort provides semantics for a data port component. A data port is an xml port providing access to and from selected portions of a stored document. The document is stored in its parent data manager object. A data port will be typed according to the type of xml document it can recieve.


Fields inherited from class com.dat.cx.CxComponent
compactDisplay, noHatDisplay, standardDisplay
 
Fields inherited from interface com.dat.cx.CxPortInterface
COMPOSITE, EVENT, INTERFACE, METHOD, PROVIDES, USES
 
Constructor Summary
CxDataPort()
          Default constructor
CxDataPort(java.lang.String name, boolean direction, java.lang.String dataPath, CxComponent type)
          Constructor
 
Method Summary
 void applyChildAttributes(CxComponent component, XSet currentDoc, java.lang.String dataPath)
           
 XSet export(XSet doc, CxProject project)
          Export the definition of this xml port (only this component)
 void exportInfo(com.dat.cx.exec.CxExecComponentInfo info)
          Export the definition of the component into a java serializable object.
 java.lang.String getDataPath()
           
 com.dat.cx.studio.CxCompDisplay getDisplay()
          Get the display peer for this port.
 void importInfo(com.dat.cx.exec.CxExecComponentInfo info)
          Import the definition of the component from a java serializable object.
 java.util.Vector importSpec(XSet spec)
          Import specification from an XML element
 void importTemplate(CxComponent from, boolean copy, boolean inherit, boolean inverse)
          Import the definition of an xml port from another xml port.
 boolean isDataPort()
          Determines if the component is a data port
 com.dat.cx.exec.CxExecComponentInfo makeInfo()
          Make an empty serializable object to hold the components definition.
 void sendDoc(CxEvent event)
          Send the doc referenced by this data port.
 void setDataPath(java.lang.String dataPath)
           
 
Methods inherited from class com.dat.cx.CxXmlPort
getDocType, getDocTypeProperty, getPortIcon, isValidEvent, isXmlPort, recieve, setDocType, setPortIcon
 
Methods inherited from class com.dat.cx.CxPort
addCxListener, getCxListeners, getEditFrame, getIcon, getPortDirection, hasCxListeners, inversePortDirection, isPort, removeCxListener, setPortDirection
 
Methods inherited from class com.dat.cx.CxComponent
activate, addChild, addChildAt, addChildAtNoUndo, addChildNoUndo, addChildNoUndoAssign, addComponentChangeListener, addComponentChildrenListener, addExtendsListener, addSortedChild, canAddComponent, canExtendsAdd, componentAdded, componentLocationChanged, componentNameChanged, componentNodeChanged, componentPropertyChanged, componentRemoved, componentWirePortChanged, constructNode, contains, deactivate, decrUnresolved, exportContent, findPath, findPath, getBaseType, getChild, getChild, getChildren, getClassClause, getConfig, getConfigValue, getConfigValue, getDataPath, getDataPort, getDisplayStyle, getExtendsFrom, getExtendsListeners, getImageIcon, getIndexOfChild, getInfo, getName, getNameInAncestor, getNameInContext, getNextChildTo, getNoChildren, getOwnerProject, getPackage, getPackage, getParent, getPort, getPropertyNames, getPropertyValues, getRoot, getRzChildren, getRzSortedChildren, getSortedChild, getSortedChildren, getSortedIndexOfChild, getViewFrame, getX, getXmlType, getY, handleException, hasChild, hasChild, hasChildren, hasDisplay, hasOverride, hasProperties, importContent, incrUnresolved, init, instantiateChildComponent, instantiateChildComponentAt, isActive, isAttribute, isAttributeInstance, isBaseProperty, isCompositeComponent, isConfiguration, isContentComponent, isDataMgr, isErrorCatchPort, isExtendable, isExtended, isInherited, isInterface, isLibraryComponent, isMiniPort, isName, isNative, isPackage, isPalette, isPin, isPortMgr, isProperty, isRoot, isSubPortOf, isTextInstance, isTypePackage, isVar, isVarInstance, isVarSet, isWire, isXmlPrimative, isXmlString, omitExport, removeChild, removeChild, removeChildNoUndo, removeComponentChangeListener, removeComponentChildrenListener, removeExtendsListener, renameSortedChild, resolveClass, resolveConstructor, resolveField, resolveMethod, setClassClause, setComponentDefinitionServer, setDisplayStyle, setDisplayStyleFromInfo, setExtendsFrom, setInherited, setLocation, setLocationNoUndo, setName, setNameNoTrigger, setNameNoUndo, setNative, setOwnerProject, setParent, setPropertyValues, setX, setY, toString, triggerExtendsNodeChanged
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CxDataPort

public CxDataPort()
Default constructor

CxDataPort

public CxDataPort(java.lang.String name,
                  boolean direction,
                  java.lang.String dataPath,
                  CxComponent type)
Constructor
Parameters:
name - the name for the port
dataPath - the path from its parents data manager to the data manager's variable or attribute that identifies the portion of a document on which the data port is the recieve or send data.
direction - the direction of the port, true for PROVIDES, false for USES
type - the type of the xml port
Method Detail

isDataPort

public boolean isDataPort()
Description copied from class: CxComponent
Determines if the component is a data port
Overrides:
isDataPort in class CxComponent
Following copied from class: com.dat.cx.CxComponent
Returns:
true if the component is a data port, otherwise false

importTemplate

public void importTemplate(CxComponent from,
                           boolean copy,
                           boolean inherit,
                           boolean inverse)
Import the definition of an xml port from another xml port.
Overrides:
importTemplate in class CxXmlPort
Parameters:
from - the xml port from which to import a definition
copy - indicate that this is a copy 'vs' extends
inherit - indicate that the definition is inherited as part of an extends
inverse - (not used)

importSpec

public java.util.Vector importSpec(XSet spec)
Import specification from an XML element
Overrides:
importSpec in class CxXmlPort
Parameters:
spec - the xml element containing the specification

export

public XSet export(XSet doc,
                   CxProject project)
Export the definition of this xml port (only this component)
Overrides:
export in class CxXmlPort
Parameters:
doc - the XSet document being constructed. The definition is added to this document
Returns:
the XSet document relative to the new definition

getDisplay

public com.dat.cx.studio.CxCompDisplay getDisplay()
Get the display peer for this port. The display peer handles the rendering of the port within the studio.
Overrides:
getDisplay in class CxPort
Returns:
the display peer

sendDoc

public void sendDoc(CxEvent event)
Send the doc referenced by this data port.

getDataPath

public java.lang.String getDataPath()

setDataPath

public void setDataPath(java.lang.String dataPath)

makeInfo

public com.dat.cx.exec.CxExecComponentInfo makeInfo()
Description copied from class: CxComponent
Make an empty serializable object to hold the components definition. This method should be overridden in any sub class of CxComponent where the definition of such component contains additional information not defined in CxComponent.
Overrides:
makeInfo in class CxPort
Following copied from class: com.dat.cx.CxComponent
Returns:
an empty serializable object which will hold the defintion of a component.

exportInfo

public void exportInfo(com.dat.cx.exec.CxExecComponentInfo info)
Description copied from class: CxComponent
Export the definition of the component into a java serializable object. This method should be overridden in any sub class of CxComponent where the definition of such component contains additional information not defined in CxComponent. The overridden method should call the superclass exportInfo method and then add in the additional information.
Overrides:
exportInfo in class CxPort
Following copied from class: com.dat.cx.CxComponent
Parameters:
info - the serializable object in which the definition of this component is to be stored.

importInfo

public void importInfo(com.dat.cx.exec.CxExecComponentInfo info)
Description copied from class: CxComponent
Import the definition of the component from a java serializable object. This method should be overridden in any sub class of CxComponent where the definition of such component contains additional information not defined in CxComponent. The overridden method should call the superclass importInfo method and then import the additional information.
Overrides:
importInfo in class CxPort
Following copied from class: com.dat.cx.CxComponent
Parameters:
info - the serializable object in which the definition of this component is stored.

applyChildAttributes

public void applyChildAttributes(CxComponent component,
                                 XSet currentDoc,
                                 java.lang.String dataPath)