Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.LiteralImpl


  {

    Model model = new LinkedHashModel();
    Resource context = vf.createBNode(id);
    model.add(context, RDF.TYPE, REPOSITORY_CONTEXT);
    model.add(context, REPOSITORYID, new LiteralImpl(id), context);
    model.filter(null, null, null, context).addAll(config);

    addSystemModel(model);
  }
View Full Code Here


    List<String> bindingNames = Arrays.asList("a", "b", "c");

    MapBindingSet solution1 = new MapBindingSet(bindingNames.size());
    solution1.addBinding("a", new URIImpl("foo:bar"));
    solution1.addBinding("b", new BNodeImpl("bnode"));
    solution1.addBinding("c", new LiteralImpl("baz"));

    MapBindingSet solution2 = new MapBindingSet(bindingNames.size());
    solution2.addBinding("a", new LiteralImpl("1", XMLSchema.INTEGER));
    solution2.addBinding("c", new LiteralImpl("Hello World!", "en"));

    List<? extends BindingSet> bindingSetList = Arrays.asList(solution1, solution2);

    return new TupleResultImpl(bindingNames, bindingSetList);
  }
View Full Code Here

      sb.append(Character.toChars('A' + (i % 26)));
    }
    String EXAMPLE_NS = "urn:test:";
    URI subj = new URIImpl(EXAMPLE_NS + "PICASSO");
    URI pred = new URIImpl(EXAMPLE_NS + "PAINTS");
    Literal obj = new LiteralImpl("guernica" + sb.toString());

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

      sb.append(Character.toChars('A' + (i % 26)));
    }
    String EXAMPLE_NS = "urn:test:";
    URI subj = new URIImpl(EXAMPLE_NS + "PICASSO");
    URI pred = new URIImpl(EXAMPLE_NS + "PAINTS");
    Literal obj = new LiteralImpl("guernica" + sb.toString());

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

      sb.append(Character.toChars('A' + (i % 26)));
    }
    String EXAMPLE_NS = "urn:test:";
    URI subj = new URIImpl(EXAMPLE_NS + "PICASSO");
    URI pred = new URIImpl(EXAMPLE_NS + "PAINTS");
    Literal obj = new LiteralImpl("guernica" + sb.toString(), "es");

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

  public void testValueRoundTrip3()
    throws Exception
  {
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    Literal obj = new LiteralImpl("guernica");

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

  public void testValueRoundTrip4()
    throws Exception
  {
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    Literal obj = new LiteralImpl("guernica", "es");

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

  public void testTimeZoneRoundTrip()
    throws Exception
  {
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    Literal obj = new LiteralImpl("2006-08-23+00:00", XMLSchema.DATE);
    testValueRoundTrip(subj, pred, obj);

    con.removeStatements(null, null, null);
    obj = new LiteralImpl("2006-08-23", XMLSchema.DATE);
    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

    for (int i = 0; i < 512; i++) {
      sb.append(Character.toChars('A' + (i % 26)));
    }
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    Literal obj = new LiteralImpl("guernica" + sb.toString());

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

    for (int i = 0; i < 1024000; i++) {
      sb.append(Character.toChars('A' + (i % 26)));
    }
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    Literal obj = new LiteralImpl("guernica" + sb.toString());

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

TOP

Related Classes of org.openrdf.model.impl.LiteralImpl

Copyright © 2018 www.massapicom. 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.