Examples of Literal


Examples of org.modeshape.jcr.query.xpath.XPath.Literal

                                               OrderBy orderBy ) {
        return new PathExpression(true, steps, orderBy);
    }

    protected Literal literal( String value ) {
        return new Literal(value);
    }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.Literal

        } else if (object instanceof LanguageTagLiteral) {
            final LanguageTagLiteral literal = (LanguageTagLiteral) object;
            addStatement(result, context, subject, predicate, literal.getValue(),
                    literal.getLanguageTag());
        } else if (object instanceof Literal) {
            final Literal literal = (Literal) object;
            addStatement(result, context, subject, predicate, literal.getValue());
        } else {
            addStatement(result, context, subject, predicate, object.asURI());
        }
    }
View Full Code Here

Examples of org.opengis.filter.expression.Literal

   *            the name of the geometry field ("the_geom")
   * @return filter
   */
  public Filter createContainsFilter(Geometry geometry, String geomName) {
    Expression nameExpression = FF.property(geomName);
    Literal geomLiteral = FF.literal(geometry);
    return FF.contains(nameExpression, geomLiteral);
  }
View Full Code Here

Examples of org.openrdf.model.Literal

    StringBuilder sb = new StringBuilder(66000);
    for (int i = 0; i < 66000; i++) {
      sb.append('a');
    }

    Literal longLiteral = store.getLiteralFactory().createLiteral(sb.toString());

    SailConnection con = store.getConnection();
    con.addStatement(foo, RDF.TYPE, longLiteral);
    con.close();
    store.shutDown();
View Full Code Here

Examples of org.pdf4j.saxon.expr.Literal

                                              serializationAttributes,
                                              (needsNamespaceContext ? namespaceResolver : null));

        Expression b = compileSequenceConstructor(exec, iterateAxis(Axis.CHILD), true);
        if (b == null) {
            b = new Literal(EmptySequence.getInstance());
        }
        inst.setContent(b);
        return inst;
    }
View Full Code Here

Examples of org.restlet.ext.rdf.Literal

        }
    }

    private void addFoafProperty(Graph graph, Reference subject,
            String predicate, String object) {
        graph.add(subject, new Reference(FOAF_NS + predicate), new Literal(
                object));
    }
View Full Code Here

Examples of org.semanticweb.yars.nx.Literal

    //    }

    //    System.out.println("S=" + subject.toN3() + " P=" + predicate.toN3());

    if (object instanceof Literal) {
      Literal value = (Literal)object;
      // Resolve the \\u0FF.. stuff
      String cleanData = value.getUnescapedData();

      try {
        cleanData = URLDecoder.decode(cleanData, "utf8");
      } catch (IllegalArgumentException e) {}

      if (value.getDatatype() == null) {
        return new DataTriple(subject.toN3(), predicate.toN3(), cleanData, value.getLanguageTag());
      } else if (value.getDatatype().toN3().equals("<http://www.w3.org/2001/XMLSchema#double>")) {
        return new DataTriple(subject.toN3(), predicate.toN3(), Double.parseDouble(value.getData()));
      } else  {
        return new DataTriple(subject.toN3(), predicate.toN3(), cleanData, null);
      }


    } else {
      Resource value = (Resource)object;
      //      System.out.println("OBJ " + value.toN3());
      return new LinkTriple(subject.toN3(), predicate.toN3(), value.toN3());
    }
  }
View Full Code Here

Examples of org.teiid.language.Literal

        sqlVisitor.append(func)
        assertEquals(expectedStr, sqlVisitor.toString());
    }
    public void test1() throws Exception {
        Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createDate(104, 0, 21), java.sql.Date.class);
        helpTestMod(arg1, "EXTRACT(MONTH FROM {d '2004-01-21'})" , "month");   //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

Examples of org.teiid.language.Literal

        Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createTimestamp(104, 0, 21, 17, 5, 0, 0), Timestamp.class);
        helpTestMod(arg1, "EXTRACT(YEAR FROM {ts '2004-01-21 17:05:00.0'})", "year"); //$NON-NLS-1$ //$NON-NLS-2$
    }
   
    public void test5() throws Exception {
        Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createDate(104, 0, 21), java.sql.Date.class);
        helpTestMod(arg1, "EXTRACT(DAY FROM {d '2004-01-21'})", "dayofmonth"); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

Examples of org.teiid.language.Literal

        Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createDate(104, 0, 21), java.sql.Date.class);
        helpTestMod(arg1, "EXTRACT(DAY FROM {d '2004-01-21'})", "dayofmonth"); //$NON-NLS-1$ //$NON-NLS-2$
    }

    public void test6() throws Exception {
        Literal arg1 = LANG_FACTORY.createLiteral(TimestampUtil.createTimestamp(104, 0, 21, 17, 5, 0, 0), Timestamp.class);
        helpTestMod(arg1, "EXTRACT(DAY FROM {ts '2004-01-21 17:05:00.0'})", "dayofmonth"); //$NON-NLS-1$ //$NON-NLS-2$
    }   
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.