Package org.apache.xmpbox.type

Examples of org.apache.xmpbox.type.TextType


     *
     * @return the CreationTool value
     */
    public String getCreatorTool()
    {
        TextType tt = ((TextType) getProperty(CREATORTOOL));
        return tt == null ? null : tt.getStringValue();
    }
View Full Code Here


     *
     * @return the label value
     */
    public String getLabel()
    {
        TextType tt = ((TextType) getProperty(LABEL));
        return tt == null ? null : tt.getStringValue();
    }
View Full Code Here

     *
     * @return the Nickname value
     */
    public String getNickname()
    {
        TextType tt = ((TextType) getProperty(NICKNAME));
        return tt == null ? null : tt.getStringValue();
    }
View Full Code Here

    protected void testGetSetTextProperty() throws Exception
    {
        String setName = setMethod(property);
        String getName = getMethod(property);

        TextType tt = metadata.getTypeMapping().createText(null, schema.getPrefix(), property, (String) value);
        Method setMethod = schemaClass.getMethod(setName, TextType.class);
        Method getMethod = schemaClass.getMethod(getName);

        setMethod.invoke(schema, tt);
        String found = ((TextType) getMethod.invoke(schema)).getStringValue();
View Full Code Here

        DomXmpParser builder = new DomXmpParser();
        builder.setStrictParsing(false);
        XMPMetadata rxmp = builder.parse(is);
        ExifSchema schema = (ExifSchema)rxmp.getSchema(ExifSchema.class);
        TextType ss = (TextType)schema.getProperty(ExifSchema.SPECTRAL_SENSITIVITY);
        Assert.assertNotNull(ss);
        Assert.assertEquals("spectral sens value",ss.getValue());
    }
View Full Code Here

    public void testArrayList() throws Exception
    {
        XMPMetadata meta = XMPMetadata.createXMPMetadata();
        ArrayProperty newSeq = meta.getTypeMapping().createArrayProperty(null, "nsSchem", "seqType", Cardinality.Seq);
        TypeMapping tm = meta.getTypeMapping();
        TextType li1 = tm.createText(null, "rdf", "li", "valeur1");
        TextType li2 = tm.createText(null, "rdf", "li", "valeur2");
        newSeq.getContainer().addProperty(li1);
        newSeq.getContainer().addProperty(li2);
        schem.addProperty(newSeq);
        List<AbstractField> list = schem.getUnqualifiedArrayList("seqType");
        Assert.assertTrue(list.contains(li1));
View Full Code Here

    {
        String prop = "testprop";
        String val = "value";
        String val2 = "value2";
        schem.setTextPropertyValueAsSimple(prop, val);
        TextType text = schem.getMetadata().getTypeMapping().createText(null, schem.getPrefix(), prop, "value2");
        schem.setTextProperty(text);
        Assert.assertEquals(val2, schem.getUnqualifiedTextPropertyValue(prop));
        Assert.assertEquals(text, schem.getUnqualifiedTextProperty(prop));
    }
View Full Code Here

        String textProp = "textProp";
        String textPropVal = "TextPropTest";
        schem.setTextPropertyValue(textProp, textPropVal);
        Assert.assertEquals(textPropVal, schem.getUnqualifiedTextPropertyValue(textProp));

        TextType text = parent.getTypeMapping().createText(null, "nsSchem", "textType", "GRINGO");
        schem.setTextProperty(text);
        Assert.assertEquals(text, schem.getUnqualifiedTextProperty("textType"));

        Calendar dateVal = Calendar.getInstance();
        String date = "nsSchem:dateProp";
View Full Code Here

     * @return The value of the text property or the null if there is no value.
     *
     */
    public String getUnqualifiedTextPropertyValue(String name)
    {
        TextType tt = getUnqualifiedTextProperty(name);
        return tt == null ? null : tt.getStringValue();
    }
View Full Code Here

    }

    private void internalAddBagValue(String qualifiedBagName, String bagValue)
    {
        ArrayProperty bag = (ArrayProperty) getAbstractProperty(qualifiedBagName);
        TextType li = createTextType(XmpConstants.LIST_NAME, bagValue);
        if (bag != null)
        {
            bag.getContainer().addProperty(li);
        }
        else
View Full Code Here

TOP

Related Classes of org.apache.xmpbox.type.TextType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.