Package org.cip4.jdflib.core
Class AttributeInfo
java.lang.Object
org.cip4.jdflib.core.AttributeInfo
The maintainer of version-specific attribute information: - attribute type (for current version only) - validity per version
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEnumeration of valid attribute typesstatic final classEnumeration of attribute validity values -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAttributeInfo(AtrInfoTable[] attrInfo_own) ConstructorAttributeInfo(AttributeInfo attrInfo_super, AtrInfoTable[] attrInfo_own) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionconformingAttribs(AttributeInfo.EnumAttributeValidity attrValidity) Returns a list of attributes matching the requested validity for the specified JDF version.Returns the list of deprecated attributes for the specified JDF version.getAtrType(String attributeName) Deprecated.2005-08-26getAttributeDefault(String attributeName) Returns the Default that goes with attributeNameorg.apache.commons.lang.enums.ValuedEnumgetAttributeEnum(String attributeName) Returns the ValuedEnum that goes with attributeNamegetAttributeType(String attributeName) Returns the type of the given attribute for the latest JDF version.getAttributeValidity(String attributeName) Returns the validity of the given attribute for the latest JDF version.Returns a map of attributes with defaults for the specified JDF version.getFirstVersion(String attributeName) get the first jdf version where an attrinute of this type is validgetLastVersion(String attributeName) get the last jdf version where an attrinute of this type is validbooleanhasConformingAttrib(AttributeInfo.EnumAttributeValidity attrValidity) Returns true if there is at least one attribute matching the requested validity for the specified JDF version.Returns the list of all attributes for the specified JDF version.Returns the list of optional attributes for the specified JDF version.Returns the list of prerelease attributes (those that are only valid in a later version) for the specified JDF version.Returns the list of required attributes for the specified JDF version.voidtoString()updateAdd(AtrInfoTable attrInfo_update) UpdaterupdateAdd(AtrInfoTable[] attrInfo_update) UpdaterupdateRemove(AtrInfoTable attrInfo_update) UpdaterupdateRemove(AtrInfoTable[] attrInfo_update) UpdaterupdateReplace(AtrInfoTable attrInfo_update) updateReplace(AtrInfoTable[] attrInfo_update) booleanvalidAttribute(String key, String attribute, JDFElement.EnumValidationLevel level) static booleanvalidStringForType(String val, AttributeInfo.EnumAttributeType iType, org.apache.commons.lang.enums.ValuedEnum enu)
-
Field Details
-
fixedMap
-
-
Constructor Details
-
AttributeInfo
Constructor- Parameters:
attrInfo_own- : table with element-specific attribute info
-
AttributeInfo
Deprecated.Constructor- Parameters:
attrInfo_super- corresponding attrib info of super; if null: start from scratch, otherwise initialize from other AttributeInfoattrInfo_own- table with element-specific attribute info
-
-
Method Details
-
updateAdd
Updater- Parameters:
attrInfo_update- table with element-specific attribute info- Returns:
-
updateAdd
Updater- Parameters:
attrInfo_update- table with element-specific attribute info- Returns:
-
updateRemove
Updater- Parameters:
attrInfo_update- table with element-specific attribute info- Returns:
-
updateRemove
Updater- Parameters:
attrInfo_update- table with element-specific attribute info to remove from attribInfoTable- Returns:
-
updateReplace
- Parameters:
attrInfo_update-- Returns:
-
updateReplace
- Parameters:
attrInfo_update-- Returns:
-
conformingAttribs
Returns a list of attributes matching the requested validity for the specified JDF version.- Parameters:
attrValidity- requested validity- Returns:
- VString: list of strings containing the names of the matching attributes
-
getDefaultAttributeMap
Returns a map of attributes with defaults for the specified JDF version.- Returns:
- JDFAttributeMap: map of strings containing the names and defaults of the matching attributes, null if no defaults exist
-
hasConformingAttrib
Returns true if there is at least one attribute matching the requested validity for the specified JDF version.- Parameters:
attrValidity- requested validity- Returns:
- boolean: true if at least one attribute matches the requested validity
-
requiredAttribs
Returns the list of required attributes for the specified JDF version.- Returns:
- VString: list of strings containing the names of the required attributes
-
optionalAttribs
Returns the list of optional attributes for the specified JDF version. Note: This includes attributes marked as optional as well as attributes marked as deprecated (since, for backward compatibility, these are also optional).- Returns:
- VString: list of strings containing the names of the optional attributes
-
knownAttribs
Returns the list of all attributes for the specified JDF version.- Returns:
- VString: list of strings containing the names of the deprecated attributes
-
deprecatedAttribs
Returns the list of deprecated attributes for the specified JDF version.- Returns:
- VString: list of strings containing the names of the deprecated attributes
-
prereleaseAttribs
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
-
getAttributeType
Returns the type of the given attribute for the latest JDF version. Attribute types of previous versions have to be provided by attribute-specific functions (if necessary).- Parameters:
attributeName- name of the attribute- Returns:
- EnumAttributeType: the attribute's type
-
getAttributeValidity
Returns the validity of the given attribute for the latest JDF version. Attribute types of previous versions have to be provided by attribute-specific functions (if necessary).- Parameters:
attributeName- name of the attribute- Returns:
- EnumAttributeType: the attribute's type
-
getAttributeEnum
Returns the ValuedEnum that goes with attributeName- Parameters:
attributeName- : name of the attribute- Returns:
- EnumAttributeType: the attribute's type
-
getAttributeDefault
Returns the Default that goes with attributeName- Parameters:
attributeName- : name of the attribute- Returns:
- EnumAttributeType: the attribute's type
-
setVersion
- Parameters:
v-
-
getAtrType
Deprecated.2005-08-26returns the data type of a given attribute- Parameters:
attributeName- the localname of the attribute to check- Returns:
- the data type of attributeName
-
validAttribute
- Parameters:
key-attribute-level-- Returns:
-
validStringForType
public static boolean validStringForType(String val, AttributeInfo.EnumAttributeType iType, org.apache.commons.lang.enums.ValuedEnum enu) - Parameters:
val-iType-enu-- Returns:
-
toString
-
getFirstVersion
get the first jdf version where an attrinute of this type is valid- Parameters:
attributeName- the name of the queried attribute- Returns:
-
getLastVersion
get the last jdf version where an attrinute of this type is valid- Parameters:
attributeName- the name of the queried attribute- Returns:
-