public class JDFElement extends KElement
| Modifier and Type | Class and Description |
|---|---|
static class |
JDFElement.EnumBoolean
Boolean Enumeration from JDF Spec Orientation of a physical resource.
|
static class |
JDFElement.EnumNamedColor
Colors of preprocessed products such as Wire-O binders and cover leaflets.
|
static class |
JDFElement.EnumNodeStatus
Enumeration of valid nodestatus types Identifies the status of the node.
|
static class |
JDFElement.EnumOrientation
Orientation Enumeration
Orientation of a physical resource. |
static class |
JDFElement.EnumPoolType
Enumeration of various pool types
|
static class |
JDFElement.EnumSeparation
Separation Enumeration identifies the separation name.
|
static class |
JDFElement.EnumSettingsPolicy
The policy for this element indicates what happens when unsupported settings, (i.e., subelements, attributes or attribute values), are present in the element.
|
static class |
JDFElement.EnumValidationLevel
Enumeration for validation level
level ValidationLevel_NoWarnIncomplete: Ignore warnings and don't require all required parameters level ValidationLevel_NoWarnComplete: Ignore warnings and require all required parameters level ValidationLevel_Incomplete: incomplete elements are valid level ValidationLevel_Complete: full validation of an individual resource level ValidationLevel_RecursiveIncomplete: incomplete validation of an individual resource and all of its child elements - e.g. |
static class |
JDFElement.EnumVersion
Enumeration strings for Version
NOTE: If not specified the version defaults to Version 1.3
|
static class |
JDFElement.EnumXYRelation
XYRelation Enumeration
XML attributes of type XYRelation define the relationship between two ordered numbers. |
KElement.SimpleElementNameComparator, KElement.SimpleNodeComparator, KElement.SingleAttributeComparator, KElement.SingleXPathComparatorfirstChild, fNodeListCache, ownerDocumentDOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODEATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
java.lang.String qualifiedName)
Constructor for JDFElement
|
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
java.lang.String myNamespaceURI,
java.lang.String qualifiedName)
Constructor for JDFElement
|
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
java.lang.String myNamespaceURI,
java.lang.String qualifiedName,
java.lang.String myLocalName)
Constructor for JDFElement
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
appendAnchor(java.lang.String strName)
create and append a unique id, keep the existing one if it already exists
|
void |
appendBestEffortExceptions(java.lang.String value)
Append a token to attribute BestEffortExceptions
|
JDFComment |
appendComment()
Appends element Comment to the end of 'this'
|
KElement |
appendElement(java.lang.String elementName,
java.lang.String nameSpaceURI) |
JDFGeneralID |
appendGeneralID()
append an empty GeneralID
|
JDFGeneralID |
appendGeneralID(java.lang.String idUsage,
java.lang.String idValue)
append a GeneralID with idValue, duplicate entries are retained generalID elements are always placed first and new GeneralID elements are appended at the end of the list
|
JDFGeneralID |
appendGeneralID(java.lang.String idUsage,
java.lang.String idValue,
JDFAutoGeneralID.EnumDataType namedfeature)
append a GeneralID with idValue, duplicate entries are retained generalID elements are always placed first and new GeneralID elements are appended at the end of the list
|
JDFElement |
appendHRef(JDFResource target,
java.lang.String refAttribute,
java.lang.String preSet)
append a reference to a target node automatically generate a unique ID attribute for target, if it does not exist
|
JDFElement |
appendHRef(java.lang.String idRef,
java.lang.String refAttribute,
java.lang.String nameSpaceURI)
append a reference with a specific id
|
void |
appendMustHonorExceptions(java.lang.String value)
Append a token to attribute MustHonorExceptions
|
void |
appendOperatorInterventionExceptions(java.lang.String value)
Append a token to attribute OperatorInterventionExceptions
|
JDFPreview |
appendPreview()
Appends element JDFPreview to the end of 'this'
|
void |
appendrRefs(java.lang.String value)
Deprecated.
rRefs was deprecated in JDF 1.2
|
AttributeInfo.EnumAttributeType |
attributeType(java.lang.String attributeName)
Returns the type of the given attribute for the latest JDF version.
|
protected void |
clearTargets() |
KElement |
cloneNewDoc()
same as @see clone but the clone is in a new document
|
void |
copyChildren(java.lang.String elementName,
KElement src) |
KElement |
copyInto(KElement src,
boolean bRemove)
copies a node into this, ignoring identical node names i.e.
|
static JDFElement |
createRoot(java.lang.String nodename)
create a new root document
|
static JDFElement |
createRoot(java.lang.String nodename,
JDFElement.EnumVersion v)
create a new root document
|
VString |
deprecatedAttributes()
list of all deprecated attributes.
|
void |
eraseDefaultAttributes(boolean bRecurse)
remove all default attributes from this i.e.
|
boolean |
exclusiveOneOfAttribute(JDFElement.EnumValidationLevel level,
java.lang.String att1,
java.lang.String att2,
java.lang.String att3,
java.lang.String att4)
return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level
|
boolean |
exclusiveOneOfElement(JDFElement.EnumValidationLevel level,
java.lang.String elm1,
java.lang.String ns1,
java.lang.String elm2,
java.lang.String ns2)
return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level
|
boolean |
fixVersion(JDFElement.EnumVersion version)
Mother of all version fixing routines
uses heuristics to modify this element and its children to be compatible with a given version in general, it will be able to move from low to high versions but potentially
fail when attempting to move from higher to lower versions
|
java.util.HashSet<JDFElement> |
getAllRefs(java.util.HashSet<JDFElement> vDoneRefs,
boolean bRecurse)
Gets inter-resource linked resource IDs
|
AttributeInfo.EnumAttributeType |
getAtrType(java.lang.String attributeName)
returns the data type of a given attribute
|
AttributeInfo |
getAttributeInfo()
public version of getTheAttributeInfo
|
java.lang.String |
getBestEffortExceptions()
Gets the value of attribute BestEffortExceptions
|
JDFElement |
getChildElement(int n)
Deprecated.
use getElement(null, null ,n)
|
KElement[] |
getChildElements()
Deprecated.
use
KElement.getChildElementArray()not typesafe in case of elements in foreign namespaces note that this method previously returned JDFElement[] |
VElement |
getChildElementVector_JDFElement(java.lang.String nodeName,
java.lang.String nameSpaceURI,
JDFAttributeMap mAttrib,
boolean bAnd,
int maxSize,
boolean bResolveTarget) |
VElement |
getChildElementVector(java.lang.String nodeName,
java.lang.String nameSpaceURI,
JDFAttributeMap mAttrib,
boolean bAnd,
int maxSize,
boolean bResolveTarget)
Get all children from the actual element matching the given conditions
does NOT get refElement targets although the attributes are checked in the target elements in case of refElements |
VString |
getChildIds(java.lang.String attrib,
java.lang.String element,
java.lang.String nameSpaceURI)
GetChildIds - get a set of all known id's in child nodes
|
VElement |
getChildrenByTagName(java.lang.String elementName,
java.lang.String nameSpaceURI,
JDFAttributeMap mAttrib,
boolean bDirect,
boolean bAnd,
int maxSize)
Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodes |
VElement |
getChildrenByTagName(java.lang.String elementName,
java.lang.String nameSpaceURI,
JDFAttributeMap mAttrib,
boolean bDirect,
boolean bAnd,
int maxSize,
boolean bFollowRefs)
Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodes |
KElement |
getChildWithAttribute(java.lang.String nodeName,
java.lang.String attName,
java.lang.String nameSpaceURI,
java.lang.String attVal,
int index,
boolean bDirect)
GetChildWithAttribute - Get a child with matching attributes
|
JDFElement |
getChildWithMatchingAttribute(java.lang.String nodeName,
java.lang.String attName,
java.lang.String nameSpaceURI,
java.lang.String attVal,
int index,
boolean bDirect,
AttributeInfo.EnumAttributeType dataType)
Gets a child with matching attributes, also follows refelements
|
JDFComment |
getComment(int iSkip)
Gets the iSkip-th element Comment
|
JDFComment |
getComment(java.lang.String _name,
int index)
Gets the Comment with a given @Name
|
java.lang.String |
getCommentText(java.lang.String _name,
int index)
Gets the Comment with a given @Name
|
java.lang.String |
getCommentURL()
Get string attribute CommentURL
|
JDFComment |
getCreateComment(int iSkip)
Gets the iSkip-th element Comment.
|
JDFComment |
getCreateComment(java.lang.String _name,
int index)
Gets the Comment with a give @Name
|
KElement |
getCreateElement_JDFElement(java.lang.String nodeName,
java.lang.String nameSpaceURI,
int iSkip)
Gets the iSkip-th child node with matching nodeName and nameSpaceURI, optionally creates it if it doesn't exist.
|
JDFPreview |
getCreatePreview(int iSkip)
Gets the iSkip-th element JDFPreview.
|
JDFRefElement |
getCreateRefElement(JDFResource target)
gets an inter resource link to a target resource., creates it if it does not exist
|
protected static KElement |
getDeepElementByID(KElement base,
java.lang.String attName,
java.lang.String id,
KElement childToExclude,
XMLDocUserData ud)
this is an optimized version of GetDeepElement() which returns a complete list of elements.
|
JDFAttributeMap |
getDefaultAttributeMap()
map of all defaults from the schema
|
static JDFElement.EnumVersion |
getDefaultJDFVersion()
returns the JDFElement::EnumVersion, where new elements will be generated in by default
|
VString |
getDeprecatedAttributes(int nMax)
This function first, gets all deprecated attributes
|
VString |
getDeprecatedElements(int nMax)
Vector of deprecated elements below the current element.
|
java.lang.String |
getDescriptiveName()
Get string attribute DescriptiveName
|
KElement |
getElement_JDFElement(java.lang.String nodeName,
java.lang.String nameSpaceURI,
int iSkip)
same as KElement.GetElement, but follows references as well.
Thus the returned value is the target of the refElement unless the requested element is explicitely a refElement, which is specified by requesting an element with nodeName="XXXRef". Invalid refelements are simply skipped and are not filled into the vector |
KElement |
getElement(java.lang.String nodeName,
java.lang.String nameSpaceURI,
int iSkip)
Gets an existing iSkip-th child node with matching nodeName and nameSpaceURI
|
java.lang.String |
getElementIDPrefix()
get Element ID prefix
|
ElementInfo |
getElementInfo() |
VString |
getElementNameVector()
Returns a vector which contains the childs of the actual element.
|
int |
getEnumAttribute(java.lang.String key,
java.util.Vector v,
java.lang.String nameSpaceURI,
int def,
boolean bInherit)
Deprecated.
use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)
|
java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> |
getEnumerationsAttribute(java.lang.String key,
java.lang.String nameSpaceURI,
org.apache.commons.lang.enums.ValuedEnum enu,
boolean bInherit)
defines an enumerated list of attributes; used by the automated code generator
|
java.util.Vector |
getEnumerationsAttribute(java.lang.String key,
java.util.Vector v,
java.lang.String nameSpaceURI,
int def,
boolean bInherit)
Deprecated.
use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)
|
org.apache.commons.lang.enums.ValuedEnum |
getEnumforAttribute(java.lang.String key)
Get the ValuedEnum for an enumerated attribute
|
int |
getEnumNodeName(java.util.Vector allowedValues)
Deprecated.
|
java.lang.String |
getEnumString(int value,
java.lang.String allowedValues)
Deprecated.
use EnumXYZ.getEnum(int)
|
JDFElement.EnumVersion |
getFirstVersion(java.lang.String eaName,
boolean bElement)
get the first JDF version where attribute name or element name is valid
|
JDFGeneralID |
getGeneralID(int i)
gets attribute GeneralID
|
java.lang.String |
getGeneralID(java.lang.String idUsage)
Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists
|
java.lang.String |
getGeneralID(java.lang.String idUsage,
int iPos)
Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists
|
ListMap<java.lang.String,JDFGeneralID> |
getGeneralIDListMap()
Gets a map of all GeneralID key-value Pair lists if multiple generalIDs with the same IDUsage are specified, each GeneralID is added to the VectorMap
|
JDFAttributeMap |
getGeneralIDMap()
Gets a map of all GeneralID key-value Pairs if multiple generalIDs with the same IDUsage are specified, the last one is added to the map
|
VectorMap<java.lang.String,JDFGeneralID> |
getGeneralIDVectorMap()
Deprecated.
|
java.lang.String |
getHRef()
Deprecated.
use getrRef of the coresponding sub classes instead
|
VString |
getHRefs(VString vDoneRefs,
boolean bRecurse)
Deprecated.
use getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)
|
VString |
getHRefs(VString vDoneRefs,
boolean bRecurse,
boolean bExpand)
GetHRefs - get inter-resource linked resource IDs
|
VString |
getInsertElements()
Get a vector of direct child element names that exist but are unknown in this element.
|
VString |
getInsertElementVector(VString vKnownKeys,
VString vUnique)
get a
vString vector of direct child element names that may be inserted in this element. |
VString |
getInvalidAttributes(JDFElement.EnumValidationLevel level,
boolean bIgnorePrivate,
int nMax)
get invalid attributes
|
VString |
getInvalidElements_JDFElement(JDFElement.EnumValidationLevel level,
boolean bIgnorePrivate,
int nMax)
Method GetInvalidElements_JDFElement.
|
VString |
getInvalidElements(JDFElement.EnumValidationLevel level,
boolean bIgnorePrivate,
int nMax)
get invalid elements
|
JDFNode |
getJDFRoot()
Get the JDF root
|
JDFJMF |
getJMFRoot()
Get the JMF root
|
JDFElement.EnumVersion |
getLastVersion(java.lang.String eaName,
boolean bElement)
get the last JDF version where attribute name or element name is valid
|
protected JDFResource |
getLinkFromUserData(java.lang.String myid) |
JDFResource |
getLinkRoot(java.lang.String id)
Gets the root resource of the target returns a null JDFElement if it does not exist or the name mangling is illegal
|
JDFElement.EnumVersion |
getMaxVersion(boolean bInherit)
get attribute MaxVersion, defaults to version if not set
|
VString |
getMissingAttributes(int nMax)
This function first, gets all required attributes and then compare them with the attributes present and returns a Vector with the missing attributes
|
VString |
getMissingAttributeVector(VString vReqKeys,
int nMax)
checks if the curent element has other attributes then also present in vReqKeys.
|
VString |
getMissingElements(int nMax)
get the missing elements as a vector
|
VString |
getMissingElementVector(VString vRequiredKeys,
int nMax)
Returns a vector with missing elements
|
java.lang.String |
getMustHonorExceptions()
gets the value of attribute MustHonorExceptions
|
VString |
getNamesVector(java.lang.String key)
Get the vector of valid attribute values for an enumerated attribute
|
java.lang.String |
getOperatorInterventionExceptions()
gets the value of attribute OperatorInterventionExceptions
|
JDFDoc |
getOwnerDocument_JDFElement()
Get the document object that owns this
|
JDFNode |
getParentJDF()
get the local JDF node that this element resides in
if this is a JDF node, return it's parent if this is the root JDF node, return a null reference |
static JDFNode |
getParentJDF(KElement e)
static version of GetParentJDF - get the local JDF node that this element resides in.
|
protected JDFAttributeMap |
getPartMap()
gets the part map
|
protected JDFAttributeMapArray |
getPartMapArray()
GetPartMapVector returns a vector of partmaps, null if no parts are present
|
protected VJDFAttributeMap |
getPartMapVector()
GetPartMapVector returns a vector of partmaps, null if no parts are present
|
VString |
getPrereleaseAttributes(int nMax)
This function first, gets all prerelease attributes It ignores any atrributes that have been added by a schema parser
|
VString |
getPrereleaseElements(int nMax)
Comma separated list of all prerelease elements.
|
JDFPreview |
getPreview(int iSkip)
Gets the iSkip-th element Comment
|
JDFRefElement |
getRefElement(JDFResource target)
gets an inter resource link to a target resource.
|
VElement |
getRefElements()
gets the vector of all RefElements
|
protected java.lang.String |
getRefString()
Get the string of a refelement that points to this, i.e.NodeName+"Ref"
|
VString |
getrRefs()
Deprecated.
rRefs was deprecated in JDF 1.2
|
static java.lang.String |
getSchemaURL()
returns the official JDF schema URI for a particular version fool proof schema url as of November 5th, 2003
|
static java.lang.String |
getSchemaURL(int majorVersion,
int minorVersion) |
static java.lang.String |
getSchemaURL(JDFElement.EnumVersion version)
get the schemaURL based on a version
|
JDFElement.EnumSettingsPolicy |
getSettingsPolicy(boolean bInherit)
Typesafe enumerated attribute SettingsPolicy
|
JDFElement.EnumNodeStatus |
getStatus()
gets the value of attribute Status
|
KElement |
getTarget_JDFElement(java.lang.String id,
java.lang.String attrib)
Gets the target of link.
|
JDFResource |
getTarget()
Deprecated.
use the respective subclasses getTarget functions
|
KElement |
getTarget(java.lang.String id,
java.lang.String attrib)
looking for a specified target with an id, e.g.
|
protected AttributeInfo |
getTheAttributeInfo_JDFElement() |
protected AttributeInfo |
getTheAttributeInfo() |
protected ElementInfo |
getTheElementInfo_JDFElement() |
protected ElementInfo |
getTheElementInfo() |
org.apache.commons.lang.enums.ValuedEnum |
getTypeForAttribute(java.lang.String key)
Get the EnumAttributeType for an attribute
|
VString |
getUnknownAttributes(boolean bIgnorePrivate,
int nMax)
Get the unknown attributes
|
VString |
getUnknownAttributeVector(VString vKnownKeys,
VString vInNameSpace,
int nMax)
Gets the unknown attributes
|
VString |
getUnknownElements(boolean bIgnorePrivate,
int nMax)
Get a vector with the unknown elements
|
VString |
getUnknownElementVector(VString vKnownKeys,
VString vInNameSpace,
int nMax)
Get a vector with the unknown elements
|
protected VString |
getUnknownPoolElements(JDFElement.EnumPoolType poolType,
int nMax)
get unknown elements for a specific pool
|
protected JDFDoc |
getURLDoc(java.lang.String url)
returns the jdf doc referenced by url
|
protected java.io.InputStream |
getURLInputStream(java.lang.String url)
get the input stream that reads from URL
|
static java.lang.String |
getValueForNewAttribute(KElement ke,
java.lang.String attName)
gets a reasonable value for an attribute
|
JDFElement.EnumVersion |
getVersion()
Deprecated.
060505 use getVersion(boolean);
|
JDFElement.EnumVersion |
getVersion(boolean bInherit)
get the version of this element
|
VElement |
getvHRefRes(boolean bRecurse)
Deprecated.
use getvHRefRes(true,false);
|
VElement |
getvHRefRes(boolean bRecurse,
boolean bExpand)
get inter-resource linked resource vector
|
protected XMLDocUserData |
getXMLDocUserData()
get/create the associated XMLDocUserData
|
boolean |
hasMissingAttributes()
Checks, if this has any missing attributes
|
boolean |
hasMissingElements()
Tests, whether 'this' has any missing direct child elements
|
protected boolean |
hasPartMap(JDFAttributeMap mPart)
checks whether the part defined in mPart is included in this
|
boolean |
hasSettingsPolicy(boolean bInherit)
Deprecated.
use hasAttribute
|
boolean |
hasUnknownAttributes(boolean bIgnorePrivate)
Checks, if this has are any unknown attributes
|
boolean |
hasUnknownElements(boolean bIgnorePrivate)
Tests, whether 'this' has any unknown direct child elements
|
java.lang.String |
idString(int id)
Deprecated.
060307 internal legacy method
|
boolean |
includesMatchingAttribute(java.lang.String attName,
java.lang.String attVal,
AttributeInfo.EnumAttributeType dataType)
test whether the attributes described by attName and attVal exist |
boolean |
init()
Method init.
|
void |
inlineRefElements(java.lang.String nodeName,
java.lang.String nameSpaceURI,
boolean bDirect)
inline refelements that match nodename and nameSpaceURI
|
KElement |
insertBefore(java.lang.String elementName,
org.w3c.dom.Node beforeChild,
java.lang.String nameSpaceURI)
Inserts the Element elementName before the existing Element node beforeChild.
|
boolean |
isComment()
Deprecated.
use instanceof JDFResourceLink instead
|
static boolean |
isCommentStatic(KElement kElem)
Deprecated.
use instanceof JDFComment instead
|
boolean |
isDeprecated() |
boolean |
isDirty()
Get the dirty status of this element
|
static boolean |
isInAnyJDFNameSpaceStatic(KElement kElem)
checks whether kElem is in the JDF namespace
|
static boolean |
isInAnyJDFNameSpaceStatic(java.lang.String ns)
checks whether kElem is in the XJDF or the JDF namespace
|
boolean |
isInJDFNameSpace()
Deprecated.
- use isInJDFNameSpaceStatic(kElem)
|
static boolean |
isInJDFNameSpaceStatic(KElement kElem)
checks whether kElem is in the JDF namespace
|
static boolean |
isInJDFNameSpaceStatic(java.lang.String ns)
checks whether kElem is in the JDF namespace
|
static boolean |
isInXJDFNameSpaceStatic(KElement kElem)
checks whether kElem is in the JDF namespace
|
static boolean |
isInXJDFNameSpaceStatic(java.lang.String ns)
checks whether kElem is in the JDF namespace
|
boolean |
isJDFNode()
Deprecated.
use instanceof JDFNode instead
|
boolean |
isRefElement()
Deprecated.
use instanceof JDFRefElement
|
static boolean |
isRefElementStatic(KElement kElem)
Deprecated.
use instanceof JDFRefElement
|
boolean |
isResource()
Deprecated.
use instanceof JDFResource instead
|
boolean |
isResourceLink()
Deprecated.
use instanceof JDFResourceLink.IsResourceLink instead
|
static boolean |
isResourceLinkStatic(KElement kElem)
Deprecated.
use instanceof JDFResourceLink instead
|
static boolean |
isResourceStatic(KElement e)
Deprecated.
use instanceof JDFResource instead
|
boolean |
isResourceUpdate()
is this thing a ResourceUpdate?
|
boolean |
isValid_JDFElement(JDFElement.EnumValidationLevel level)
Mother of all validators; this method is for direct access to the JDFElement valid method and short-circuit all overriding virtual methods
|
boolean |
isValid(JDFElement.EnumValidationLevel level)
Mother of all validators
|
boolean |
isXJDF()
are we an XJDF or child of XJDF/XJMF
|
java.lang.String |
jdfVersion()
get the LDFLib version
|
VString |
knownAttributes()
KElement is generic, therefore the list is empty
|
VString |
knownElements()
Comma separated list of all known element names;
|
boolean |
matchesPath(java.lang.String path,
boolean bFollowRefs)
check whether this matches a simple xpath - note that references are NOT followed in case a node name is replaced with a "*"
|
java.lang.String |
newID(java.lang.String lastID)
gets a new ID for the element
|
int |
numChildElements_JDFElement(java.lang.String nodeName,
java.lang.String nameSpaceURI) |
int |
numChildElements(java.lang.String nodeName,
java.lang.String nameSpaceURI)
same as
KElement.numChildElements(String, String), but also follows references.Invalid refelements are simply skipped. |
VString |
optionalAttributes()
Comma separated list of all optional attributes.
|
VString |
optionalElements()
list of all optional element names; KElement is generic, therefore the list is empty
|
VString |
prereleaseAttributes()
Comma separated list of all deprecated attributes.
|
java.lang.String |
prereleaseElements()
comma separated list of all prerelease Elements that may occur in a future version
|
JDFRefElement |
refElement(JDFResource target)
Creates an inter resource link to a target resource.
note that if target is a subelement rather than a root resource, it WILL be promoted to root level (rSubRef is deprecated) |
void |
removeBestEffortExceptions()
Deprecated.
use removeAttribute
|
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node arg0) |
KElement |
removeChild(java.lang.String node,
java.lang.String nameSpaceURI,
int n)
remove child node
|
void |
removeChildren(java.lang.String nodeName,
java.lang.String nameSpaceURI,
JDFAttributeMap mAttrib)
Remove children that match nodeName and nameSpaceURI
|
void |
removeExtensions()
remove all private extensions form a jdf element and its children
|
void |
removeFromBestEffortExceptions(java.lang.String value)
Remove a token from attribute BestEffortExceptions
|
void |
removeFromMustHonorExceptions(java.lang.String value)
Remove a token from attribute MustHonorExceptions
|
void |
removeFromOperatorInterventionExceptions(java.lang.String value)
Remove a token from attribute OperatorInterventionExceptions
|
int |
removeFromrRefs(java.lang.String value)
Deprecated.
rRefs was deprecated in JDF 1.2
|
void |
removeGeneralID(java.lang.String idUsage)
removes GeneralID with the IDUsage idUsage
|
protected void |
removePartMap(JDFAttributeMap mPart)
removes the part defined in mPart
|
void |
removeRefElement(JDFResource target)
Removes an inter resource link from this Element.
|
void |
removeSettingsPolicy()
Deprecated.
use removeAttribute
|
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node arg0,
org.w3c.dom.Node arg1) |
VString |
requiredAttributes()
Comma separated list of all required attributes.
|
VString |
requiredElements() |
static boolean |
requiredLevel(JDFElement.EnumValidationLevel level)
Deprecated.
use EnumValidationLevel.isRequired()
|
void |
setAttribute(java.lang.String key,
JDFDuration value,
java.lang.String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(java.lang.String key,
JDFNumList value,
java.lang.String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(java.lang.String key,
JDFNumList value,
java.lang.String nameSpaceURI,
int precision)
Sets an element attribute
|
void |
setAttribute(java.lang.String key,
JDFRangeList value,
java.lang.String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(java.lang.String key,
JDFRangeList value,
java.lang.String nameSpaceURI,
int precision)
Sets an element attribute
|
void |
setAttribute(java.lang.String key,
JDFRange value,
java.lang.String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(java.lang.String key,
JDFRange value,
java.lang.String nameSpaceURI,
int precision)
Sets an element attribute
|
void |
setAttributeNameTimeStamp(java.lang.String attributeName,
JDFDate timestamp)
put a timestamp in an attribute of the current node
|
int |
setAttributes(KElement kElem,
VString ignoreList)
Sets the attributes from the curent element to the attributes from kElem.
|
void |
setBestEffortExceptions(VString value)
Sets attribute BestEffortExceptions with the vector of values
|
JDFComment |
setCommentText(java.lang.String text)
set comment text , also creates the comment if not there
|
JDFComment |
setCommentText(java.lang.String text,
java.lang.String name)
set comment text , also creates the comment if not there
|
void |
setCommentURL(java.lang.String value)
Set attribute CommentURL
|
static void |
setDefaultJDFVersion(JDFElement.EnumVersion vers)
sets the JDFElement::EnumVersion, where new elements will be generated in by default
Attention this is static and global. |
void |
setDescriptiveName(java.lang.String value)
Set attribute DescriptiveName
|
void |
setDirty(boolean bAttribute)
Set this element as dirty
|
protected void |
setEnumerationsAttribute(java.lang.String key,
java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value,
java.lang.String nameSpaceURI)
set an enumerated list of attributes; used by the automated code generator
|
JDFGeneralID |
setGeneralID(java.lang.String idUsage,
java.lang.String idValue)
Creates or Updates a GeneralID with the IDUsage idUsage and IDValue=idValue all entries with a duplicate idUsage are removed
|
static void |
setLongID(boolean bLong)
set the ID generation algorithm to include a date
|
void |
setMustHonorExceptions(VString value)
Sets attribute MustHonorExceptions with the vector of values
|
void |
setOperatorInterventionExceptions(VString value)
Sets attribute OperatorInterventionExceptions with the vector of values
|
protected void |
setPartMap(JDFAttributeMap mPart)
sets part to mPart
|
protected void |
setPartMapVector(VJDFAttributeMap vPart)
sets all parts to those defined in vParts
|
void |
setSettingsPolicy(JDFElement.EnumSettingsPolicy value)
Set attribute SettingsPolicy
|
void |
setStatus(JDFElement.EnumNodeStatus s)
Sets attribute Status
|
void |
setVersion(JDFElement.EnumVersion enumVer)
set Version to enumVer
|
void |
setvStringAttribute(java.lang.String key,
JDFNameRange value,
java.lang.String nameSpaceURI)
Deprecated.
|
static JDFElement.EnumVersion |
stringToVersion(java.lang.String enumName)
Deprecated.
use EnumVersion.getEnum
|
VString |
uniqueElements()
list of all unique Elements that may occur at most once; KElement is generic, therefore the list is empty
|
VString |
upDaterRefs()
Deprecated.
use KElement.fillHashSet(ElementName.RREF,null,hashSet)
|
boolean |
validAttribute(java.lang.String key,
AttributeInfo.EnumAttributeType iType,
boolean bRequired,
java.lang.String nameSpaceURI)
Deprecated.
clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)
|
boolean |
validAttribute(java.lang.String key,
java.lang.String nameSpaceURI,
JDFElement.EnumValidationLevel level)
is the attribute valid and of type iType.
|
boolean |
validEnumAttribute(java.lang.String key,
java.util.Vector v,
boolean bRequired,
java.lang.String nameSpaceURI)
Deprecated.
use getTheAttributeInfo instead
|
boolean |
validEnumerationsAttribute(java.lang.String key,
java.util.Vector vs,
boolean bRequired,
java.lang.String nameSpaceURI)
Deprecated.
use getTheAttributeInfo instead
|
protected boolean |
validResourcePosition(JDFResource r)
is the ressource r linkable by this? used by ResorceLink and refElement
|
java.lang.String |
version()
Deprecated.
use getDefaultJDFVersion()
|
java.io.File |
write2Dir(java.lang.String dir)
write to a directory - potentially generating a jobPartID
|
addAttribute, addAttribute, addNameSpace, ancestorDistance, appendAttribute, appendAttribute, appendAttributes, appendCData, appendCData, appendChild, appendElement, appendElementN, appendElementRaw, appendEntityReference, appendText, appendTextElement, appendXMLComment, appendXMLComment, buildRelativeXPath, buildXPath, buildXPath, buildXPath, cleanup, clearNSMap, clone, copyAttribute, copyAttribute, copyAttribute, copyAttribute, copyElement, copyElements, copyXPathValue, createRoot, deleteNode, ensureCase, eraseEmptyAttributes, eraseEmptyNodes, fillHashSet, fitsName_KElement, fitsName, flush, generateDotID, getAttribute_KElement, getAttribute_KElement, getAttribute, getAttribute, getAttributeArray_KElement, getAttributeIgnoreCase, getAttributeMap_KElement, getAttributeMap, getAttributeRaw, getAttributeVector_KElement, getAttributeVector, getBoolAttribute, getCData, getChildArray_KElement, getChildArray, getChildArrayByClass_KElement, getChildArrayByClass, getChildAttributeList, getChildByTagName, getChildElementArray, getChildElementVector_KElement, getChildElementVector, getChildElementVector, getChildFromList, getChildFromList, getChildList, getChildList, getChildNode, getChildNodes_KElement, getChildNodeVector, getChildrenByClass, getChildrenByTagName_KElement, getChildrenByTagName, getChildrenFromList, getChildrenIgnoreList, getChildrenWithAttribute, getChildWithAttribute, getChildWithAttribute, getCreateChildWithAttribute, getCreateElement_KElement, getCreateElement, getCreateElement, getCreateXPathElement, getDeepElement, getDeepParent, getDeepParent, getDeepParentChild, getDeepParentNotName, getDocRoot, getDOMAttr, getElement_KElement, getElement, getElementByClass, getElementHashMap, getElementsByTagName_KElement, getFirstChildElement, getFirstChildElement, getFirstChildElement, getFirstElementNode, getID, getIDPrefix, getIgnoreCase_KElement, getIgnoreCase, getInheritedAttribute, getInheritedElement, getInheritedXPathAttribute, getIntAttribute, getLocalNameStatic, getLongAttribute, getMultipleIDs, getNamespaceURI, getNamespaceURIFromPrefix, getNextElementNode, getNextSiblingElement, getNextSiblingElement, getNextSiblingElement, getNonEmpty_KElement, getNonEmpty, getNumCDatas, getNumChildNodes, getNumChildText, getNumXMLComments, getOwnerDocument_KElement, getParentNode_KElement, getPreviousSiblingElement, getPreviousSiblingElement, getRealAttribute, getTarget_KElement, getText, getText, getTree, getTree, getTreeByClass, getTreeElement, getXMLComment, getXMLNSNameSpace, getXMLNSPrefix, getXPathAttribute, getXPathAttributeMap, getXPathElement, getXPathElementVector, getXPathValueMap, getXPathValueMap, getXSIType, hasAttribute_KElement, hasAttribute, hasAttribute, hasAttributes, hasChildElement, hasChildElements, hasChildNodes, hasChildText, hasNonEmpty_KElement, hasNonEmpty, hasXPathNode, includesAttribute, includesAttributes, insertAt, insertBefore, isAncestor, isEqual, isEqual, isWildCard, matchesPath, matchesPathName, mergeElement, moveArray, moveAttribute, moveAttribute, moveElement, moveElements, moveMe, normalize, numChildElements_KElement, numChildNodes, numChildNodes, numChildrenByClass, numSiblingElements, parseFile, parseStream, parseString, pushUp, removeAllText, removeAttribute_KElement, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeAttributes, removeCData, removeChildNode, removeChildren, removeChildrenByClass, removeChildText, removeExtensions, removeFromAttribute, removeIgnoreCase_KElement, removeIgnoreCase, removeXMLComment, removeXPathAttribute, removeXPathElement, renameAttribute, renameAttribute, renameElement, replaceElement, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setAttributeNSRaw, setAttributeRaw, setAttributes, setAttributes, setAttributes, setAttributesRaw, setBoolAttribute, setDirty, setID, setIntAttribute, setNamespaceURI, setNodeValue, setNonEmpty, setPrefix, setRealAttribute, setText, setvStringAttribute, setXMLComment, setXMLComment, setXPathAttribute, setXPathValue, setXPathValues, setXSIType, sortChild, sortChild, sortChildren, sortChildren, sortChildren, sortChildren, toDisplayXML, toString, toValueString, toXML, toXML, uniqueID, uniqueID, write2File, write2File, write2Stream, writeStream, xmlNameSpace, xmlnsLocalName, xmlnsPrefixgetLocalName, getPrefix, getTypeName, getTypeNamespace, getXMLBaseAttribute, isDerivedFrom, setTypecloneNode, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getNodeName, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttributeNS, isEqualNode, reconcileDefaultAttributes, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeDatagetChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildrengetNextSibling, getParentNode, getPreviousSiblingaddEventListener, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, getUserDataRecord, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setUserData, setUserDataequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNScloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, setTextContent, setUserDatapublic JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
java.lang.String qualifiedName)
myOwnerDocument - the DOM document where this elements will be insertedqualifiedName - the qualified name of the element (see www.w3.org/XML/)public JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
java.lang.String myNamespaceURI,
java.lang.String qualifiedName)
myOwnerDocument - the DOM document where this elements will be insertedmyNamespaceURI - the namespace of the elements to (see www.w3.org/XML/)qualifiedName - the qualified name of the elementpublic JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
java.lang.String myNamespaceURI,
java.lang.String qualifiedName,
java.lang.String myLocalName)
myOwnerDocument - the DOM document where this elements will be insertedmyNamespaceURI - the namespace of the elements to createqualifiedName - the qualified name of the element (see www.w3.org/XML/)myLocalName - the local name of the element (see www.w3.org/XML/)public static void setLongID(boolean bLong)
bLong - if true (default), the date and time is used to generate long IDspublic static JDFElement createRoot(java.lang.String nodename)
nodename - public static JDFElement createRoot(java.lang.String nodename, JDFElement.EnumVersion v)
nodename - namespaceURI - protected AttributeInfo getTheAttributeInfo()
public final AttributeInfo getAttributeInfo()
public AttributeInfo.EnumAttributeType getAtrType(java.lang.String attributeName)
attributeName - the localname of the attribute to checkpublic JDFElement.EnumVersion getFirstVersion(java.lang.String eaName, boolean bElement)
eaName - attribute namebElement - true - get ElementInfo, false - get AttributeInfopublic boolean isDirty()
public boolean isDeprecated()
public void setDirty(boolean bAttribute)
protected XMLDocUserData getXMLDocUserData()
public JDFElement.EnumVersion getLastVersion(java.lang.String eaName, boolean bElement)
eaName - attribute namebElement - true - get ElementInfo, false - get AttributeInfopublic VString requiredAttributes()
public VString optionalAttributes()
public JDFAttributeMap getDefaultAttributeMap()
protected AttributeInfo getTheAttributeInfo_JDFElement()
protected ElementInfo getTheElementInfo_JDFElement()
public VString deprecatedAttributes()
public VString prereleaseAttributes()
public VString knownAttributes()
public VString getMissingAttributeVector(VString vReqKeys, int nMax)
vReqKeys - the vector with the attributes you already havenMax - vector with the missing attributesprotected ElementInfo getTheElementInfo()
public final ElementInfo getElementInfo()
public VString getMissingElements(int nMax)
default: getMissingElements(99999999)
nMax - maximum value of missing elements to returnpublic VString requiredElements()
public VString optionalElements()
public VString uniqueElements()
public java.lang.String prereleaseElements()
public VString getPrereleaseElements(int nMax)
default: getPrereleaseElements(99999999)
nMax - public VString getDeprecatedElements(int nMax)
default: getDeprecatedElements(99999999)
nMax - public VString knownElements()
public VString getMissingAttributes(int nMax)
nMax - maximum size of the returned Vectorpublic VString getDeprecatedAttributes(int nMax)
nMax - maximum size of the returned Vectorpublic VString getUnknownAttributes(boolean bIgnorePrivate, int nMax)
default: getUnknownAttributes(bIgnorePrivate, 9999999)
bIgnorePrivate - if true the private attributes will be ignorednMax - mamimum amount of unknown attributes to returnpublic VString getUnknownAttributeVector(VString vKnownKeys, VString vInNameSpace, int nMax)
default: getUnknownAttributeVector(vKnownKeys, new Vector(), 99999999)
vKnownKeys - vector with all known keysvInNameSpace - vector with all namespaces to search innMax - maximum amount of unknown attributes to returnpublic VString getUnknownElements(boolean bIgnorePrivate, int nMax)
default: getUnknownElements(bIgnorePrivate, 99999999)
bIgnorePrivate - true, to ignore the private elementsnMax - maximum number of elements in the vector returnedpublic VString getUnknownElementVector(VString vKnownKeys, VString vInNameSpace, int nMax)
default: getUnknownElementVector(vKnownKeys, vInNameSpace, 9999999)
vKnownKeys - vector of all known elementsvInNameSpace - vector of all namespaces to search innMax - maximum amount of elements to returnpublic org.apache.commons.lang.enums.ValuedEnum getTypeForAttribute(java.lang.String key)
key - the local name of the attributepublic boolean validAttribute(java.lang.String key,
java.lang.String nameSpaceURI,
JDFElement.EnumValidationLevel level)
default: validAttribute(key, null)
key - the attribute namenameSpaceURI - attribute namespace urilevel - the validation levelpublic org.apache.commons.lang.enums.ValuedEnum getEnumforAttribute(java.lang.String key)
key - the local name of the attributepublic void eraseDefaultAttributes(boolean bRecurse)
bRecurse - if true, also recurse subelements, else only localpublic boolean hasMissingAttributes()
public boolean hasUnknownAttributes(boolean bIgnorePrivate)
bIgnorePrivate - if true, looks only in default and JDF namespacespublic boolean hasMissingElements()
public boolean hasUnknownElements(boolean bIgnorePrivate)
bIgnorePrivate - if true, only looks in default and JDF namespacespublic VString getPrereleaseAttributes(int nMax)
nMax - maximum size of the returned Vectorpublic VString getInsertElements()
vString that contains missing element keyspublic VString getInsertElementVector(VString vKnownKeys, VString vUnique)
vString vector of direct child element names that may be inserted in this element. This means that a element which is already present as a child and has a
max occurs of 1 will not be part of the returned vStringvKnownKeys - a vString list of known element tag names. If you want a complete list of all known Elements use KnownElements() from KElement to
get a list. Or call GetInsertElements(int nMax)vUnique - vString a list of elements that may occur only once. Use UniqueElements() to get a String which contains all valid unique Elements
from this.knownElements(),
getInsertElements(),
uniqueElements()public AttributeInfo.EnumAttributeType attributeType(java.lang.String attributeName)
attributeName - name of the attributepublic VString getNamesVector(java.lang.String key)
key - the local name of the attributepublic VString getMissingElementVector(VString vRequiredKeys, int nMax)
default: getMissingElementVector(vRequiredKeys, 9999999)
vRequiredKeys - vector with all element which are requirednMax - maximum amount of missing element inside the returned vectorpublic boolean isValid(JDFElement.EnumValidationLevel level)
level - validation level
public boolean isValid_JDFElement(JDFElement.EnumValidationLevel level)
level - validation level
public final boolean fixVersion(JDFElement.EnumVersion version)
version - version the resulting element should correspond to@Deprecated public boolean hasSettingsPolicy(boolean bInherit)
bInherit - recurse through ancestors when searching@Deprecated public void removeSettingsPolicy()
@Deprecated public void removeBestEffortExceptions()
@Deprecated public java.lang.String getHRef()
public JDFElement appendHRef(JDFResource target, java.lang.String refAttribute, java.lang.String preSet)
target - the element to referencerefAttribute - name of the refering attribute, e.g. hRef, rRefpreSet - preset value of the ID attribute - defaults to autogeneratedpublic JDFElement appendHRef(java.lang.String idRef, java.lang.String refAttribute, java.lang.String nameSpaceURI)
idRef - value of the ID-IDREF pairrefAttribute - value of the IDREF tagnameSpaceURI - nameSpaceURI of the IDREF tagpublic void setAttribute(java.lang.String key,
JDFDuration value,
java.lang.String nameSpaceURI)
key - the name of the attribute to setvalue - the JDFDuration to setnameSpaceURI - the nameSpace the attribute is in
default: setAttribute(key, value, null)public void setAttribute(java.lang.String key,
JDFNumList value,
java.lang.String nameSpaceURI)
key - the name of the attribute to setvalue - the JDFNumList to setnameSpaceURI - the nameSpace the attribute is inpublic void setAttribute(java.lang.String key,
JDFNumList value,
java.lang.String nameSpaceURI,
int precision)
key - the name of the attribute to setvalue - the JDFNumList to setnameSpaceURI - the nameSpace the attribute is inprecision - number of digitspublic void setAttribute(java.lang.String key,
JDFRangeList value,
java.lang.String nameSpaceURI)
key - the name of the attribute to setvalue - the JDFNumberRangeList to setnameSpaceURI - the nameSpace the attribute is inpublic void setAttribute(java.lang.String key,
JDFRangeList value,
java.lang.String nameSpaceURI,
int precision)
key - the name of the attribute to setvalue - the JDFNumberRangeList to setnameSpaceURI - the nameSpace the attribute is inprecision - public void setAttribute(java.lang.String key,
JDFRange value,
java.lang.String nameSpaceURI)
key - the name of the attribute to setvalue - the JDFXYRange to setnameSpaceURI - the nameSpace the attribute is inpublic void setAttribute(java.lang.String key,
JDFRange value,
java.lang.String nameSpaceURI,
int precision)
key - the name of the attribute to setvalue - the JDFXYRange to setnameSpaceURI - the nameSpace the attribute is inprecision - @Deprecated
public void setvStringAttribute(java.lang.String key,
JDFNameRange value,
java.lang.String nameSpaceURI)
key - the name of the attribute to setvalue - the JDFNameRange to setnameSpaceURI - the nameSpace the attribute is inpublic boolean exclusiveOneOfAttribute(JDFElement.EnumValidationLevel level, java.lang.String att1, java.lang.String att2, java.lang.String att3, java.lang.String att4)
level - validation level, if level allows optional, no attribute also returns trueatt1 - name of first attributeatt2 - name of second attributeatt3 - name of third optional attributeatt4 - name of fourth optional attributepublic boolean exclusiveOneOfElement(JDFElement.EnumValidationLevel level, java.lang.String elm1, java.lang.String ns1, java.lang.String elm2, java.lang.String ns2)
level - validation level, if level allows optional, no attribute also returns trueelm1 - name of first attributens1 - namespace URI of first attributeelm2 - name of first attributens2 - namespace URI of first attributepublic VString getChildIds(java.lang.String attrib, java.lang.String element, java.lang.String nameSpaceURI)
attrib - attribute name of the ID attribute, defaults to "ID"element - name of the elements to be searchednameSpaceURI - attribute namespace uri of the elements to include in the list@Deprecated public JDFResource getTarget()
public KElement getTarget(java.lang.String id, java.lang.String attrib)
default: getTarget(id, JDFCoreConstants.ID)
public JDFNode getJDFRoot()
public JDFJMF getJMFRoot()
@Deprecated public boolean isRefElement()
@Deprecated public static boolean isRefElementStatic(KElement kElem)
kElem - @Deprecated public boolean isResource()
@Deprecated public static boolean isResourceStatic(KElement e)
e - public boolean isResourceUpdate()
@Deprecated public boolean isResourceLink()
@Deprecated public static boolean isResourceLinkStatic(KElement kElem)
kElem - @Deprecated public boolean isComment()
@Deprecated public static boolean isCommentStatic(KElement kElem)
kElem - @Deprecated public boolean isJDFNode()
public boolean isXJDF()
@Deprecated public boolean isInJDFNameSpace()
public void removeExtensions()
public static boolean isInJDFNameSpaceStatic(java.lang.String ns)
ns - the KElement to checkpublic static boolean isInXJDFNameSpaceStatic(java.lang.String ns)
ns - the KElement to checkpublic static boolean isInAnyJDFNameSpaceStatic(java.lang.String ns)
ns - the KElement to checkpublic static boolean isInAnyJDFNameSpaceStatic(KElement kElem)
kElem - the KElement to checkpublic static boolean isInJDFNameSpaceStatic(KElement kElem)
kElem - the KElement to checkpublic static boolean isInXJDFNameSpaceStatic(KElement kElem)
kElem - the KElement to checkpublic JDFRefElement getRefElement(JDFResource target)
target - - Target resource to link topublic JDFRefElement getCreateRefElement(JDFResource target)
target - - Target resource to link topublic KElement getCreateElement_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI, int iSkip)
nodeName - name of the child node to getnameSpaceURI - namespace to search foriSkip - number of matching child nodes to skippublic JDFRefElement refElement(JDFResource target)
target - - Target resource to link topublic void removeRefElement(JDFResource target)
target - Target to removepublic VElement getRefElements()
@Deprecated public VString upDaterRefs()
public void inlineRefElements(java.lang.String nodeName,
java.lang.String nameSpaceURI,
boolean bDirect)
nodeName - name of the refelement (without the "Ref")nameSpaceURI - bDirect - if true, get direct children only, else recurse into all sub-elementspublic VElement getChildElementVector(java.lang.String nodeName, java.lang.String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget)
getChildElementVector in class KElementnodeName - element name you are searching fornameSpaceURI - nameSpace you are searching formAttrib - attributes you are lokking forbAnd - if true, a child is only added if it has all attributes specified in Attributes mAttribmaxSize - maximum size of the element vectorbResolveTarget - if true, returns the targets of the refElementsdefault:
getChildElementVector(null, null,null, true, 0, false)public VElement getChildrenByTagName(java.lang.String elementName, java.lang.String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize)
getChildrenByTagName in class KElementelementName - elementname you are searching fornameSpaceURI - nameSpace you are searching formAttrib - map of attributes you are looking for bDirect - if true, return value is a vector only of all direct child elements. bAnd - if true, a child is only added, if it includes all attributes, specified in mAttribmaxSize - maximum size of the element vector. maxSize is ignored if bDirect is falseKElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)public VElement getChildrenByTagName(java.lang.String elementName, java.lang.String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize, boolean bFollowRefs)
elementName - elementname you are searching fornameSpaceURI - nameSpace you are searching formAttrib - map of attributes you are looking for bDirect - if true, return value is a vector only of all direct child elements. bAnd - if true, a child is only added, if it includes all attributes, specified in mAttribmaxSize - maximum size of the element vector. maxSize is ignored if bDirect is falsebFollowRefs - if true follow references of refElements, else return the refElementKElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)public VElement getChildElementVector_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget)
nodeName - nameSpaceURI - mAttrib - bAnd - maxSize - bResolveTarget - - additional control how refelements are followedKElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)public VString getElementNameVector()
KElementgetElementNameVector in class KElementKElement.getElementNameVector()public KElement getElement(java.lang.String nodeName, java.lang.String nameSpaceURI, int iSkip)
KElementgetElement in class KElementnodeName - name of the child node to getnameSpaceURI - namespace to search foriSkip - number of matching child nodes to skipKElement.getElement(java.lang.String, java.lang.String, int)public KElement getElement_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI, int iSkip)
nodeName - name of the child node to getnameSpaceURI - namespace to search foriSkip - get the iSkipth element that fitspublic int numChildElements(java.lang.String nodeName,
java.lang.String nameSpaceURI)
KElement.numChildElements(String, String), but also follows references.numChildElements in class KElementnodeName - the nodes to countnameSpaceURI - the nameSpace to look inpublic int numChildElements_JDFElement(java.lang.String nodeName,
java.lang.String nameSpaceURI)
nodeName - nameSpaceURI - public void removeChildren(java.lang.String nodeName,
java.lang.String nameSpaceURI,
JDFAttributeMap mAttrib)
removeChildren in class KElementnodeName - name of the child node to get, if empty or null remove allnameSpaceURI - namespace to search formAttrib - attribute map to search forprotected boolean validResourcePosition(JDFResource r)
r - the resource to link topublic KElement removeChild(java.lang.String node, java.lang.String nameSpaceURI, int n)
removeChild in class KElementnode - name of the child node to remove, if empty or "*" remove allnameSpaceURI - namespace to search forn - number of nodes to skip before deletingpublic java.lang.String appendAnchor(java.lang.String strName)
appendAnchor in class KElementstrName - public void setAttributeNameTimeStamp(java.lang.String attributeName,
JDFDate timestamp)
attributeName - the attribute name to timestamptimestamp - the timestamppublic int setAttributes(KElement kElem, VString ignoreList)
setAttributes in class KElementkElem - the attribute sourceignoreList - @Deprecated public java.lang.String idString(int id)
id - the integer value to convert to an IDpublic static JDFNode getParentJDF(KElement e)
e - the KElement (may be in foreign namespace)public JDFNode getParentJDF()
public VString getInvalidAttributes(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
level - validation levelbIgnorePrivate - if true, do not worry about attributes in other namespacesnMax - maximum size of the returned vectorpublic VString getInvalidElements(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
level - validation levelbIgnorePrivate - if true, do not worry about elements in other namespacesnMax - maximum size of the returned vectorpublic VString getInvalidElements_JDFElement(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
level - validation levelbIgnorePrivate - if true, do not worry about elements in other namespacesnMax - maximum size of the returned vectorpublic void setCommentURL(java.lang.String value)
value - the CommentURL valuepublic JDFComment setCommentText(java.lang.String text)
text - the comment text to setJDFComment the commentpublic JDFComment setCommentText(java.lang.String text, java.lang.String name)
text - the comment text to setJDFComment the commentpublic java.lang.String getCommentURL()
protected java.lang.String getRefString()
public java.lang.String jdfVersion()
public static java.lang.String getSchemaURL()
public static java.lang.String getSchemaURL(int majorVersion,
int minorVersion)
majorVersion - the major version - only 1 is supportedminorVersion - the minor version - only 0 or 1 are supportedpublic static JDFElement.EnumVersion getDefaultJDFVersion()
public static void setDefaultJDFVersion(JDFElement.EnumVersion vers)
vers - the new default versionpublic java.lang.String getElementIDPrefix()
public java.lang.String newID(java.lang.String lastID)
lastID - the highest ID that has been created before@Deprecated
public int getEnumAttribute(java.lang.String key,
java.util.Vector v,
java.lang.String nameSpaceURI,
int def,
boolean bInherit)
key - the attribute namev - comma separated string of allowed valuesnameSpaceURI - attribute namespace uridef - the default enum if it does not existbInherit - if true: recurse into parent elements when searching the attribute as well@Deprecated
public java.util.Vector getEnumerationsAttribute(java.lang.String key,
java.util.Vector v,
java.lang.String nameSpaceURI,
int def,
boolean bInherit)
key - the attribute namev - comma separated string of allowed valuesnameSpaceURI - attribute namespace uridef - the default enum if it does not existbInherit - if true: recurse into parent elements when searching the attribute as wellpublic java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> getEnumerationsAttribute(java.lang.String key,
java.lang.String nameSpaceURI,
org.apache.commons.lang.enums.ValuedEnum enu,
boolean bInherit)
key - the attribute local namenameSpaceURI - the namespace URIenu - a dummy enumeration of the correct type, typically EnumXYZ.getEnum(0)bInherit - if true, also recurse into parent elements when searching the attributeprotected void setEnumerationsAttribute(java.lang.String key,
java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value,
java.lang.String nameSpaceURI)
key - the attribute namevalue - the enumeration vectornameSpaceURI - attribute namespace uriJDFException - wrong data type in vector@Deprecated
public boolean validAttribute(java.lang.String key,
AttributeInfo.EnumAttributeType iType,
boolean bRequired,
java.lang.String nameSpaceURI)
key - the attribute nameiType - the attribute typebRequired - true if this attribute is requirednameSpaceURI - attribute namespace uri@Deprecated
public boolean validEnumAttribute(java.lang.String key,
java.util.Vector v,
boolean bRequired,
java.lang.String nameSpaceURI)
key - the attribute namev - Vector with all valid enumsbRequired - true if this attribute is requirednameSpaceURI - attribute namespace uri@Deprecated
public boolean validEnumerationsAttribute(java.lang.String key,
java.util.Vector vs,
boolean bRequired,
java.lang.String nameSpaceURI)
key - the attribute namevs - comma separated string of allowed valuesbRequired - true if this attribute is requirednameSpaceURI - attribute namespace uripublic org.w3c.dom.Node replaceChild(org.w3c.dom.Node arg0,
org.w3c.dom.Node arg1)
throws org.w3c.dom.DOMException
replaceChild in interface org.w3c.dom.NodereplaceChild in class KElementorg.w3c.dom.DOMExceptionParentNode.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)public org.w3c.dom.Node removeChild(org.w3c.dom.Node arg0)
throws org.w3c.dom.DOMException
removeChild in interface org.w3c.dom.NoderemoveChild in class KElementorg.w3c.dom.DOMExceptionParentNode.removeChild(org.w3c.dom.Node)public KElement getTarget_JDFElement(java.lang.String id, java.lang.String attrib)
id - value of the ID tag to searchattrib - name of the ID tag, defaults to "ID"public KElement insertBefore(java.lang.String elementName, org.w3c.dom.Node beforeChild, java.lang.String nameSpaceURI)
null , insert elementName at the end of the list of children. If
elementName is a DocumentFragment object, all of its children are inserted, in the same order, before beforeChild. If the elementName is already in the tree, it is removed
first.
default: insertBefore(elementName, beforeChild, null)
insertBefore in class KElementelementName - The elementName to insert the element itself will be createdbeforeChild - The reference element, i.e., the elemente before which the new element must be insertednameSpaceURI - The namespace to create elementName inprotected void clearTargets()
clearTargets in class KElementpublic KElement cloneNewDoc()
cloneNewDoc in class KElementObject.clone()public KElement copyInto(KElement src, boolean bRemove)
@Deprecated
public java.lang.String getEnumString(int value,
java.lang.String allowedValues)
value - - the enum that is to be translated to a stringallowedValues - - comma separated string of allowed valuespublic JDFDoc getOwnerDocument_JDFElement()
@Deprecated public int getEnumNodeName(java.util.Vector allowedValues)
allowedValues - comma separated string of allowed valuesprotected VJDFAttributeMap getPartMapVector()
protected JDFAttributeMapArray getPartMapArray()
protected JDFAttributeMap getPartMap()
protected void setPartMapVector(VJDFAttributeMap vPart)
vPart - vector of attribute maps for the partsprotected void setPartMap(JDFAttributeMap mPart)
mPart - attribute map for the part to setprotected void removePartMap(JDFAttributeMap mPart)
mPart - attribute map for the part to removeprotected boolean hasPartMap(JDFAttributeMap mPart)
mPart - Attribute map to check@Deprecated public static boolean requiredLevel(JDFElement.EnumValidationLevel level)
level - the level to check@Deprecated public VString getHRefs(VString vDoneRefs, boolean bRecurse)
vDoneRefs - bRecurse - if true, recurse followed refspublic VString getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)
vDoneRefs - (use null by default)bRecurse - if true recurse followed refsbExpand - if true expand partitioned resources@Deprecated public VElement getvHRefRes(boolean bRecurse)
bRecurse - public VElement getvHRefRes(boolean bRecurse, boolean bExpand)
bRecurse - if true, recurse followed linksbExpand - if true, expand partitioned resources and follow the refs from the leaves@Deprecated public void appendrRefs(java.lang.String value)
value - the rRef token to append@Deprecated public int removeFromrRefs(java.lang.String value)
value - the rRef token to remove from the NMTOKENS list@Deprecated public VString getrRefs()
public JDFResource getLinkRoot(java.lang.String id)
id - the id of the linked root. If null, the id of this is used.protected JDFResource getLinkFromUserData(java.lang.String myid)
@Deprecated public final java.lang.String version()
public java.io.File write2Dir(java.lang.String dir)
dir - public void setVersion(JDFElement.EnumVersion enumVer)
enumVer - the EnumVersion to set@Deprecated public JDFElement.EnumVersion getVersion()
public JDFElement.EnumVersion getVersion(boolean bInherit)
bInherit - if true, check ancestor nodespublic JDFElement.EnumVersion getMaxVersion(boolean bInherit)
bInherit - if true recurse through ancestors when searching@Deprecated public static JDFElement.EnumVersion stringToVersion(java.lang.String enumName)
enumName - @Deprecated public KElement[] getChildElements()
KElement.getChildElementArray()public void copyChildren(java.lang.String elementName,
KElement src)
copyChildren in class KElementelementName - src - @Deprecated public JDFElement getChildElement(int n)
n - Element index n (1 based)protected VString getUnknownPoolElements(JDFElement.EnumPoolType poolType, int nMax)
poolType - the PoolType to look fornMax - max. number of elements to retrievepublic void setSettingsPolicy(JDFElement.EnumSettingsPolicy value)
value - the SettingsPolicy to setpublic JDFElement.EnumSettingsPolicy getSettingsPolicy(boolean bInherit)
bInherit - recurse through ancestors when searchingpublic void setBestEffortExceptions(VString value)
value - vector of BestEffortExceptions tokenspublic void appendBestEffortExceptions(java.lang.String value)
value - the new BestEffortExceptions tokenpublic void removeFromBestEffortExceptions(java.lang.String value)
value - the BestEffortExceptions token to removepublic java.lang.String getBestEffortExceptions()
public void setMustHonorExceptions(VString value)
value - vector of MustHonorExceptions tokenspublic void appendMustHonorExceptions(java.lang.String value)
value - the new of MustHonorExceptions tokenpublic void removeFromMustHonorExceptions(java.lang.String value)
value - the new of MustHonorExceptions tokenpublic java.lang.String getMustHonorExceptions()
public void setOperatorInterventionExceptions(VString value)
value - the vector of OperatorInterventionExceptions tokenspublic void appendOperatorInterventionExceptions(java.lang.String value)
value - the new of OperatorInterventionExceptions tokenpublic void removeFromOperatorInterventionExceptions(java.lang.String value)
value - the new of OperatorInterventionExceptions tokenpublic java.lang.String getOperatorInterventionExceptions()
public void setDescriptiveName(java.lang.String value)
value - value to set the attribute topublic java.lang.String getDescriptiveName()
public JDFGeneralID appendGeneralID()
public JDFGeneralID appendGeneralID(java.lang.String idUsage, java.lang.String idValue)
idUsage - the IDUsage attribute of the generalIDidValue - the IDValue attribute of the generalIDpublic JDFGeneralID appendGeneralID(java.lang.String idUsage, java.lang.String idValue, JDFAutoGeneralID.EnumDataType namedfeature)
idUsage - the IDUsage attribute of the generalIDidValue - the IDValue attribute of the generalIDnamedfeature - the datatype - may be nullpublic JDFGeneralID getGeneralID(int i)
i - get the i'th element that fitspublic JDFGeneralID setGeneralID(java.lang.String idUsage, java.lang.String idValue)
idUsage - usage to set the attribute toidValue - value to set the attribute topublic void removeGeneralID(java.lang.String idUsage)
idUsage - value to set the attribute topublic java.lang.String getGeneralID(java.lang.String idUsage)
idUsage - public java.lang.String getGeneralID(java.lang.String idUsage,
int iPos)
idUsage - iPos - @Deprecated public VectorMap<java.lang.String,JDFGeneralID> getGeneralIDVectorMap()
public ListMap<java.lang.String,JDFGeneralID> getGeneralIDListMap()
public JDFAttributeMap getGeneralIDMap()
public KElement appendElement(java.lang.String elementName, java.lang.String nameSpaceURI)
appendElement in class KElementelementName - the elementname with namespace prefix "xyz:abc"nameSpaceURI - the namespace of the element "null" is valid if the namespace was specified already above. The method will lookup the namespace for you. Performance wise
its better to add it nevertheless.JDFException - if you tried to append an element into an unspecified namespacepublic JDFComment appendComment()
public JDFComment getCreateComment(int iSkip)
iSkip - number of elements to skippublic JDFComment getComment(int iSkip)
iSkip - number of elements to skippublic JDFComment getComment(java.lang.String _name, int index)
_name - Comment/@Nameindex - number of elements to skippublic java.lang.String getCommentText(java.lang.String _name,
int index)
_name - Comment/@Nameindex - number of elements to skippublic JDFComment getCreateComment(java.lang.String _name, int index)
_name - Comment/@Nameindex - number of elements to skippublic JDFPreview appendPreview()
public JDFPreview getCreatePreview(int iSkip)
iSkip - number of elements to skippublic JDFPreview getPreview(int iSkip)
iSkip - number of elements to skippublic JDFElement getChildWithMatchingAttribute(java.lang.String nodeName, java.lang.String attName, java.lang.String nameSpaceURI, java.lang.String attVal, int index, boolean bDirect, AttributeInfo.EnumAttributeType dataType)
nodeName - name of the child node to search forattName - attribute name to search fornameSpaceURI - namespace to search forattVal - a special value to search forindex - if more then one child meets the condition, you can specify the one to return via an indexbDirect - if true, look only in direct children, else search through all children, grandchildren etc.dataType - dataType to be matchedpublic KElement getChildWithAttribute(java.lang.String nodeName, java.lang.String attName, java.lang.String nameSpaceURI, java.lang.String attVal, int index, boolean bDirect)
default: getChildWithAttribute(nodeName, attName, null,attValue, 0, true)
getChildWithAttribute in class KElementnodeName - name of the child node to search forattName - attribute name to search fornameSpaceURI - namespace to search forattVal - the attribute value to search for, Wildcard supported ( null)index - if more then one child meets the condition, you can specify the one to return via an indexbDirect - if true, looks only in direct children, else search through all children, grandchildren etc.public boolean includesMatchingAttribute(java.lang.String attName,
java.lang.String attVal,
AttributeInfo.EnumAttributeType dataType)
attName - the name of the attribute to look forattVal - the value of the attribute to look for; a values of "*" is treated as true if the attribute exists, regardless of its valuedataType - the dataType to be matchedpublic void setStatus(JDFElement.EnumNodeStatus s)
s - the status to set the attribute topublic JDFElement.EnumNodeStatus getStatus()
protected static KElement getDeepElementByID(KElement base, java.lang.String attName, java.lang.String id, KElement childToExclude, XMLDocUserData ud)
base - attName - attribute nameid - attribute ID valuechildToExclude - here can be specified, if this method should exclude a child-element when searching This is useful, when searching a tree upud - userdata with reference to id cache, if null, no cachingpublic java.util.HashSet<JDFElement> getAllRefs(java.util.HashSet<JDFElement> vDoneRefs, boolean bRecurse)
vDoneRefs - (use null as default value)bRecurse - if true, return recursively linked IDs as wellpublic boolean matchesPath(java.lang.String path,
boolean bFollowRefs)
matchesPath in class KElementpath - xpath to matchpublic static java.lang.String getValueForNewAttribute(KElement ke, java.lang.String attName)
ke - attName - protected JDFDoc getURLDoc(java.lang.String url)
url - protected java.io.InputStream getURLInputStream(java.lang.String url)
url - public static java.lang.String getSchemaURL(JDFElement.EnumVersion version)
version - public boolean init()
KElementinit in class KElementKElement.init()