Examples of RealType


Examples of net.percederberg.mibble.type.RealType

     * @param node           the node being exited
     *
     * @return the node to add to the parse tree
     */
    protected Node exitRealType(Production node) {
        node.addValue(new RealType());
        return node;
    }
View Full Code Here

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

   *
   * @throws InappropriateTypeException
   */
  @Test(expected = IllegalArgumentException.class)
  public void testRealBadTypeDetection() throws Exception {
    new RealType(parent, "test", "real", "Not a real");
  }
View Full Code Here

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

    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.RealType

  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());

    // XMLUtil.save(parent.getFuturOwner(), System.out, "UTF-8");

  }
View Full Code Here

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

    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.RealType

    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());

    // XMLUtil.save(parent.getFuturOwner(), System.out, "UTF-8");

  }
View Full Code Here

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

        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")) {
        schema.getContent().addProperty(new DateType(metadata, prefix, attr.getLocalName(), attr.getValue()));
        added = true;
      } else if (type.equals("URI")) {
View Full Code Here

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

      } 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()
            .getElementText());
      }
      if (prop != null) {
        container.addProperty(prop);
View Full Code Here

Examples of org.exolab.castor.xml.schema.simpletypes.RealType

                facet.setOwningType(result);
                result.addFacet(facet);
            } else {
                //sets the information linked with the pseudo facet
                if (RealType.class.isInstance(result)) {
                    RealType realResult = (RealType) result;
                    if (prop.getName().equals("minM")) {
                        realResult.setMinMantissa(Long.parseLong(prop.getValue()));
                    } else if (prop.getName().equals("maxM")) {
                        realResult.setMaxMantissa(Long.parseLong(prop.getValue()));
                    } else if (prop.getName().equals("minE")) {
                        realResult.setMinExponent(Long.parseLong(prop.getValue()));
                    } else if (prop.getName().equals("maxE")) {
                        realResult.setMaxExponent(Long.parseLong(prop.getValue()));
                    }
                }
            }
        }
        return result;
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.