Interface PropertyDescription

  • All Superinterfaces:

    public interface PropertyDescription
    extends Serializable
    Describes an XMP property that can live either in an SchemaDescription as top-level property or or in an StructType as a struct field.
    When added to a schema description it has to be in the same namespace as the parent schema.
    • Method Detail

      • getNamespaceURI

        String getNamespaceURI()
        The namespace URI of the property. While all properties of a schema have to be in the same namespace, a struct can contain properties of different namespaces.
        Returns the namespace URI
      • setNamespaceURI

        void setNamespaceURI​(String namespaceURI)
        namespaceURI - the namespace to set
      • getName

        String getName()
        Returns the property name. It is a local name in the context of XML namespaces.
      • getType

        PropertyType getType()
        Returns the type of the property. Can be simple, array or struct.
      • replaceType

        void replaceType​(PropertyType finalType)
        Replaces an UnspecifiedType with a final PropertyType. This method is only needed by schema parsers.
        finalType - the type that replaces the unspecified type.
      • addQualifier

        void addQualifier​(PropertyDescription qualifier)
        Add a qualifier to the property. A qualifier behaves exactly like a normal XMP property. A property must not have two qualifiers that have the same QName.
        qualifier - the qualifier to add.
      • getQualifier

        PropertyDescription getQualifier​(String namespaceURI,
                                         String localName)
        Gets a qualifier by namespace and local name if existing.
        namespaceURI - the qualifier's namespace
        localName - the qualifier's local name
        Returns the qualifier or null if not existing.
      • removeQualifier

        void removeQualifier​(String namespaceURI,
                             String localName)
        Removes a qualifier by namespace and local name.
        namespaceURI - the qualifier's namespace
        localName - the qualifier's local name
      • hasQualifiers

        boolean hasQualifiers()
        Returns true if the property has at least on qualifier.
      • isMandatory

        boolean isMandatory()
        The mandatory flag denotes that a property has to be specified in an XMP data object. This applies only when the schema is specified at all. It does not indicate that this property has to specified in each XMP data set.
        Returns true if the property is mandatory.
      • setMandatory

        void setMandatory​(boolean mandatory)
        mandatory - the mandatory flag to set
      • isDeprecated

        boolean isDeprecated()
        Denotes that this property shall not be used anymore, while it is still accepted. A validator could generate a warning when coming across a deprecated property.
        Returns the deprecated flag.
      • setDeprecated

        void setDeprecated​(boolean deprecated)
        deprecated - the deprecated flag to set
      • getLabel

        String getLabel()
        Returns the default label for the property.
      • setLabel

        void setLabel​(String label)
        label - Sets the default label
      • getDescription

        String getDescription()
        Returns the default description for this property.
      • setDescription

        void setDescription​(String description)
        description - Sets the default description
      • isReadOnly

        boolean isReadOnly()
        Read-only is a hint for UI generators and indicate that the property should not be modified by the user, and is rather maintained by the application. This flag is similar to the internal (read-only) / external (read/write) term that we used in our spec. Note: this flag is under discussion.
        Returns true if the property is read-only, and false if the property may be edited.
      • setReadOnly

        void setReadOnly​(boolean readOnly)
        readOnly - Sets the readonly flag
      • getDecorator

        Map<String,​String> getDecorator​(String namespaceURI,
                                              String localName)
        Gets a user defined decorator map. To add decorators, get the map and add property-value pairs. It is implicitly created, when empty.
        namespaceURI - namespace for the decorator tag
        localName - name of the decorator tag
        Returns a decorator map. It may be empty, but is never null.
      • hasDecorator

        boolean hasDecorator​(String myNamespace,
                             String myDecorator)
        Request if a decorator exists AND contains at least one property. Unlike the get-method, this method does not create an empty decorator when it has not existed before.
        namespaceURI - namespace for the decorator tag
        localName - name of the decorator tag
        Returns whether a decorator exists or not.
      • hasDecorators

        boolean hasDecorators()
        Returns true when the property contains at least one decorator.
      • getDecoratorSet

        Set<QName> getDecoratorSet()
        Retrieves a list of all decorators, sorted by QName. To get the values the method getDecorator(String, String).
        Returns a list of QNames of all decorators
      • removeDecoratorNS

        void removeDecoratorNS​(String namespaceURI)
        Removes all decorators from one namespace.
        namespaceURI - a decorator namespace URI