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. for pools level ValidationLevel_RecursiveComplete: full validation of an individual resource and all of its child elements - e.g. for pools |
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.SingleXPathComparator
firstChild, fNodeListCache, ownerDocument
DOCUMENT_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_NODE
ATTRIBUTE_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
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION
Constructor and Description |
---|
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
String qualifiedName)
Constructor for JDFElement
|
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
String myNamespaceURI,
String qualifiedName)
Constructor for JDFElement
|
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
String myNamespaceURI,
String qualifiedName,
String myLocalName)
Constructor for JDFElement
|
Modifier and Type | Method and Description |
---|---|
String |
appendAnchor(String strName)
create and append a unique id, keep the existing one if it already exists
|
void |
appendBestEffortExceptions(String value)
Append a token to attribute BestEffortExceptions
|
JDFComment |
appendComment()
Appends element Comment to the end of 'this'
|
KElement |
appendElement(String elementName,
String nameSpaceURI) |
JDFGeneralID |
appendGeneralID()
append an empty GeneralID
|
JDFGeneralID |
appendGeneralID(String idUsage,
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(String idUsage,
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,
String refAttribute,
String preSet)
append a reference to a target node automatically generate a unique ID attribute for target, if it does not exist
|
JDFElement |
appendHRef(String idRef,
String refAttribute,
String nameSpaceURI)
append a reference with a specific id
|
void |
appendMustHonorExceptions(String value)
Append a token to attribute MustHonorExceptions
|
void |
appendOperatorInterventionExceptions(String value)
Append a token to attribute OperatorInterventionExceptions
|
JDFPreview |
appendPreview()
Appends element JDFPreview to the end of 'this'
|
void |
appendrRefs(String value)
Deprecated.
rRefs was deprecated in JDF 1.2
|
AttributeInfo.EnumAttributeType |
attributeType(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
|
KElement |
copyInto(KElement src,
boolean bRemove)
copies a node into this, ignoring identical node names i.e. duplicating elements
|
VString |
deprecatedAttributes()
list of all deprecated attributes.
|
void |
eraseDefaultAttributes(boolean bRecurse)
remove all default attributes from this i.e. all attributes whose value matches the schema default
|
boolean |
exclusiveOneOfAttribute(JDFElement.EnumValidationLevel level,
String att1,
String att2,
String att3,
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,
String elm1,
String ns1,
String elm2,
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
|
HashSet<JDFElement> |
getAllRefs(HashSet<JDFElement> vDoneRefs,
boolean bRecurse)
Gets inter-resource linked resource IDs
|
AttributeInfo.EnumAttributeType |
getAtrType(String attributeName)
returns the data type of a given attribute
|
AttributeInfo |
getAttributeInfo()
public version of getTheAttributeInfo
|
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(String nodeName,
String nameSpaceURI,
JDFAttributeMap mAttrib,
boolean bAnd,
int maxSize,
boolean bResolveTarget) |
VElement |
getChildElementVector(String nodeName,
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(String attrib,
String element,
String nameSpaceURI)
GetChildIds - get a set of all known id's in child nodes
|
VElement |
getChildrenByTagName(String elementName,
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.
|
VElement |
getChildrenByTagName(String elementName,
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.
|
KElement |
getChildWithAttribute(String nodeName,
String attName,
String nameSpaceURI,
String attVal,
int index,
boolean bDirect)
GetChildWithAttribute - Get a child with matching attributes
default: getChildWithAttribute(nodeName, attName, null,attValue, 0, true)
|
JDFElement |
getChildWithMatchingAttribute(String nodeName,
String attName,
String nameSpaceURI,
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(String _name,
int index)
Gets the Comment with a give @Name
|
String |
getCommentURL()
Get string attribute CommentURL
|
JDFComment |
getCreateComment(int iSkip)
Gets the iSkip-th element Comment.
|
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,
String attName,
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.
|
String |
getDescriptiveName()
Get string attribute DescriptiveName
|
KElement |
getElement_JDFElement(String nodeName,
String nameSpaceURI,
int iSkip)
same as KElement.GetElement, but follows references as well.
|
KElement |
getElement(String nodeName,
String nameSpaceURI,
int iSkip)
Gets an existing iSkip-th child node with matching nodeName and nameSpaceURI
|
String |
getElementIDPrefix()
get Element ID prefix
|
VString |
getElementNameVector()
Returns a vector which contains the childs of the actual element.
|
int |
getEnumAttribute(String key,
Vector v,
String nameSpaceURI,
int def,
boolean bInherit)
Deprecated.
use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)
|
Vector<? extends org.apache.commons.lang.enums.ValuedEnum> |
getEnumerationsAttribute(String key,
String nameSpaceURI,
org.apache.commons.lang.enums.ValuedEnum enu,
boolean bInherit)
defines an enumerated list of attributes; used by the automated code generator
|
Vector |
getEnumerationsAttribute(String key,
Vector v,
String nameSpaceURI,
int def,
boolean bInherit)
Deprecated.
use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)
|
org.apache.commons.lang.enums.ValuedEnum |
getEnumforAttribute(String key)
Get the ValuedEnum for an enumerated attribute
|
int |
getEnumNodeName(Vector allowedValues)
Deprecated.
|
String |
getEnumString(int value,
String allowedValues)
Deprecated.
use EnumXYZ.getEnum(int)
|
JDFElement.EnumVersion |
getFirstVersion(String eaName,
boolean bElement)
get the first JDF version where attribute name or element name is valid
|
JDFGeneralID |
getGeneralID(int i)
gets attribute GeneralID
|
String |
getGeneralID(String idUsage)
Deprecated.
use getGeneralID(idUsage, 0)
|
String |
getGeneralID(String idUsage,
int iPos)
Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists
|
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<String,JDFGeneralID> |
getGeneralIDVectorMap()
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
|
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(String eaName,
boolean bElement)
get the last JDF version where attribute name or element name is valid
|
protected JDFResource |
getLinkFromUserData(String myid) |
JDFResource |
getLinkRoot(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
default: getMissingElements(99999999)
|
VString |
getMissingElementVector(VString vRequiredKeys,
int nMax)
Returns a vector with missing elements
default: getMissingElementVector(vRequiredKeys, 9999999)
|
String |
getMustHonorExceptions()
gets the value of attribute MustHonorExceptions
|
VString |
getNamesVector(String key)
Get the vector of valid attribute values for an enumerated attribute
|
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 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. if target is a partition, the refElement MUST point exactly to that partition
|
VElement |
getRefElements()
gets the vector of all RefElements
|
protected 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 String |
getSchemaURL()
returns the official JDF schema URI for a particular version
fool proof schema url as of November 5th, 2003
|
static String |
getSchemaURL(int majorVersion,
int minorVersion) |
static 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(String id,
String attrib)
Gets the target of link.
|
JDFResource |
getTarget()
Deprecated.
use the respective subclasses getTarget functions
|
KElement |
getTarget(String id,
String attrib)
looking for a specified target with an id, e.g. resource.
|
protected AttributeInfo |
getTheAttributeInfo_JDFElement() |
protected AttributeInfo |
getTheAttributeInfo() |
protected ElementInfo |
getTheElementInfo_JDFElement() |
protected ElementInfo |
getTheElementInfo() |
org.apache.commons.lang.enums.ValuedEnum |
getTypeForAttribute(String key)
Get the EnumAttributeType for an attribute
|
VString |
getUnknownAttributes(boolean bIgnorePrivate,
int nMax)
Get the unknown attributes
default: getUnknownAttributes(bIgnorePrivate, 9999999)
|
VString |
getUnknownAttributeVector(VString vKnownKeys,
VString vInNameSpace,
int nMax)
Gets the unknown attributes
default: getUnknownAttributeVector(vKnownKeys, new Vector(), 99999999)
|
VString |
getUnknownElements(boolean bIgnorePrivate,
int nMax)
Get a vector with the unknown elements
default: getUnknownElements(bIgnorePrivate, 99999999)
|
VString |
getUnknownElementVector(VString vKnownKeys,
VString vInNameSpace,
int nMax)
Get a vector with the unknown elements
default: getUnknownElementVector(vKnownKeys, vInNameSpace, 9999999)
|
protected VString |
getUnknownPoolElements(JDFElement.EnumPoolType poolType,
int nMax)
get unknown elements for a specific pool
|
protected JDFDoc |
getURLDoc(String url)
returns the jdf doc referenced by url
|
protected InputStream |
getURLInputStream(String url)
get the input stream that reads from URL
|
static String |
getValueForNewAttribute(KElement ke,
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
|
String |
idString(int id)
Deprecated.
060307 internal legacy method
|
boolean |
includesMatchingAttribute(String attName,
String attVal,
AttributeInfo.EnumAttributeType dataType)
test whether the attributes described by attName and attVal exist |
void |
inlineRefElements(String nodeName,
String nameSpaceURI,
boolean bDirect)
inline refelements that match nodename and nameSpaceURI
|
KElement |
insertBefore(String elementName,
Node beforeChild,
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
|
boolean |
isInJDFNameSpace()
Deprecated.
- use isInJDFNameSpaceStatic(kElem)
|
static boolean |
isInJDFNameSpaceStatic(KElement kElem)
checks whether kElem is in the JDF namespace
|
static boolean |
isInJDFNameSpaceStatic(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(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
|
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(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 "*"
|
String |
newID(String lastID)
gets a new ID for the element
|
int |
numChildElements_JDFElement(String nodeName,
String nameSpaceURI) |
int |
numChildElements(String nodeName,
String nameSpaceURI)
same as
KElement.numChildElements(String, String) , but also follows references. |
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.
|
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.
|
void |
removeBestEffortExceptions()
Deprecated.
use removeAttribute
|
Node |
removeChild(Node arg0) |
KElement |
removeChild(String node,
String nameSpaceURI,
int n)
remove child node
|
void |
removeChildren(String nodeName,
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(String value)
Remove a token from attribute BestEffortExceptions
|
void |
removeFromMustHonorExceptions(String value)
Remove a token from attribute MustHonorExceptions
|
void |
removeFromOperatorInterventionExceptions(String value)
Remove a token from attribute OperatorInterventionExceptions
|
int |
removeFromrRefs(String value)
Deprecated.
rRefs was deprecated in JDF 1.2
|
void |
removeGeneralID(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
|
Node |
replaceChild(Node arg0,
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(String key,
JDFDuration value,
String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(String key,
JDFNumList value,
String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(String key,
JDFNumList value,
String nameSpaceURI,
int precision)
Sets an element attribute
|
void |
setAttribute(String key,
JDFRangeList value,
String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(String key,
JDFRangeList value,
String nameSpaceURI,
int precision)
Sets an element attribute
|
void |
setAttribute(String key,
JDFRange value,
String nameSpaceURI)
Sets an element attribute
|
void |
setAttribute(String key,
JDFRange value,
String nameSpaceURI,
int precision)
Sets an element attribute
|
void |
setAttributeNameTimeStamp(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
|
void |
setCommentURL(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(String value)
Set attribute DescriptiveName
|
void |
setDirty(boolean bAttribute)
Set this element as dirty
|
protected void |
setEnumerationsAttribute(String key,
Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value,
String nameSpaceURI)
set an enumerated list of attributes; used by the automated code generator
|
JDFGeneralID |
setGeneralID(String idUsage,
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(String key,
JDFNameRange value,
String nameSpaceURI)
Deprecated.
|
static JDFElement.EnumVersion |
stringToVersion(String enumName)
Deprecated.
use EnumVersion.getEnum
|
String |
toString()
toString
|
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(String key,
AttributeInfo.EnumAttributeType iType,
boolean bRequired,
String nameSpaceURI)
Deprecated.
clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)
|
boolean |
validAttribute(String key,
String nameSpaceURI,
JDFElement.EnumValidationLevel level)
is the attribute valid and of type iType. iType is of type EnumAttributeType but may be expanded in child classes
default: validAttribute(key, null)
|
boolean |
validEnumAttribute(String key,
Vector v,
boolean bRequired,
String nameSpaceURI)
Deprecated.
use getTheAttributeInfo instead
|
boolean |
validEnumerationsAttribute(String key,
Vector vs,
boolean bRequired,
String nameSpaceURI)
Deprecated.
use getTheAttributeInfo instead
|
protected boolean |
validResourcePosition(JDFResource r)
is the ressource r linkable by this?
|
String |
version()
Deprecated.
use getDefaultJDFVersion()
|
File |
write2Dir(String dir)
write to a directory - potentially generating a jobPartID
|
addAttribute, addAttribute, addNameSpace, ancestorDistance, appendAttribute, appendCData, appendCData, appendChild, appendElement, appendElementN, appendElementRaw, appendEntityReference, appendText, appendTextElement, appendXMLComment, appendXMLComment, buildRelativeXPath, buildXPath, buildXPath, buildXPath, clone, copyAttribute, copyAttribute, copyElement, copyElements, copyXPathValue, createRoot, deleteNode, eraseEmptyAttributes, eraseEmptyNodes, fillHashSet, fitsName_KElement, fitsName, flush, generateDotID, getAttribute_KElement, getAttribute_KElement, getAttribute, getAttribute, getAttributeMap_KElement, getAttributeMap, getAttributeRaw, getAttributeVector_KElement, getAttributeVector, getBoolAttribute, getCData, getChildAttributeList, getChildByTagName, getChildElementArray, getChildElementVector_KElement, getChildElementVector, getChildElementVector, getChildFromList, getChildFromList, getChildNode, getChildNodes_KElement, getChildNodeVector, getChildrenByClass, getChildrenByTagName_KElement, getChildrenFromList, getChildrenIgnoreList, getChildrenWithAttribute, 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, 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, getTreeElement, getXMLComment, getXMLNSNameSpace, getXMLNSPrefix, getXPathAttribute, getXPathAttributeMap, getXPathElement, getXPathElementVector, getXPathValueMap, getXSIType, hasAttribute_KElement, hasAttribute, hasAttribute, hasAttributes, hasChildElement, hasChildElements, hasChildNodes, hasChildText, hasNonEmpty_KElement, hasNonEmpty, hasXPathNode, includesAttribute, includesAttributes, init, insertAt, insertBefore, isAncestor, isEqual, isWildCard, matchesPath, matchesPathName, mergeElement, moveAttribute, moveAttribute, moveElement, moveElements, moveMe, normalize, numChildElements_KElement, numChildNodes, numChildNodes, numChildrenByClass, numSiblingElements, pushUp, removeAllText, removeAttribute_KElement, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeAttributes, removeCData, removeChildNode, removeChildren, removeChildrenByClass, removeChildText, removeExtensions, removeFromAttribute, removeXMLComment, removeXPathAttribute, removeXPathElement, renameAttribute, renameAttribute, renameElement, replaceElement, 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, setXPathAttribute, setXPathValue, setXPathValues, setXSIType, sortChild, sortChild, sortChildren, sortChildren, sortChildren, sortChildren, toDisplayXML, toXML, toXML, uniqueID, write2File, write2File, write2Stream, xmlNameSpace, xmlnsLocalName, xmlnsPrefix
getBaseURI, getLocalName, getPrefix, getTypeName, getTypeNamespace, isDerivedFrom, setType, setValues
cloneNode, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttributeNS, isEqualNode, reconcileDefaultAttributes, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren
getNextSibling, getParentNode, getPreviousSibling
addEventListener, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, getUserDataRecord, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setUserData, setUserData
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
cloneNode, 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, setUserData
public JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, 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, String myNamespaceURI, 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, String myNamespaceURI, String qualifiedName, 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 IDsprotected AttributeInfo getTheAttributeInfo()
public AttributeInfo getAttributeInfo()
public AttributeInfo.EnumAttributeType getAtrType(String attributeName)
attributeName
- the localname of the attribute to checkpublic JDFElement.EnumVersion getFirstVersion(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(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 VString getMissingElements(int nMax)
default: getMissingElements(99999999)
nMax
- maximum value of missing elements to returnpublic VString requiredElements()
public VString optionalElements()
public VString uniqueElements()
public 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(String key)
key
- the local name of the attributepublic boolean validAttribute(String key, 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(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 vString
vKnownKeys
- 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(String attributeName)
attributeName
- name of the attributepublic VString getNamesVector(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 String toString()
toString
in class KElement
Object.toString()
public 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 String getHRef()
public JDFElement appendHRef(JDFResource target, String refAttribute, 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(String idRef, String refAttribute, String nameSpaceURI)
idRef
- value of the ID-IDREF pairrefAttribute
- value of the IDREF tagnameSpaceURI
- nameSpaceURI of the IDREF tagpublic void setAttribute(String key, JDFDuration value, 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(String key, JDFNumList value, String nameSpaceURI)
key
- the name of the attribute to setvalue
- the JDFNumList to setnameSpaceURI
- the nameSpace the attribute is inpublic void setAttribute(String key, JDFNumList value, 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(String key, JDFRangeList value, String nameSpaceURI)
key
- the name of the attribute to setvalue
- the JDFNumberRangeList to setnameSpaceURI
- the nameSpace the attribute is inpublic void setAttribute(String key, JDFRangeList value, 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(String key, JDFRange value, String nameSpaceURI)
key
- the name of the attribute to setvalue
- the JDFXYRange to setnameSpaceURI
- the nameSpace the attribute is inpublic void setAttribute(String key, JDFRange value, 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(String key, JDFNameRange value, 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, String att1, String att2, String att3, 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, String elm1, String ns1, String elm2, 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(String attrib, String element, 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(String id, 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(String ns)
ns
- the KElement to checkpublic static boolean isInXJDFNameSpaceStatic(String ns)
ns
- 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 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(String nodeName, 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(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget)
getChildElementVector
in class KElement
nodeName
- 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(String elementName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize)
getChildrenByTagName
in class KElement
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 falseKElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int,
boolean)
public VElement getChildrenByTagName(String elementName, 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(String nodeName, 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()
KElement
getElementNameVector
in class KElement
KElement.getElementNameVector()
public KElement getElement(String nodeName, String nameSpaceURI, int iSkip)
KElement
getElement
in class KElement
nodeName
- 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(String nodeName, String nameSpaceURI, int iSkip)
nodeName
- name of the child node to getnameSpaceURI
- namespace to search foriSkip
- get the iSkipth element that fitspublic int numChildElements(String nodeName, String nameSpaceURI)
KElement.numChildElements(String, String)
, but also follows references.numChildElements
in class KElement
nodeName
- the nodes to countnameSpaceURI
- the nameSpace to look inpublic int numChildElements_JDFElement(String nodeName, String nameSpaceURI)
nodeName
- nameSpaceURI
- public void removeChildren(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib)
removeChildren
in class KElement
nodeName
- 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(String node, String nameSpaceURI, int n)
removeChild
in class KElement
node
- name of the child node to remove, if empty or "*" remove allnameSpaceURI
- namespace to search forn
- number of nodes to skip before deletingpublic String appendAnchor(String strName)
appendAnchor
in class KElement
strName
- public void setAttributeNameTimeStamp(String attributeName, JDFDate timestamp)
attributeName
- the attribute name to timestamptimestamp
- the timestamppublic int setAttributes(KElement kElem, VString ignoreList)
setAttributes
in class KElement
kElem
- the attribute sourceignoreList
- @Deprecated public 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(String value)
value
- the CommentURL valuepublic String getCommentURL()
protected String getRefString()
public String jdfVersion()
public static String getSchemaURL()
public static 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 String getElementIDPrefix()
public String newID(String lastID)
lastID
- the highest ID that has been created before@Deprecated public int getEnumAttribute(String key, Vector v, 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 Vector getEnumerationsAttribute(String key, Vector v, 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 Vector<? extends org.apache.commons.lang.enums.ValuedEnum> getEnumerationsAttribute(String key, 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(String key, Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value, String nameSpaceURI)
key
- the attribute namevalue
- the enumeration vectornameSpaceURI
- attribute namespace uriJDFException
- wrong data type in vector@Deprecated public boolean validAttribute(String key, AttributeInfo.EnumAttributeType iType, boolean bRequired, String nameSpaceURI)
key
- the attribute nameiType
- the attribute typebRequired
- true if this attribute is requirednameSpaceURI
- attribute namespace uri@Deprecated public boolean validEnumAttribute(String key, Vector v, boolean bRequired, String nameSpaceURI)
key
- the attribute namev
- Vector with all valid enumsbRequired
- true if this attribute is requirednameSpaceURI
- attribute namespace uri@Deprecated public boolean validEnumerationsAttribute(String key, Vector vs, boolean bRequired, String nameSpaceURI)
key
- the attribute namevs
- comma separated string of allowed valuesbRequired
- true if this attribute is requirednameSpaceURI
- attribute namespace uripublic Node replaceChild(Node arg0, Node arg1) throws DOMException
replaceChild
in interface Node
replaceChild
in class KElement
DOMException
ParentNode.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
public Node removeChild(Node arg0) throws DOMException
removeChild
in interface Node
removeChild
in class KElement
DOMException
ParentNode.removeChild(org.w3c.dom.Node)
public KElement getTarget_JDFElement(String id, String attrib)
id
- value of the ID tag to searchattrib
- name of the ID tag, defaults to "ID"public KElement insertBefore(String elementName, Node beforeChild, 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 KElement
elementName
- 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 KElement
public KElement cloneNewDoc()
cloneNewDoc
in class KElement
Object.clone()
public KElement copyInto(KElement src, boolean bRemove)
@Deprecated public String getEnumString(int value, 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(Vector allowedValues)
allowedValues
- comma separated string of allowed valuesprotected VJDFAttributeMap getPartMapVector()
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(String value)
value
- the rRef token to append@Deprecated public int removeFromrRefs(String value)
value
- the rRef token to remove from the NMTOKENS list@Deprecated public VString getrRefs()
public JDFResource getLinkRoot(String id)
id
- the id of the linked root. If null, the id of this is used.protected JDFResource getLinkFromUserData(String myid)
@Deprecated public final String version()
public File write2Dir(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(String enumName)
enumName
- @Deprecated public KElement[] getChildElements()
KElement.getChildElementArray()
@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(String value)
value
- the new BestEffortExceptions tokenpublic void removeFromBestEffortExceptions(String value)
value
- the BestEffortExceptions token to removepublic String getBestEffortExceptions()
public void setMustHonorExceptions(VString value)
value
- vector of MustHonorExceptions tokenspublic void appendMustHonorExceptions(String value)
value
- the new of MustHonorExceptions tokenpublic void removeFromMustHonorExceptions(String value)
value
- the new of MustHonorExceptions tokenpublic String getMustHonorExceptions()
public void setOperatorInterventionExceptions(VString value)
value
- the vector of OperatorInterventionExceptions tokenspublic void appendOperatorInterventionExceptions(String value)
value
- the new of OperatorInterventionExceptions tokenpublic void removeFromOperatorInterventionExceptions(String value)
value
- the new of OperatorInterventionExceptions tokenpublic String getOperatorInterventionExceptions()
public void setDescriptiveName(String value)
value
- value to set the attribute topublic String getDescriptiveName()
public JDFGeneralID appendGeneralID()
public JDFGeneralID appendGeneralID(String idUsage, String idValue)
idUsage
- the IDUsage attribute of the generalIDidValue
- the IDValue attribute of the generalIDpublic JDFGeneralID appendGeneralID(String idUsage, 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(String idUsage, String idValue)
idUsage
- usage to set the attribute toidValue
- value to set the attribute topublic void removeGeneralID(String idUsage)
idUsage
- value to set the attribute to@Deprecated public String getGeneralID(String idUsage)
idUsage
- public String getGeneralID(String idUsage, int iPos)
idUsage
- iPos
- public VectorMap<String,JDFGeneralID> getGeneralIDVectorMap()
public JDFAttributeMap getGeneralIDMap()
public KElement appendElement(String elementName, String nameSpaceURI)
appendElement
in class KElement
elementName
- 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(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(String nodeName, String attName, String nameSpaceURI, 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(String nodeName, String attName, String nameSpaceURI, String attVal, int index, boolean bDirect)
default: getChildWithAttribute(nodeName, attName, null,attValue, 0, true)
getChildWithAttribute
in class KElement
nodeName
- 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(String attName, 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, String attName, 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 HashSet<JDFElement> getAllRefs(HashSet<JDFElement> vDoneRefs, boolean bRecurse)
vDoneRefs
- (use null as default value)bRecurse
- if true, return recursively linked IDs as wellpublic boolean matchesPath(String path, boolean bFollowRefs)
matchesPath
in class KElement
path
- xpath to matchpublic static String getValueForNewAttribute(KElement ke, String attName)
ke
- attName
- protected JDFDoc getURLDoc(String url)
url
- protected InputStream getURLInputStream(String url)
url
- public static String getSchemaURL(JDFElement.EnumVersion version)
version
- Copyright © 2018. All rights reserved.