|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.core.XMLDocUserData
public class XMLDocUserData
| Nested Class Summary | |
|---|---|
static class |
XMLDocUserData.EnumDirtyPolicy
Enumeration of various policies |
| Field Summary | |
|---|---|
private XMLDocUserData.EnumDirtyPolicy |
dirtyPolicy
|
private java.util.HashMap<java.lang.String,KElement> |
m_mapTarget
map of ID KElement pairs |
private DocumentJDFImpl |
m_Parent
|
private java.lang.Object |
m_userData
additional userdata that is attached by applications |
private VString |
m_vDirtyID
vKString vDirtyID the vector of dirty IDs |
private static boolean |
useIDCache
|
| Constructor Summary | |
|---|---|
XMLDocUserData(DocumentJDFImpl parent)
constructor |
|
| Method Summary | |
|---|---|
void |
clearDirtyIDs()
clear the vector of all IDs of elements that are dirty |
void |
clearTargets()
clear the map of all targets |
void |
fillIDCache()
clear the map of all targets |
private void |
fillIDCache(KElement root)
|
VString |
getDirtyIDs()
get a vector of all IDs of elements that are dirty |
java.lang.Object |
getDirtyPolicy()
|
VString |
getDirtyXPaths()
get the vector of dirty XPaths |
boolean |
getIDCache()
get the status of the caching method for ids |
KElement |
getTarget(java.lang.String strID)
Get the target with ID= strID |
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 function JDFDoc::SetUserData(p). |
boolean |
hasTargetCache()
is target cashing enabled |
boolean |
isDirty(KElement element)
checks if element is dirty |
boolean |
isDirty(java.lang.String strID)
checks wheter the node with strID is dirty |
void |
removeTarget(KElement targetElement)
remove the KElement from the target list |
void |
removeTarget(java.lang.String id)
remove the target id from the target list |
(package private) VString |
setDirty(KElement e,
boolean bAttribute)
add string id uniquely to the vector of dirty ids |
void |
setDirtyPolicy(XMLDocUserData.EnumDirtyPolicy dirtPol)
Set the dirty policy to dirtPol |
void |
setIDCache(boolean bCache)
switch on or off the caching method for ids |
void |
setTarget(KElement targetElement,
java.lang.String id)
Set the target to target |
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 function DOM_Node::getUserData(p). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.Object m_userData
private static boolean useIDCache
private final VString m_vDirtyID
private final DocumentJDFImpl m_Parent
private final java.util.HashMap<java.lang.String,KElement> m_mapTarget
private XMLDocUserData.EnumDirtyPolicy dirtyPolicy
| Constructor Detail |
|---|
public XMLDocUserData(DocumentJDFImpl parent)
parent - | Method Detail |
|---|
public void setIDCache(boolean bCache)
bCache - if true, the ids will be cachedpublic boolean getIDCache()
public boolean hasTargetCache()
public void setDirtyPolicy(XMLDocUserData.EnumDirtyPolicy dirtPol)
dirtPol - the dirtyPolicy to setpublic java.lang.Object getUserData()
JDFDoc::SetUserData(p).
public void setUserData(java.lang.Object objUserData)
DOM_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.
objUserData - the user data to be kept with the node.public VString getDirtyIDs()
public VString getDirtyXPaths()
public void clearDirtyIDs()
VString setDirty(KElement e,
boolean bAttribute)
e - the element to be added to the dirty listbAttribute - if true, only attributes are dirty, else also sub-elements
public boolean isDirty(KElement element)
element is dirty
element - element to check
element is dirtypublic boolean isDirty(java.lang.String strID)
strID is dirty
strID - the id of the node to be checked
strID is dirty
public void setTarget(KElement targetElement,
java.lang.String id)
targetElement - the target elementid - public void removeTarget(KElement targetElement)
targetElement - the element to removepublic void removeTarget(java.lang.String id)
id - the target element idpublic KElement getTarget(java.lang.String strID)
strID
strID - the id of the target to search
public void clearTargets()
public void fillIDCache()
private void fillIDCache(KElement root)
root - public java.lang.Object getDirtyPolicy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||