Package org.apache.xmpbox.type

Examples of org.apache.xmpbox.type.BooleanType


     *
     * @return marked value
     */
    public Boolean getMarked()
    {
        BooleanType bt = ((BooleanType) getProperty(MARKED));
        return bt == null ? null : bt.getValue();
    }
View Full Code Here


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

        BooleanType bt = new BooleanType(metadata, null, schema.getPrefix(), property, value);
        Method setMethod = schemaClass.getMethod(setName, BooleanType.class);
        Method getMethod = schemaClass.getMethod(getName);

        setMethod.invoke(schema, bt);
        Boolean found = ((BooleanType) getMethod.invoke(schema)).getValue();
View Full Code Here

        }

        XMPRightsManagementSchema rights = metadata.getXMPRightsManagementSchema();
        if (rights != null)
        {
            BooleanType marked = rights.getMarkedProperty();
            if (marked != null && !marked.getValue())
            {
                ve.add(new ValidationError(PreflightConstants.ERROR_METADATA_PROPERTY_MISSING,
                        "the XMP information (xmpRights:Marked) is invalid for the Font File Stream."));
                return false;
            }
View Full Code Here

     */
    @Test
    public void testSeqManagement() throws Exception
    {
        Calendar date = Calendar.getInstance();
        BooleanType bool = parent.getTypeMapping().createBoolean(null, "rdf", "li", true);
        String textVal = "seqValue";
        String seqName = "SEQNAME";

        schem.addUnqualifiedSequenceDateValue(seqName, date);
        schem.addUnqualifiedSequenceValue(seqName, bool);
        schem.addUnqualifiedSequenceValue(seqName, textVal);

        List<Calendar> dates = schem.getUnqualifiedSequenceDateValueList(seqName);
        Assert.assertEquals(1, dates.size());
        Assert.assertEquals(date, dates.get(0));

        List<String> values = schem.getUnqualifiedSequenceValueList(seqName);
        Assert.assertEquals(3, values.size());
        Assert.assertEquals(DateConverter.toISO8601(date), values.get(0));
        Assert.assertEquals(bool.getStringValue(), values.get(1));
        Assert.assertEquals(textVal, values.get(2));

        schem.removeUnqualifiedSequenceDateValue(seqName, date);
        Assert.assertEquals(0, schem.getUnqualifiedSequenceDateValueList(seqName).size());

View Full Code Here

        String bool = "nsSchem:booleanTestProp";
        Boolean boolVal = false;
        schem.setBooleanPropertyValue(bool, boolVal);
        Assert.assertEquals(boolVal, schem.getBooleanPropertyValue(bool));

        BooleanType boolType = parent.getTypeMapping().createBoolean(null, "nsSchem", "boolType", false);
        schem.setBooleanProperty(boolType);
        Assert.assertEquals(boolType, schem.getBooleanProperty("boolType"));

        String intProp = "nsSchem:IntegerTestProp";
        Integer intPropVal = 5;
View Full Code Here

    @Test
    public void testListAndContainerAccessor() throws Exception
    {
        String boolname = "bool";
        boolean boolVal = true;
        BooleanType bool = parent.getTypeMapping().createBoolean(null, schem.getPrefix(), boolname, boolVal);
        Attribute att = new Attribute(XmpConstants.RDF_NAMESPACE, "test", "vgh");
        schem.setAttribute(att);
        schem.setBooleanProperty(bool);

        Assert.assertEquals(schem.getAllProperties(), schem.getAllProperties());
View Full Code Here

TOP

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

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.