Class PropertyDescription

    • Constructor Detail

      • PropertyDescription

        public PropertyDescription()
        Create a new description
    • Method Detail

      • clear

        public void clear()
        Clear the object and reset to defaults
        Overrides:
        clear in class DescribableEntity
      • fromJSONObject

        public void fromJSONObject​(javax.json.JsonObject jsonObj)
                            throws IOException
        Extract the metadata from the JSON object. This method first calls clear()
        Overrides:
        fromJSONObject in class DescribableEntity
        Parameters:
        jsonObj - The JSON Object
        Throws:
        IOException - If JSON parsing fails
      • getType

        public PropertyType getType()
        Get the property type
        Returns:
        the type
      • setType

        public void setType​(PropertyType type)
        Set the property type
        Parameters:
        type - the type to set
      • getCardinality

        public int getCardinality()
        Get the cardinality
        Returns:
        the cardinality
      • setCardinality

        public void setCardinality​(int value)
        Set the cardinality The default cardinality is 1. If the value is greater than zero the property can contain up to that number of values. If the cardinality is -1 the property can hold an unlimited number of values.
        Parameters:
        value - the cardinality to set
        Throws:
        IllegalArgumentException - If the value is 0 or below -1.
      • getVariable

        public String getVariable()
        Get the variable
        Returns:
        the variable or null
      • setVariable

        public void setVariable​(String variable)
        Set the variable
        Parameters:
        variable - the variable to set
      • getRange

        public Range getRange()
        Get the range
        Returns:
        the range or null
      • setRange

        public void setRange​(Range range)
        Set the range
        Parameters:
        range - the range to set
      • getIncludes

        public String[] getIncludes()
        Get the includes
        Returns:
        the includes or null
      • setIncludes

        public void setIncludes​(String[] includes)
        Set the includes
        Parameters:
        includes - the includes to set
      • getExcludes

        public String[] getExcludes()
        Get the excludes
        Returns:
        the excludes or null
      • setExcludes

        public void setExcludes​(String[] excludes)
        Set the excludes
        Parameters:
        excludes - the excludes to set
      • getOptions

        public List<Option> getOptions()
        Get the list of options
        Returns:
        the options or null
      • setOptions

        public void setOptions​(List<Option> options)
        Set the list of options
        Parameters:
        options - the options to set
      • getRegex

        public String getRegex()
        Get the regex
        Returns:
        the regex or null
      • setRegex

        public void setRegex​(String regex)
        Set the regex
        Parameters:
        regex - the regex to set
        Throws:
        IllegalArgumentException - If the pattern is not valid
      • getRegexPattern

        public Pattern getRegexPattern()
        Get the regex pattern
        Returns:
        The pattern or null
      • isRequired

        public boolean isRequired()
        Is this property required?
        Returns:
        true if it is required
      • setRequired

        public void setRequired​(boolean flag)
        Set whether this property is required
        Parameters:
        flag - The new value