Package org.cip4.jdflib.core
Class XMLDocUserData
- java.lang.Object
-
- org.cip4.jdflib.core.XMLDocUserData
-
public class XMLDocUserData extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXMLDocUserData.EnumDirtyPolicyEnumeration of various policies
-
Constructor Summary
Constructors Constructor Description XMLDocUserData(DocumentJDFImpl parent)constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearDirtyIDs()clear the vector of all IDs of elements that are dirtyvoidclearTargets()clear the map of all targetsvoidfillIDCache()clear the map of all targetsVStringgetDirtyIDs()get a vector of all IDs of elements that are dirtyjava.lang.ObjectgetDirtyPolicy()VStringgetDirtyXPaths()get the vector of dirty XPathsstatic booleangetIDCache()get the status of the caching method for idsKElementgetTarget(java.lang.String strID)Get the target with ID=strIDjava.lang.ObjectgetUserData()Return the documents user data pointer.
User data allows application programs to attach extra data to JDF Documents and can be set using the functionJDFDoc::SetUserData(p).booleanhasTargetCache()is target cashing enabledbooleanisDirty(java.lang.String strID)checks wheter the node withstrIDis dirtybooleanisDirty(KElement element)checks ifelementis dirtyvoidremoveTarget(java.lang.String id)remove the target id from the target listvoidremoveTarget(KElement targetElement)remove the KElement from the target listvoidsetDirtyPolicy(XMLDocUserData.EnumDirtyPolicy dirtPol)Set the dirty policy to dirtPolstatic voidsetIDCache(boolean bCache)switch on or off the caching method for idsvoidsetTarget(KElement targetElement, java.lang.String id)Set the target to targetvoidsetUserData(java.lang.Object objUserData)Set the user data for a document.
User data allows application programs to attach extra data to DOM nodes, and can be retrieved using the functionDOM_Node::getUserData(p).
-
-
-
Constructor Detail
-
XMLDocUserData
public XMLDocUserData(DocumentJDFImpl parent)
constructor- Parameters:
parent-
-
-
Method Detail
-
setIDCache
public static void setIDCache(boolean bCache)
switch on or off the caching method for ids- Parameters:
bCache- if true, the ids will be cached
-
getIDCache
public static boolean getIDCache()
get the status of the caching method for ids- Returns:
- if true, the ids will be cached
-
hasTargetCache
public boolean hasTargetCache()
is target cashing enabled- Returns:
- true if cashing is enabled
-
setDirtyPolicy
public void setDirtyPolicy(XMLDocUserData.EnumDirtyPolicy dirtPol)
Set the dirty policy to dirtPol- Parameters:
dirtPol- the dirtyPolicy to set
-
getUserData
public java.lang.Object getUserData()
Return the documents user data pointer.
User data allows application programs to attach extra data to JDF Documents and can be set using the functionJDFDoc::SetUserData(p).- Returns:
- The user data pointer.
-
setUserData
public void setUserData(java.lang.Object objUserData)
Set the user data for a document.
User data allows application programs to attach extra data to DOM nodes, and can be retrieved using the functionDOM_Node::getUserData(p).Deletion of the user data remains the responsibility of the application program; it will not be automatically deleted when the nodes themselves are reclaimed.
Because DOM_Node is not designed to be subclassed, userdata provides an alternative means for extending the information kept with nodes by an application program.
- Parameters:
objUserData- the user data to be kept with the node.
-
getDirtyIDs
public VString getDirtyIDs()
get a vector of all IDs of elements that are dirty- Returns:
- vKString - the vector of element IDs
-
getDirtyXPaths
public VString getDirtyXPaths()
get the vector of dirty XPaths- Returns:
- VString - vector of dirty XPaths
-
clearDirtyIDs
public void clearDirtyIDs()
clear the vector of all IDs of elements that are dirty
-
isDirty
public boolean isDirty(KElement element)
checks ifelementis dirty- Parameters:
element- element to check- Returns:
- true, if
elementis dirty
-
isDirty
public boolean isDirty(java.lang.String strID)
checks wheter the node withstrIDis dirty- Parameters:
strID- the id of the node to be checked- Returns:
- bool true if the node with ID=
strIDis dirty
-
setTarget
public void setTarget(KElement targetElement, java.lang.String id)
Set the target to target- Parameters:
targetElement- the target elementid-
-
removeTarget
public void removeTarget(KElement targetElement)
remove the KElement from the target list- Parameters:
targetElement- the element to remove
-
removeTarget
public void removeTarget(java.lang.String id)
remove the target id from the target list- Parameters:
id- the target element id
-
getTarget
public KElement getTarget(java.lang.String strID)
Get the target with ID=strID- Parameters:
strID- the id of the target to search- Returns:
- KElement target the target element
-
clearTargets
public void clearTargets()
clear the map of all targets
-
fillIDCache
public void fillIDCache()
clear the map of all targets
-
getDirtyPolicy
public java.lang.Object getDirtyPolicy()
- Returns:
-
-