Package org.cip4.jdflib.core
Class ElementInfo
- java.lang.Object
-
- org.cip4.jdflib.core.ElementInfo
-
public class ElementInfo extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classElementInfo.EnumElementValidityEnumeration of element validity values
-
Constructor Summary
Constructors Constructor Description ElementInfo(ElementInfo elemInfo_super, ElemInfoTable[] elemInfo_own)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description VStringdeprecatedElements()Returns the list of deprecated elements for the specified JDF version.JDFElement.EnumVersiongetFirstVersion(java.lang.String elementName)get the first jdf version where an attrinute of this type is validstatic java.util.Map<java.lang.String,ElementInfo>getFixedmap()JDFElement.EnumVersiongetLastVersion(java.lang.String elementName)get the last jdf version where an attrinute of this type is validbooleanhasConformingElements(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.VStringoptionalElements()Returns the list of optional sub-elements for the specified JDF version.VStringprereleaseElements()Returns the list of prerelease attributes (those that are only valid in a later version) for the specified JDF version.VStringrequiredElements()Returns the list of required sub-elements for the specified JDF version.voidsetVersion(JDFElement.EnumVersion v)java.lang.StringtoString()VStringuniqueElements()Returns the list of unique elements for the specified JDF version.ElementInfoupdateAdd(ElemInfoTable elemInfo_update)UpdaterElementInfoupdateAdd(ElemInfoTable[] elemInfo_update)UpdaterElementInfoupdateRemove(ElemInfoTable elemInfo_update)UpdaterElementInfoupdateRemove(ElemInfoTable[] elemInfo_update)UpdaterElementInfoupdateReplace(ElemInfoTable elemInfo_update)ElementInfoupdateReplace(ElemInfoTable[] elemInfo_update)
-
-
-
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 ElementInfoelemInfo_own- [] elemInfo_own: table with element-specific element info
-
-
Method Detail
-
getFixedmap
public static java.util.Map<java.lang.String,ElementInfo> getFixedmap()
- Returns:
- the fixedmap
-
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 validityelemValidity2-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 java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- See Also:
Object.toString()
-
getFirstVersion
public JDFElement.EnumVersion getFirstVersion(java.lang.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(java.lang.String elementName)
get the last jdf version where an attrinute of this type is valid- Parameters:
elementName- the name of the queried attribute- Returns:
-
-