Class Descriptor

  • All Implemented Interfaces:
    IDescriptor, JSONSerializer

    public class Descriptor
    extends java.lang.Object
    implements IDescriptor, JSONSerializer
    This interface represents a property descriptor. A descriptor includes information that describe a property.
    Version:
    $Revision$, $Date$
    • Field Detail

      • mSyntax

        public java.lang.String mSyntax
      • mConstraint

        public java.lang.String mConstraint
      • mDescription

        public java.lang.String mDescription
      • mDef

        public java.lang.String mDef
    • Constructor Detail

      • Descriptor

        public Descriptor()
      • Descriptor

        public Descriptor​(java.lang.String syntax,
                          java.lang.String constraint,
                          java.lang.String defValue,
                          java.lang.String description)
        Constructs a descriptor.
        Parameters:
        syntax - syntax
        constraint - constraint
        defValue - default value
        description - description
    • Method Detail

      • getSyntax

        public java.lang.String getSyntax()
        Returns the syntax of the property.
        Specified by:
        getSyntax in interface IDescriptor
        Returns:
        syntax
      • getDefaultValue

        public java.lang.String getDefaultValue()
        Returns the default value of the property.
        Specified by:
        getDefaultValue in interface IDescriptor
        Returns:
        default value
      • getConstraint

        public java.lang.String getConstraint()
        Constraint for the given syntax. For example,

        - number(1-5): 1-5 is the constraint, and it indicates that the number must be in the range of 1 to 5.

        - choice(cert,crl): cert,crl is the constraint for choice

        If null, no constraint shall be enforced.

        Specified by:
        getConstraint in interface IDescriptor
        Returns:
        constraint
      • getDescription

        public java.lang.String getDescription​(java.util.Locale locale)
        Retrieves the description of the property.
        Specified by:
        getDescription in interface IDescriptor
        Parameters:
        locale - user locale
        Returns:
        description
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toDOM

        public void toDOM​(org.w3c.dom.Document document,
                          org.w3c.dom.Element element)
      • toDOM

        public org.w3c.dom.Element toDOM​(org.w3c.dom.Document document)
      • fromDOM

        public static Descriptor fromDOM​(org.w3c.dom.Element element)