Search in sources :

Example 6 with IntegerType

use of org.apache.xmpbox.type.IntegerType in project pdfbox by apache.

the class AbstractXMPSchemaTest method testGetSetIntegerProperty.

protected void testGetSetIntegerProperty() throws Exception {
    String setName = setMethod(property);
    String getName = getMethod(property);
    IntegerType it = new IntegerType(metadata, null, schema.getPrefix(), property, value);
    Method setMethod = schemaClass.getMethod(setName, IntegerType.class);
    Method getMethod = schemaClass.getMethod(getName);
    setMethod.invoke(schema, it);
    Integer found = ((IntegerType) getMethod.invoke(schema)).getValue();
    Assert.assertEquals(value, found);
}
Also used : IntegerType(org.apache.xmpbox.type.IntegerType) Method(java.lang.reflect.Method)

Example 7 with IntegerType

use of org.apache.xmpbox.type.IntegerType in project pdfbox by apache.

the class PDFAIdentificationSchema method setPartValueWithInt.

/**
 * Set the PDFA Version identifier (with an int)
 *
 * @param value
 *            The version Id value to set
 */
public void setPartValueWithInt(int value) {
    IntegerType part = (IntegerType) instanciateSimple(PART, value);
    addProperty(part);
}
Also used : IntegerType(org.apache.xmpbox.type.IntegerType)

Example 8 with IntegerType

use of org.apache.xmpbox.type.IntegerType in project pdfbox by apache.

the class PhotoshopSchema method setUrgency.

public void setUrgency(String s) {
    IntegerType tt = (IntegerType) instanciateSimple(URGENCY, s);
    setUrgencyProperty(tt);
}
Also used : IntegerType(org.apache.xmpbox.type.IntegerType)

Example 9 with IntegerType

use of org.apache.xmpbox.type.IntegerType in project pdfbox by apache.

the class XMPBasicSchema method setRating.

/**
 * Set a number that indicates a document's status relative to other documents, used to organize documents in a file
 * browser (values are user-defined within an application-defined range)
 *
 * @param rate
 *            the rate value to set
 */
public void setRating(Integer rate) {
    IntegerType tt = (IntegerType) instanciateSimple(RATING, rate);
    setRatingProperty(tt);
}
Also used : IntegerType(org.apache.xmpbox.type.IntegerType)

Aggregations

IntegerType (org.apache.xmpbox.type.IntegerType)9 Method (java.lang.reflect.Method)1 Calendar (java.util.Calendar)1 Attribute (org.apache.xmpbox.type.Attribute)1 BooleanType (org.apache.xmpbox.type.BooleanType)1 DateType (org.apache.xmpbox.type.DateType)1 TextType (org.apache.xmpbox.type.TextType)1 Test (org.junit.Test)1