Interface PropertyDescription

All Superinterfaces:
Serializable

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 Details

    • 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:
      Returns the namespace URI
    • setNamespaceURI

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

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

      PropertyType getType()
      Returns:
      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.
      Parameters:
      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.
      Parameters:
      qualifier - the qualifier to add.
    • getQualifier

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

      List<PropertyDescription> getQualifiers()
      Returns:
      Returns the collection of all qualifiers
    • removeQualifier

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

      boolean hasQualifiers()
      Returns:
      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:
      Returns true if the property is mandatory.
    • setMandatory

      void setMandatory(boolean mandatory)
      Parameters:
      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:
      Returns the deprecated flag.
    • setDeprecated

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

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

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

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

      void setDescription(String description)
      Parameters:
      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:
      Returns true if the property is read-only, and false if the property may be edited.
    • setReadOnly

      void setReadOnly(boolean readOnly)
      Parameters:
      readOnly - Sets the readonly flag
    • accept

      void accept(SchemaVisitor schemaVisitor) throws XMPSchemaException
      Parameters:
      schemaVisitor - a visitor that implements the SchemaVisitor-interface
      Throws:
      XMPSchemaException
    • 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.
      Parameters:
      namespaceURI - namespace for the decorator tag
      localName - name of the decorator tag
      Returns:
      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.
      Parameters:
      namespaceURI - namespace for the decorator tag
      localName - name of the decorator tag
      Returns:
      Returns whether a decorator exists or not.
    • hasDecorators

      boolean hasDecorators()
      Returns:
      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:
      Returns a list of QNames of all decorators
    • removeDecoratorNS

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