Examples of asLiteral()


Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

            final Statement statement = statements.next();
            final Property predicate = statement.getPredicate();
            final RDFNode object = statement.getObject();

            if (object.isLiteral()) {
                final Literal literal = object.asLiteral();
                final String value = literal.getLexicalForm();
                final String datatypeURI = literal.getDatatypeURI();
                String language = literal.getLanguage();
                if ("".equals(language)) {
                    language = null;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Resource.asLiteral()

  {
    final Model m = ModelHelper.modelWithStatements(this, "");
    final Resource r = m.createResource("eh:/spoo");
    try
    {
      r.asLiteral();
      Assert.fail("should not be able to do Resource.asLiteral()");
    }
    catch (final LiteralRequiredException e)
    {
    }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Resource.asLiteral()

  {
    final Model m = ModelHelper.modelWithStatements(this, "");
    final Resource r = m.createResource("eh:/spoo");
    try
    {
      r.asLiteral();
      Assert.fail("should not be able to do Resource.asLiteral()");
    }
    catch (final LiteralRequiredException e)
    {
    }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Resource.asLiteral()

  {
    final Model m = ModelHelper.modelWithStatements(this, "");
    final Resource r = m.createResource("eh:/spoo");
    try
    {
      r.asLiteral();
      Assert.fail("should not be able to do Resource.asLiteral()");
    }
    catch (final LiteralRequiredException e)
    {
    }
View Full Code Here

Examples of edu.neu.ccs.task.TaskEngine.asLiteral()

      "environment, so $this is not bound.")
  public void _eval(String expr) {
    TaskEngine e = getEngine();
    Object value = e.evalGlobal(expr, "console eval");
    if (value != null)
      out.println(e.asLiteral(value, "console eval"));
  }
 
  @Desc("load a model file")
  @Help("Usage: load FILE\n" +
      "Usage: load PREFIX=FILE\n" +
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.DatatypeLiteral.asLiteral()

    assertEquals(node, node.asBlankNode());
  }
 
  public void testCreateDatatypeLiteral() {
    DatatypeLiteral datatypeLiteral = this.model.createDatatypeLiteral("literal", dt);
    assertEquals("literal^^" + dt, datatypeLiteral.asLiteral().toString());
  }
 
  public void testCreateLanguageTagLiteral() {
    LanguageTagLiteral languageTagLiteral = this.model.createLanguageTagLiteral("literal",
            "en-us");
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.DatatypeLiteral.asLiteral()

  }
 
  @Test
  public void testCreateDatatypeLiteral() {
    DatatypeLiteral datatypeLiteral = this.modelset.createDatatypeLiteral("literal", dt);
    assertEquals("literal^^" + dt, datatypeLiteral.asLiteral().toString());
  }
 
  @Test
  public void testCreateLanguageTagLiteral() {
    LanguageTagLiteral languageTagLiteral = this.modelset.createLanguageTagLiteral("literal",
View Full Code Here

Examples of org.openquark.cal.compiler.Expression.asLiteral()

                                    unqualifiedOpName.equals("remainderByte"))) {

                        // Check that the second argument is a non zero literal.

                        Expression arg = basicOpExpressions.getArgument(1);
                        if (arg.asLiteral() != null) {

                            if (unqualifiedOpName.equals("divideLong") || unqualifiedOpName.equals("remainderLong")) {

                                Long l = (Long)arg.asLiteral().getLiteral();
                                return l.longValue() != 0;
View Full Code Here

Examples of org.openquark.cal.compiler.Expression.asLiteral()

                        Expression arg = basicOpExpressions.getArgument(1);
                        if (arg.asLiteral() != null) {

                            if (unqualifiedOpName.equals("divideLong") || unqualifiedOpName.equals("remainderLong")) {

                                Long l = (Long)arg.asLiteral().getLiteral();
                                return l.longValue() != 0;

                            } else if (unqualifiedOpName.equals("divideInt") || unqualifiedOpName.equals("remainderInt")) {

                                Integer i = (Integer)arg.asLiteral().getLiteral();
View Full Code Here

Examples of org.openquark.cal.compiler.Expression.asLiteral()

                                Long l = (Long)arg.asLiteral().getLiteral();
                                return l.longValue() != 0;

                            } else if (unqualifiedOpName.equals("divideInt") || unqualifiedOpName.equals("remainderInt")) {

                                Integer i = (Integer)arg.asLiteral().getLiteral();
                                return i.intValue() != 0;

                            } else if (unqualifiedOpName.equals("divideShort") || unqualifiedOpName.equals("remainderShort")) {

                                Short shortValue = (Short)arg.asLiteral().getLiteral();
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.