Package org.faceless.pdf2
Class XMP.Property
- java.lang.Object
-
- org.faceless.pdf2.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 onXMP.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 fromgetOwnerType().
-
-
Field Summary
Fields Modifier and Type Field Description static XMP.PropertyLANGThe "xml:lang" qualifier property, which can be set on any non-List value.static XMP.PropertyTYPEThe "rdf:type" qualifier property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(XMP.Property p)booleanequals(java.lang.Object o)java.lang.StringgetDescription()Return the Description of this Propertyjava.lang.StringgetName()Return the name of the propertyXMP.TypegetOwnerType()XMP.TypegetType()Return the Type of the propertyjava.lang.StringgetURI()Return the namespace of the property - the same as theXMP.Schema.getURI()method on the Schema that created this PropertyinthashCode()booleanisDefinedIn(java.lang.String standard)Return true if this property is known to the specified standard.booleanisExternal()Return whether this Property is external.booleanisQualifier()Return whether this Property is a qualifier property.booleanisValid()Return true if the property is valid according to XMP.java.lang.StringtoString()
-
-
-
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 theXMP.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()
-
isExternal
public boolean isExternal()
Return whether this Property is external. The purpose of this value is unknown
-
isQualifier
public boolean isQualifier()
Return whether this Property is a qualifier property. Qualifiers can be set on a Value withXMP.Value.putQualifier(org.faceless.pdf2.XMP.Property, org.faceless.pdf2.XMP.Value), but cannot be set on the XMP itself.
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(XMP.Property p)
- Specified by:
compareToin interfacejava.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
-
-