Enum PropertyTypeId

  • All Implemented Interfaces:
    Serializable, Comparable<PropertyTypeId>

    public enum PropertyTypeId
    extends Enum<PropertyTypeId>
    Enumerates the properties that can be built from the XML. Defining a property in the XML requires the type attribute, which acts as a mnemonic for the type of the property that should be built. The mapping between the values of this attribute and the concrete property that is built is encoded in the constants of this enum.

    Properties API changes

    This class' API is mainly provided to build GUIs for XPath rules like the rule designer, so that they have info about the available properties from XML. As such, the number of clients are probably low. Nevertheless, a bunch of members have been deprecated to warn about probable upcoming API changes with 7.0.0, but the amount of change may be greater. See PropertyDescriptor for more info about property framework changes with 7.0.0.
    Since:
    6.0.0
    Author:
    Clément Fournier
    See Also:
    PropertyDescriptorExternalBuilder
    • Method Detail

      • values

        public static PropertyTypeId[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PropertyTypeId c : PropertyTypeId.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PropertyTypeId valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getStringId

        public String getStringId()
        Gets the value of the type attribute represented by this constant.
        Returns:
        The string id
      • getFactory

        @Deprecated
        public PropertyDescriptorExternalBuilder<?> getFactory()
        Deprecated.
        Gets the factory associated to the type id, that can build the property from strings extracted from the XML.
        Returns:
        The factory
      • isPropertyNumeric

        @Deprecated
        public boolean isPropertyNumeric()
        Deprecated.
        Returns true if the property corresponding to this factory is numeric, which means it can be safely cast to a NumericPropertyDescriptor.
        Returns:
        whether the property is numeric
      • isPropertyPackaged

        @Deprecated
        public boolean isPropertyPackaged()
        Deprecated.
        Returns true if the property corresponding to this factory is packaged, which means it can be safely cast to a PackagedPropertyDescriptor.
        Returns:
        whether the property is packaged
      • isPropertyMultivalue

        @Deprecated
        public boolean isPropertyMultivalue()
        Returns true if the property corresponding to this factory takes lists of values as its value.
        Returns:
        whether the property is multivalue
      • propertyValueType

        @Deprecated
        public Class<?> propertyValueType()
        Deprecated.
        Returns the value type of the property corresponding to this factory. This is the component type of the list if the property is multivalued.
        Returns:
        The value type of the property
      • typeIdsToConstants

        public static Map<String,​PropertyTypeId> typeIdsToConstants()
        Returns the full mappings from type ids to enum constants.
        Returns:
        The full mapping.
      • lookupMnemonic

        public static PropertyTypeId lookupMnemonic​(String stringId)
        Gets the enum constant corresponding to the given mnemonic.
        Parameters:
        stringId - A mnemonic for the property type
        Returns:
        A PropertyTypeId
      • typeIdFor

        @Deprecated
        public static String typeIdFor​(Class<?> valueType,
                                       boolean multiValue)
        Deprecated.
        The signature will probably be altered in 7.0.0 but a similar functionality will be available
        Gets the string representation of this type, as it should be given when defining a descriptor in the xml.
        Parameters:
        valueType - The type to look for
        multiValue - Whether the descriptor is multivalued or not
        Returns:
        The string id