Examples of createValue()


Examples of javax.jcr.ValueFactory.createValue()

        hello2.setProperty("data""y");
        session.save();
        ValueFactory vf = session.getValueFactory();
        QueryManager qm = session.getWorkspace().getQueryManager();
        Query q = qm.createQuery("select id from [nt:base] where data >= $data order by id", Query.JCR_SQL2);
        q.bindValue("data", vf.createValue("x"));
        for (int limit = 0; limit < 5; limit++) {
            q.setLimit(limit);
            for (int offset = 0; offset < 3; offset++) {
                q.setOffset(offset);
                QueryResult r = q.execute();
View Full Code Here

Examples of javax.jcr.ValueFactory.createValue()

        // secure
        Query q = qm.createQuery(
                "select text from [nt:base] where password = $p",
                Query.JCR_SQL2 + "-noLiterals");
        q.bindValue("p", vf.createValue("x"));
        q.execute();
    }

    @SuppressWarnings("deprecation")
    @Test
View Full Code Here

Examples of javax.xml.parsers.SAXParserFactory.createValue()

                    parentNode = parent.getNode(path.substring(0, idx));
                    path = path.substring(idx + 1);
                }
                // only update binary if import mode is not MERGE
                if (wspFilter.getImportMode(parentNode.getPath()) != ImportMode.MERGE) {
                    Value value = factory.createValue(binary.getInputStream());
                    if (!parentNode.hasProperty(path)
                            || !value.equals(parentNode.getProperty(path).getValue())) {
                        parent.setProperty(path, value);
                        if (info == null) {
                            info = new ImportInfoImpl();
View Full Code Here

Examples of org.apache.batik.css.engine.value.ValueManager.createValue()

                    try {
                        LexicalUnit lu;
                        int idx = getPropertyIndex(an);
                        lu = parser.parsePropertyValue(attr.getNodeValue());
                        ValueManager vm = valueManagers[idx];
                        Value v = vm.createValue(lu, this);
                        putAuthorProperty(result, idx, v, false,
                                          StyleMap.NON_CSS_ORIGIN);
                    } catch (Exception e) {
                        String m = e.getMessage();
                        String s =
View Full Code Here

Examples of org.apache.batik.css.value.ValueFactory.createValue()

  try {
      ValueFactory f;
            f = factories.get(propertyName.toLowerCase().intern());
      InputSource is = new InputSource(new StringReader(value));
      LexicalUnit lu = parser.parsePropertyValue(is);
      CSSOMValue   v = new CSSOMValue(f, f.createValue(lu));
      setPropertyCSSValue(propertyName, v, prio);
  } catch (Exception e) {
      throw CSSDOMExceptionFactory.createDOMException
    (DOMException.INVALID_ACCESS_ERR,
     "property.value",
View Full Code Here

Examples of org.apache.flex.forks.batik.css.engine.value.ValueManager.createValue()

                    public void property(String pname, LexicalUnit lu,
                                         boolean important) {
                        int idx = getPropertyIndex(pname);
                        if (idx != -1) {
                            ValueManager vm = valueManagers[idx];
                            Value v = vm.createValue(lu, CSSEngine.this);
                            putAuthorProperty(result, idx, v, important,
                                              StyleMap.NON_CSS_ORIGIN);
                            return;
                        }
                        idx = getShorthandIndex(pname);
View Full Code Here

Examples of org.apache.hadoop.mapred.RecordReader.createValue()

    int readCount = 0;
    for (int i = 0; i < splits.length; i++) {
      int previousReadCount = readCount;
      RecordReader rr = inputFormat.getRecordReader(splits[i], jonconf, Reporter.NULL);
      Object key = rr.createKey();
      Object value = rr.createValue();
      while (rr.next(key, value)) {
        readCount++;
      }
      System.out.println("The " + i + "th split read "
          + (readCount - previousReadCount));
View Full Code Here

Examples of org.apache.hadoop.mapred.lib.db.DBInputFormat.DBRecordReader.createValue()

    DBRecordReader reader = new DBInputFormat<NullDBWritable>().new DBRecordReader(
        new DBInputSplit(),  NullDBWritable.class, job,
        DriverForTest.getConnection(), dbConfig, "condition", fields, "table");
    LongWritable key = reader.createKey();
    assertEquals(0, key.get());
    DBWritable value = reader.createValue();
    assertEquals(
        "org.apache.hadoop.mapred.lib.db.DBInputFormat$NullDBWritable", value
            .getClass().getName());
    assertEquals(0, reader.getPos());
    assertFalse(reader.next(key, value));
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.value.date.DateValueFacet.createValue()

            final int row = row(location);
            if (col >= 0 && col < COLUMNS && row >= 0 && row < ROWS) {
                date.add(Calendar.DAY_OF_MONTH, row * 7 + col);
                final Content content = getContent();
                final DateValueFacet facet = content.getSpecification().getFacet(DateValueFacet.class);
                final ObjectAdapter value = facet.createValue(date.getTime());
                ((TextParseableContent) content).parseTextEntry(value.titleString());
                ((TextParseableContent) content).entryComplete();
                /*
                 * if (content.isObject()) { ((ObjectContent)
                 * content).setObject(value); }
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.value.image.ImageValueFacet.createValue()

            throw new IsisException(e);
        }

        // final ObjectAdapter value = getContent().getAdapter();
        final ImageValueFacet facet = ((FieldContent) getContent()).getSpecification().getFacet(ImageValueFacet.class);
        final ObjectAdapter object = facet.createValue(image);
        ((OneToOneField) getContent()).setObject(object);
        // ((TextParseableField) getContent()).entryComplete();
        invalidateLayout();
    }
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.