Class AttributeInfo

java.lang.Object
org.cip4.jdflib.core.AttributeInfo

public class AttributeInfo extends Object
The maintainer of version-specific attribute information: - attribute type (for current version only) - validity per version
  • Field Details

  • Constructor Details

    • AttributeInfo

      protected AttributeInfo(AtrInfoTable[] attrInfo_own)
      Constructor
      Parameters:
      attrInfo_own - : table with element-specific attribute info
    • AttributeInfo

      @Deprecated public AttributeInfo(AttributeInfo attrInfo_super, AtrInfoTable[] attrInfo_own)
      Deprecated.
      Constructor
      Parameters:
      attrInfo_super - corresponding attrib info of super; if null: start from scratch, otherwise initialize from other AttributeInfo
      attrInfo_own - table with element-specific attribute info
  • Method Details

    • updateAdd

      public AttributeInfo updateAdd(AtrInfoTable attrInfo_update)
      Updater
      Parameters:
      attrInfo_update - table with element-specific attribute info
      Returns:
    • updateAdd

      public AttributeInfo updateAdd(AtrInfoTable[] attrInfo_update)
      Updater
      Parameters:
      attrInfo_update - table with element-specific attribute info
      Returns:
    • updateRemove

      public AttributeInfo updateRemove(AtrInfoTable attrInfo_update)
      Updater
      Parameters:
      attrInfo_update - table with element-specific attribute info
      Returns:
    • updateRemove

      public AttributeInfo updateRemove(AtrInfoTable[] attrInfo_update)
      Updater
      Parameters:
      attrInfo_update - table with element-specific attribute info to remove from attribInfoTable
      Returns:
    • updateReplace

      public AttributeInfo updateReplace(AtrInfoTable attrInfo_update)
      Parameters:
      attrInfo_update -
      Returns:
    • updateReplace

      public AttributeInfo updateReplace(AtrInfoTable[] attrInfo_update)
      Parameters:
      attrInfo_update -
      Returns:
    • conformingAttribs

      public VString conformingAttribs(AttributeInfo.EnumAttributeValidity attrValidity)
      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

      public JDFAttributeMap 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

      public boolean hasConformingAttrib(AttributeInfo.EnumAttributeValidity attrValidity)
      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

      public VString 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

      public VString 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

      public VString 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

      public VString 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

      public VString 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

      public AttributeInfo.EnumAttributeType getAttributeType(String attributeName)
      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

      public AttributeInfo.EnumAttributeValidity getAttributeValidity(String attributeName)
      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

      public ValuedEnum getAttributeEnum(String attributeName)
      Returns the ValuedEnum that goes with attributeName
      Parameters:
      attributeName - : name of the attribute
      Returns:
      EnumAttributeType: the attribute's type
    • getAttributeDefault

      public String getAttributeDefault(String attributeName)
      Returns the Default that goes with attributeName
      Parameters:
      attributeName - : name of the attribute
      Returns:
      EnumAttributeType: the attribute's type
    • setVersion

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

      @Deprecated public AttributeInfo.EnumAttributeType getAtrType(String attributeName)
      Deprecated.
      2005-08-26
      returns the data type of a given attribute
      Parameters:
      attributeName - the localname of the attribute to check
      Returns:
      the data type of attributeName
    • validAttribute

      public boolean validAttribute(String key, String attribute, JDFElement.EnumValidationLevel level)
      Parameters:
      key -
      attribute -
      level -
      Returns:
    • validStringForType

      public static boolean validStringForType(String val, AttributeInfo.EnumAttributeType iType, ValuedEnum enu)
      Parameters:
      val -
      iType -
      enu -
      Returns:
    • toString

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

      public JDFElement.EnumVersion getFirstVersion(String attributeName)
      get the first jdf version where an attrinute of this type is valid
      Parameters:
      attributeName - the name of the queried attribute
      Returns:
    • getLastVersion

      public JDFElement.EnumVersion getLastVersion(String attributeName)
      get the last jdf version where an attrinute of this type is valid
      Parameters:
      attributeName - the name of the queried attribute
      Returns: