Class XMP.Property

  • All Implemented Interfaces:
    java.lang.Comparable<XMP.Property>
    Enclosing class:
    XMP

    public static class XMP.Property
    extends java.lang.Object
    implements java.lang.Comparable<XMP.Property>
    A Property is a "key" for any values set on the XMP. Properties are used both for top-level XMP properties, as qualifiers on XMP.Values, and also for keys on structured Values (i.e. a Value that contain a Map of other Values). The latter use is called a "Field" rather than a Property in ISO16684 and in PDF/A-1 to 3, but this class represents both concepts. A Property acting as a "Field" will have a non-null return value from getOwnerType().
    See Also:
    XMP.Schema.newProperty(java.lang.String, org.faceless.pdf2.XMP.Type, java.lang.String, boolean)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static XMP.Property LANG
      The "xml:lang" qualifier property, which can be set on any non-List value.
      static XMP.Property TYPE
      The "rdf:type" qualifier property.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(XMP.Property p)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getDescription()
      Return the Description of this Property
      java.lang.String getName()
      Return the name of the property
      XMP.Type getOwnerType()
      For a Property that serves as a "Field" in a Complex XMP.Type, return the owning XMP.Type.
      XMP.Type getType()
      Return the Type of the property
      java.lang.String getURI()
      Return the namespace of the property - the same as the XMP.Schema.getURI() method on the Schema that created this Property
      int hashCode()  
      boolean isDefinedIn​(java.lang.String standard)
      Return true if this property is known to the specified standard.
      boolean isExternal()
      Return whether this Property is external.
      boolean isQualifier()
      Return whether this Property is a qualifier property.
      boolean isValid()
      Return true if the property is valid according to XMP.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LANG

        public static final XMP.Property LANG
        The "xml:lang" qualifier property, which can be set on any non-List value.
      • TYPE

        public static final XMP.Property TYPE
        The "rdf:type" qualifier property. This can be set as a qualifier any structual (i.e "Map") Value to make it an RDF "Typed Node". Typed Nodes are disallowed in XMP prior to 2012.
    • Method Detail

      • getName

        public java.lang.String getName()
        Return the name of the property
      • getURI

        public java.lang.String getURI()
        Return the namespace of the property - the same as the XMP.Schema.getURI() method on the Schema that created this Property
      • getType

        public XMP.Type getType()
        Return the Type of the property
      • getOwnerType

        public XMP.Type getOwnerType()
        For a Property that serves as a "Field" in a Complex XMP.Type, return the owning XMP.Type. Otherwise, for top-level properties, return null.
      • isExternal

        public boolean isExternal()
        Return whether this Property is external. The purpose of this value is unknown
      • getDescription

        public java.lang.String getDescription()
        Return the Description of this Property
      • isValid

        public boolean isValid()
        Return true if the property is valid according to XMP. Currently this only means that the namespace URI ends in "#" or "/"
        Since:
        2.25
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(XMP.Property p)
        Specified by:
        compareTo in interface java.lang.Comparable<XMP.Property>
      • isDefinedIn

        public boolean isDefinedIn​(java.lang.String standard)
        Return true if this property is known to the specified standard. The supplied value is the year of the XMP standard we're checking against - 2004, 2005, 2008, 2012 or 2019 - or one of the two special values "other" (we know of the property, but from another standard), "extension" (the property is defined in a PDF/A extension schema loaded with the PDF) and "any" (we know of the property any source other than a PDF/A extension schema).
        Parameters:
        standard - one of "2004", "2005", "2008", "2012", "2019", "other", "any" or "extension"
        Since:
        2.25