org.cip4.jdflib.core
Class ElementInfo

java.lang.Object
  extended by org.cip4.jdflib.core.ElementInfo

public class ElementInfo
extends Object

Author:
MatternK

Nested Class Summary
static class ElementInfo.EnumElementValidity
          Enumeration of element validity values
 
Field Summary
static HashMap<String,ElementInfo> fixedMap
           
 
Constructor Summary
ElementInfo(ElementInfo elemInfo_super, ElemInfoTable[] elemInfo_own)
          Constructor
 
Method Summary
 VString deprecatedElements()
          Returns the list of deprecated elements for the specified JDF version.
 JDFElement.EnumVersion getFirstVersion(String elementName)
          get the first jdf version where an attrinute of this type is valid
 JDFElement.EnumVersion getLastVersion(String elementName)
          get the last jdf version where an attrinute of this type is valid
 boolean hasConformingElements(ElementInfo.EnumElementValidity elemValidity1, ElementInfo.EnumElementValidity elemValidity2, ElementInfo.EnumElementValidity elemValidity3, ElementInfo.EnumElementValidity elemValidity4)
          Returns true if there is at least one sub-element matching the requested validity for the specified JDF version.
 VString optionalElements()
          Returns the list of optional sub-elements for the specified JDF version.
 VString prereleaseElements()
          Returns the list of prerelease attributes (those that are only valid in a later version) for the specified JDF version.
 VString requiredElements()
          Returns the list of required sub-elements for the specified JDF version.
 void setVersion(JDFElement.EnumVersion v)
           
 String toString()
           
 VString uniqueElements()
          Returns the list of unique elements for the specified JDF version.
 ElementInfo updateAdd(ElemInfoTable elemInfo_update)
          Updater
 ElementInfo updateAdd(ElemInfoTable[] elemInfo_update)
          Updater
 ElementInfo updateRemove(ElemInfoTable elemInfo_update)
          Updater
 ElementInfo updateRemove(ElemInfoTable[] elemInfo_update)
          Updater
 ElementInfo updateReplace(ElemInfoTable elemInfo_update)
           
 ElementInfo updateReplace(ElemInfoTable[] elemInfo_update)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fixedMap

public static HashMap<String,ElementInfo> fixedMap
Constructor Detail

ElementInfo

public ElementInfo(ElementInfo elemInfo_super,
                   ElemInfoTable[] elemInfo_own)
Constructor

Parameters:
elemInfo_super - elemInfo_super: corresponding element info of super; if null: start from scratch, otherwise initialize from other ElementInfo
elemInfo_own - [] elemInfo_own: table with element-specific element info
Method Detail

updateAdd

public ElementInfo updateAdd(ElemInfoTable elemInfo_update)
Updater

Parameters:
elemInfo_update - [] elemInfo_update: table with element-specific attribute info
Returns:

updateAdd

public ElementInfo updateAdd(ElemInfoTable[] elemInfo_update)
Updater

Parameters:
elemInfo_update - [] elemInfo_update: table with element-specific attribute info
Returns:

updateRemove

public ElementInfo updateRemove(ElemInfoTable elemInfo_update)
Updater

Parameters:
elemInfo_update - : table with element-specific attribute info
Returns:

updateRemove

public ElementInfo updateRemove(ElemInfoTable[] elemInfo_update)
Updater

Parameters:
elemInfo_update - table with element-specific attribute info to remove from attribInfoTable
Returns:

updateReplace

public ElementInfo updateReplace(ElemInfoTable elemInfo_update)
Parameters:
elemInfo_update -
Returns:

updateReplace

public ElementInfo updateReplace(ElemInfoTable[] elemInfo_update)
Parameters:
elemInfo_update -
Returns:

hasConformingElements

public boolean hasConformingElements(ElementInfo.EnumElementValidity elemValidity1,
                                     ElementInfo.EnumElementValidity elemValidity2,
                                     ElementInfo.EnumElementValidity elemValidity3,
                                     ElementInfo.EnumElementValidity elemValidity4)
Returns true if there is at least one sub-element matching the requested validity for the specified JDF version.

Parameters:
elemValidity1 - elemValidity: requested validity
elemValidity2 -
elemValidity3 -
elemValidity4 -
Returns:
boolean: true if at least one sub-element matches the requested validity

requiredElements

public VString requiredElements()
Returns the list of required sub-elements for the specified JDF version.

Returns:
VString: list of strings containing the names of the required sub-elements

optionalElements

public VString optionalElements()
Returns the list of optional sub-elements for the specified JDF version. Note: This includes elements marked as optional as well as elements marked as deprecated (since, for backward compatibility, these are also optional).

Returns:
VString: list of strings containing the names of the optional attributes

deprecatedElements

public VString deprecatedElements()
Returns the list of deprecated elements for the specified JDF version.

Returns:
VString: list of strings containing the names of the deprecated attributes

uniqueElements

public VString uniqueElements()
Returns the list of unique elements for the specified JDF version.

Returns:
VString: list of strings containing the names of the deprecated attributes

prereleaseElements

public VString prereleaseElements()
Returns the list of prerelease attributes (those that are only valid in a later version) for the specified JDF version.

Returns:
VString: list of strings containing the names of the prerelease attributes

setVersion

public void setVersion(JDFElement.EnumVersion v)
Parameters:
v -

toString

public String toString()
Overrides:
toString in class Object
Returns:
See Also:
Object.toString()

getFirstVersion

public JDFElement.EnumVersion getFirstVersion(String elementName)
get the first jdf version where an attrinute of this type is valid

Parameters:
elementName - the name of the queried attribute
Returns:

getLastVersion

public JDFElement.EnumVersion getLastVersion(String elementName)
get the last jdf version where an attrinute of this type is valid

Parameters:
elementName - the name of the queried attribute
Returns:


Copyright © 2013. All Rights Reserved.