Examples of BooleanType


Examples of org.apache.padaf.xmpbox.type.BooleanType

        added = true;
      } else if (type.equals("Integer")) {
        schema.getContent().addProperty(new IntegerType(metadata, prefix, attr.getLocalName(), attr.getValue()));
        added = true;
      } else if (type.equals("Boolean")) {
        schema.getContent().addProperty(new BooleanType(metadata, prefix, attr.getLocalName(), attr.getValue()));
        added = true;
      } else if (type.equals("Real")) {
        schema.getContent().addProperty(new RealType(metadata, prefix, attr.getLocalName(), attr.getValue()));
        added = true;
      } else if (type.equals("Date")) {
View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

      } else if (stype == XmpPropertyType.Date) {
        prop = new DateType(metadata, propertyName.getPrefix(),
            propertyName.getLocalPart(), reader.get()
            .getElementText());
      } else if (stype == XmpPropertyType.Boolean) {
        prop = new BooleanType(metadata, propertyName.getPrefix(),
            propertyName.getLocalPart(), reader.get()
            .getElementText());
      } else if (stype == XmpPropertyType.Real) {
        prop = new RealType(metadata, propertyName.getPrefix(),
            propertyName.getLocalPart(), reader.get()
View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

   *
   * @throws InappropriateTypeException
   */
  @Test(expected = IllegalArgumentException.class)
  public void testBooleanBadTypeDetection() {
    new BooleanType(parent, "test", "booleen", "Not a Boolean");
  }
View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

    boolean boolv = true;
    Calendar datev = Calendar.getInstance();
    int integerv = 1;
    float realv = Float.parseFloat("1.69");
    String textv = "TEXTCONTENT";
    BooleanType bool = new BooleanType(parent, "test", "booleen", boolv);
    DateType date = new DateType(parent, "test", "date", datev);
    IntegerType integer = new IntegerType(parent, "test", "integer",
        integerv);
    RealType real = new RealType(parent, "test", "real", realv);
    TextType text = new TextType(parent, "test", "text", textv);

    Assert.assertEquals(bool.getNamespace(), bool.getElement()
        .getNamespaceURI());
    Assert.assertEquals(bool.getPrefix() + ":" + bool.getPropertyName(),
        bool.getElement().getNodeName());
    Assert.assertEquals(bool.getQualifiedName(), bool.getElement()
        .getNodeName());
    Assert.assertEquals(boolv, bool.getValue());
    Assert.assertEquals(datev, date.getValue());
    Assert.assertEquals(integerv, integer.getValue());
    Assert.assertEquals(realv, real.getValue(), 0);
    Assert.assertEquals(textv, text.getStringValue());
View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

   *
   * @throws Exception
   */
  @Test
  public void testObjectCreationFromJavaType() throws Exception {
    BooleanType bool = new BooleanType(parent, "test", "booleen", true);
    DateType date = new DateType(parent, "test", "date", Calendar
        .getInstance());
    IntegerType integer = new IntegerType(parent, "test", "integer", 1);
    RealType real = new RealType(parent, "test", "real", (float) 1.6);
    TextType text = new TextType(parent, "test", "text", "TEST");

    Element e = parent.getFuturOwner().createElement("TEST");
    parent.getFuturOwner().appendChild(e);
    e.appendChild(bool.getElement());
    e.appendChild(date.getElement());
    e.appendChild(integer.getElement());
    e.appendChild(real.getElement());
    e.appendChild(text.getElement());

View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

    String datev = "2010-03-22T14:33:11+01:00";
    String integerv = "10";
    String realv = "1.92";
    String textv = "text";

    BooleanType bool = new BooleanType(parent, "test", "booleen", boolv);
    DateType date = new DateType(parent, "test", "date", datev);
    IntegerType integer = new IntegerType(parent, "test", "integer",
        integerv);
    RealType real = new RealType(parent, "test", "real", realv);
    TextType text = new TextType(parent, "test", "text", textv);

    Assert.assertEquals(boolv, bool.getStringValue());
    Assert.assertEquals(datev, date.getStringValue());
    Assert.assertEquals(integerv, integer.getStringValue());
    Assert.assertEquals(realv, real.getStringValue());
    Assert.assertEquals(textv, text.getStringValue());
  }
View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

   * @throws Exception
   */
  @Test
  public void testObjectCreationWithNamespace() throws Exception {
    String ns = "http://www.test.org/pdfa/";
    BooleanType bool = new BooleanType(parent, ns, "test", "booleen", true);
    DateType date = new DateType(parent, ns, "test", "date", Calendar
        .getInstance());
    IntegerType integer = new IntegerType(parent, ns, "test", "integer", 1);
    RealType real = new RealType(parent, ns, "test", "real", (float) 1.6);
    TextType text = new TextType(parent, ns, "test", "text", "TEST");

    Assert.assertEquals(ns, bool.getNamespace());
    Assert.assertEquals(ns, date.getNamespace());
    Assert.assertEquals(ns, integer.getNamespace());
    Assert.assertEquals(ns, real.getNamespace());
    Assert.assertEquals(ns, text.getNamespace());

    Element e = parent.getFuturOwner().createElement("TEST");
    parent.getFuturOwner().appendChild(e);
    e.appendChild(bool.getElement());
    e.appendChild(date.getElement());
    e.appendChild(integer.getElement());
    e.appendChild(real.getElement());
    e.appendChild(text.getElement());

View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

   *
   * @param marked
   *            value to add
   */
  public void setMarkedValue(Boolean marked) {
    addProperty(new BooleanType(metadata, localPrefix, MARKED, marked));
  }
View Full Code Here

Examples of org.apache.padaf.xmpbox.type.BooleanType

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

Examples of org.apache.padaf.xmpbox.type.BooleanType

      }
    }

    XMPRightsManagementSchema rights = metadata.getXMPRightsManagementSchema();
    if (rights != null) {
      BooleanType marked = rights.getMarked();
      if (marked != null && !marked.getValue()) {
        ve
        .add(new ValidationError(
            ValidationConstants.ERROR_METADATA_PROPERTY_MISSING,
        "the XMP information (xmpRights:Marked) is invalid for the Font File Stream."));
        return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.