public class XMPSchema extends AbstractStructuredType
STRUCTURE_ARRAY_NAME
Constructor and Description |
---|
XMPSchema(XMPMetadata metadata)
Create a new blank schema that can be populated.
|
XMPSchema(XMPMetadata metadata,
String prefix)
Create a new blank schema that can be populated.
|
XMPSchema(XMPMetadata metadata,
String namespaceURI,
String prefix)
Create a new blank schema that can be populated.
|
XMPSchema(XMPMetadata metadata,
String namespaceURI,
String prefix,
String name)
Create a new blank schema that can be populated.
|
Modifier and Type | Method and Description |
---|---|
void |
addBagValue(String qualifiedSeqName,
AbstractField seqValue)
Add a new value to a bag property.
|
void |
addBagValueAsSimple(String simpleName,
String bagValue)
add a bag value property on the schema, using the current prefix.
|
void |
addQualifiedBagValue(String simpleName,
String bagValue)
Add an entry to a bag property.
|
void |
addSequenceDateValueAsSimple(String simpleName,
Calendar date)
Add a date sequence value to the list using the current prefix
|
void |
addUnqualifiedSequenceDateValue(String seqName,
Calendar date)
Add a date sequence value to the list.
|
void |
addUnqualifiedSequenceValue(String seqName,
AbstractField seqValue)
Add a new value to a sequence property.
|
void |
addUnqualifiedSequenceValue(String simpleSeqName,
String seqValue)
Add a new value to a sequence property.
|
Attribute |
getAboutAttribute()
Get the RDF about attribute
|
String |
getAboutValue()
Get the RDF about value.
|
AbstractField |
getAbstractProperty(String qualifiedName)
Retrieve a generic simple type property
|
BooleanType |
getBooleanProperty(String qualifiedName)
Get a BooleanType property with its name
|
Boolean |
getBooleanPropertyValue(String qualifiedName)
Get the value of the property as a Boolean.
|
Boolean |
getBooleanPropertyValueAsSimple(String simpleName)
Get a simple boolean property value on the schema, using the current prefix.
|
DateType |
getDateProperty(String qualifiedName)
Get the Date property with its name
|
Calendar |
getDatePropertyValue(String qualifiedName)
Get the value of the property as a date.
|
Calendar |
getDatePropertyValueAsSimple(String simpleName)
Get a simple date property value on the schema, using the current prefix.
|
IntegerType |
getIntegerProperty(String qualifiedName)
Get the Integer property with its name
|
Integer |
getIntegerPropertyValue(String qualifiedName)
Get the value of the property as an integer.
|
Integer |
getIntegerPropertyValueAsSimple(String simpleName)
Get a simple integer property value on the schema, using the current prefix.
|
List<AbstractField> |
getUnqualifiedArrayList(String name)
Get an AbstractField list corresponding to the content of an array
property.
|
List<String> |
getUnqualifiedBagValueList(String bagName)
Get all the values of the bag property.
|
List<String> |
getUnqualifiedLanguagePropertyLanguagesValue(String name)
Get a list of all languages that are currently defined for a specific
property.
|
String |
getUnqualifiedLanguagePropertyValue(String name,
String expectedLanguage)
Get the value of a multi-lingual property.
|
List<Calendar> |
getUnqualifiedSequenceDateValueList(String seqName)
Get all the date values in a sequence property.
|
List<String> |
getUnqualifiedSequenceValueList(String seqName)
Get all the values in a sequence property.
|
TextType |
getUnqualifiedTextProperty(String name)
Get a TextProperty Type from its name
|
String |
getUnqualifiedTextPropertyValue(String name)
Get the value of a simple text property.
|
protected AbstractSimpleProperty |
instanciateSimple(String propertyName,
Object value) |
void |
merge(XMPSchema xmpSchema)
A basic schema merge, it merges bags and sequences and replace everything else.
|
void |
removeUnqualifiedArrayValue(String arrayName,
AbstractField fieldValue)
Generic method to remove a field from an array with an Elementable Object
|
void |
removeUnqualifiedBagValue(String bagName,
String bagValue)
Remove all matching entries with the given value from the bag.
|
void |
removeUnqualifiedSequenceDateValue(String seqName,
Calendar date)
Remove a date sequence value from the list.
|
void |
removeUnqualifiedSequenceValue(String qualifiedSeqName,
AbstractField seqValue)
Remove a value from a sequence property.
|
void |
removeUnqualifiedSequenceValue(String qualifiedSeqName,
String seqValue)
Remove all matching values from a sequence property.
|
void |
reorganizeAltOrder(ComplexPropertyContainer alt)
Method used to place the 'x-default' value in first in Language alternatives as said in xmp spec
|
void |
setAbout(Attribute about)
Set the RDF 'about' attribute
|
void |
setAboutAsSimple(String about)
Set the RDF 'about' attribute.
|
void |
setBooleanProperty(BooleanType bool)
Set a BooleanType property
|
void |
setBooleanPropertyValue(String qualifiedName,
Boolean bool)
Set the value of the property as a boolean.
|
void |
setBooleanPropertyValueAsSimple(String simpleName,
Boolean bool)
Set a simple Boolean property on the schema, using the current prefix.
|
void |
setDateProperty(DateType date)
Set a new DateProperty
|
void |
setDatePropertyValue(String qualifiedName,
Calendar date)
Set the value of the property as a date.
|
void |
setDatePropertyValueAsSimple(String simpleName,
Calendar date)
Set a simple Date property on the schema, using the current prefix.
|
void |
setIntegerProperty(IntegerType prop)
Add an integerProperty
|
void |
setIntegerPropertyValue(String qualifiedName,
Integer intValue)
Set the value of the property as an integer.
|
void |
setIntegerPropertyValueAsSimple(String simpleName,
Integer intValue)
Set a simple Integer property on the schema, using the current prefix.
|
void |
setTextProperty(TextType prop)
Set TextType property
|
void |
setTextPropertyValue(String qualifiedName,
String propertyValue)
Set a simple text property on the schema.
|
void |
setTextPropertyValueAsSimple(String simpleName,
String propertyValue)
Set a simple text property on the schema, using the current prefix.
|
void |
setUnqualifiedLanguagePropertyValue(String name,
String language,
String value)
Set the value of a multi-lingual property.
|
addSimpleProperty, createArrayProperty, createTextType, getDatePropertyAsCalendar, getNamespace, getPreferedPrefix, getPrefix, getPropertyValueAsString, setNamespace, setPrefix
addNamespace, addProperty, getAllNamespacesWithPrefix, getAllProperties, getArrayProperty, getContainer, getFirstEquivalentProperty, getNamespacePrefix, getProperty, removeProperty
containsAttribute, getAllAttributes, getAttribute, getMetadata, getPropertyName, removeAttribute, setAttribute, setPropertyName
public XMPSchema(XMPMetadata metadata, String namespaceURI, String prefix, String name)
metadata
- The parent XMP metadata that this schema will be part of.namespaceURI
- The URI of the namespace, e.g. "http://ns.adobe.com/pdf/1.3/"prefix
- The field prefix of the namespace.name
- The property name.public XMPSchema(XMPMetadata metadata)
metadata
- The parent XMP metadata that this schema will be part of.public XMPSchema(XMPMetadata metadata, String prefix)
metadata
- The parent XMP metadata that this schema will be part of.prefix
- The field prefix of the namespace.public XMPSchema(XMPMetadata metadata, String namespaceURI, String prefix)
metadata
- The parent XMP metadata that this schema will be part of.namespaceURI
- The URI of the namespace, e.g. "http://ns.adobe.com/pdf/1.3/"prefix
- The field prefix of the namespace.public AbstractField getAbstractProperty(String qualifiedName)
qualifiedName
- Full qualified name of property wantedpublic Attribute getAboutAttribute()
public String getAboutValue()
public void setAbout(Attribute about) throws BadFieldValueException
about
- the well-formed attributeBadFieldValueException
- Bad Attribute name (not corresponding to about attribute)public void setAboutAsSimple(String about)
about
- The new RFD about value.public void setTextProperty(TextType prop)
prop
- The text property to addpublic void setTextPropertyValue(String qualifiedName, String propertyValue)
qualifiedName
- The name of the property, it must contain the namespace prefix, ie "pdf:Keywords"propertyValue
- The value for the property, can be any string. Passing null will remove the property.public void setTextPropertyValueAsSimple(String simpleName, String propertyValue)
simpleName
- the name of the property without prefixpropertyValue
- The value for the property, can be any string. Passing null will remove the property.public TextType getUnqualifiedTextProperty(String name)
name
- The property name.public String getUnqualifiedTextPropertyValue(String name)
name
- The property name.public DateType getDateProperty(String qualifiedName)
qualifiedName
- The name of the property to get, it must include the namespace prefix, e.g. "pdf:Keywords".public Calendar getDatePropertyValueAsSimple(String simpleName)
simpleName
- the local name of the property to getpublic Calendar getDatePropertyValue(String qualifiedName)
qualifiedName
- The fully qualified property name for the date.public void setDateProperty(DateType date)
date
- The DateType Propertypublic void setDatePropertyValueAsSimple(String simpleName, Calendar date)
simpleName
- the name of the property without prefixdate
- The calendar value for the property, can be any string. Passing null will remove the property.public void setDatePropertyValue(String qualifiedName, Calendar date)
qualifiedName
- The fully qualified property name for the date.date
- The date to set, or null to clear.public BooleanType getBooleanProperty(String qualifiedName)
qualifiedName
- the full qualified name of property wantedpublic Boolean getBooleanPropertyValueAsSimple(String simpleName)
simpleName
- the local name of property wantedpublic Boolean getBooleanPropertyValue(String qualifiedName)
qualifiedName
- The fully qualified property name for the Boolean.public void setBooleanProperty(BooleanType bool)
bool
- the booleanType propertypublic void setBooleanPropertyValueAsSimple(String simpleName, Boolean bool)
simpleName
- the name of the property without prefixbool
- The value for the property, can be any string. Passing null will remove the property.public void setBooleanPropertyValue(String qualifiedName, Boolean bool)
qualifiedName
- The fully qualified property name for the boolean.bool
- The boolean to set, or null to clear.public IntegerType getIntegerProperty(String qualifiedName)
qualifiedName
- the full qualified name of property wantedpublic Integer getIntegerPropertyValueAsSimple(String simpleName)
simpleName
- the local name of property wantedpublic Integer getIntegerPropertyValue(String qualifiedName)
qualifiedName
- The fully qualified property name for the integer.public void setIntegerProperty(IntegerType prop)
prop
- The Integer Type propertypublic void setIntegerPropertyValueAsSimple(String simpleName, Integer intValue)
simpleName
- the name of the property without prefixintValue
- The value for the property, can be any string. Passing null will remove the property.public void setIntegerPropertyValue(String qualifiedName, Integer intValue)
qualifiedName
- The fully qualified property name for the integer.intValue
- The int to set, or null to clear.public void removeUnqualifiedBagValue(String bagName, String bagValue)
bagName
- The bag name.bagValue
- The value to remove from the bagList.public void addBagValueAsSimple(String simpleName, String bagValue)
simpleName
- the local name of propertybagValue
- the string value to addpublic void addQualifiedBagValue(String simpleName, String bagValue)
simpleName
- The name of the bag without the namespace prefixbagValue
- The value to add to the bagList.public List<String> getUnqualifiedBagValueList(String bagName)
bagName
- The bag name.public void removeUnqualifiedSequenceValue(String qualifiedSeqName, String seqValue)
qualifiedSeqName
- The name of the sequence property. It must include the namespace prefix, e.g. "pdf:Keywords".seqValue
- The value to remove from the list.public void removeUnqualifiedArrayValue(String arrayName, AbstractField fieldValue)
arrayName
- the name of the property concernedfieldValue
- the elementable field valuepublic void removeUnqualifiedSequenceValue(String qualifiedSeqName, AbstractField seqValue)
qualifiedSeqName
- The name of the sequence property. It must include the namespace prefix, e.g. "pdf:Keywords".seqValue
- The value to remove from the list.public void addUnqualifiedSequenceValue(String simpleSeqName, String seqValue)
simpleSeqName
- The name of the sequence property without the namespace prefixseqValue
- The value to add to the sequence.public void addBagValue(String qualifiedSeqName, AbstractField seqValue)
qualifiedSeqName
- The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords"seqValue
- The value to add to the bag.public void addUnqualifiedSequenceValue(String seqName, AbstractField seqValue)
seqName
- The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords"seqValue
- The value to add to the sequence.public List<String> getUnqualifiedSequenceValueList(String seqName)
seqName
- The name of the sequence property without namespace prefix.public void removeUnqualifiedSequenceDateValue(String seqName, Calendar date)
seqName
- The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords"date
- The date to remove from the sequence property.public void addSequenceDateValueAsSimple(String simpleName, Calendar date)
simpleName
- the local name of the propertydate
- the value to addpublic void addUnqualifiedSequenceDateValue(String seqName, Calendar date)
seqName
- The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords"date
- The date to add to the sequence property.public List<Calendar> getUnqualifiedSequenceDateValueList(String seqName)
seqName
- The name of the sequence property, it must include the namespace prefix, e.g. "pdf:Keywords".public void reorganizeAltOrder(ComplexPropertyContainer alt)
alt
- The property to reorganizepublic void setUnqualifiedLanguagePropertyValue(String name, String language, String value)
name
- The name of the property, it must include the namespace prefix, e.g. "pdf:Keywords"language
- The language code of the value. If null then "x-default" is assumed.value
- The value of the property in the specified language.public String getUnqualifiedLanguagePropertyValue(String name, String expectedLanguage)
name
- The name of the property, without the namespace prefix.expectedLanguage
- The language code of the value. If null then "x-default" is assumed.public List<String> getUnqualifiedLanguagePropertyLanguagesValue(String name)
name
- The name of the property, it must include the namespace
prefix, e.g. "pdf:Keywords".public void merge(XMPSchema xmpSchema) throws IOException
xmpSchema
- The schema to merge.IOException
- If there is an error during the merge.public List<AbstractField> getUnqualifiedArrayList(String name) throws BadFieldValueException
name
- The property name whitout namespace.BadFieldValueException
- If the property with the requested name isn't an array.protected AbstractSimpleProperty instanciateSimple(String propertyName, Object value)
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.