Package org.cip4.jdflib.core
Class XMLDocUserData
java.lang.Object
org.cip4.jdflib.core.XMLDocUserData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEnumeration of various policies -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear the vector of all IDs of elements that are dirtyvoidclear the map of all targetsvoidclear the map of all targetsget a vector of all IDs of elements that are dirtyget the vector of dirty XPathsstatic booleanget the status of the caching method for idsGet the target with ID=strIDReturn 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).booleanis target cashing enabledbooleanchecks wheter the node withstrIDis dirtybooleanchecks ifelementis dirtyvoidremoveTarget(String id) remove the target id from the target listvoidremoveTarget(KElement targetElement) remove the KElement from the target listvoidSet the dirty policy to dirtPolstatic voidsetIDCache(boolean bCache) switch on or off the caching method for idsvoidSet the target to targetvoidsetUserData(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 Details
-
XMLDocUserData
constructor- Parameters:
parent-
-
-
Method Details
-
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
Set the dirty policy to dirtPol- Parameters:
dirtPol- the dirtyPolicy to set
-
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
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
get a vector of all IDs of elements that are dirty- Returns:
- vKString - the vector of element IDs
-
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
checks ifelementis dirty- Parameters:
element- element to check- Returns:
- true, if
elementis dirty
-
isDirty
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
Set the target to target- Parameters:
targetElement- the target elementid-
-
removeTarget
remove the KElement from the target list- Parameters:
targetElement- the element to remove
-
removeTarget
remove the target id from the target list- Parameters:
id- the target element id
-
getTarget
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
- Returns:
-