Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.URIImpl


  }

  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 testValueRoundTrip5()
    throws Exception
  {
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    Literal obj = new NumericLiteralImpl(3);

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

  {
    StringBuffer sb = new StringBuffer();
    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);
    URI obj = new URIImpl(EXAMPLE_NS + GUERNICA + sb.toString());

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

  {
    StringBuffer sb = new StringBuffer();
    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

  {
    StringBuffer sb = new StringBuffer();
    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(), "es");

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

    con.commit();

    assertEquals("Size of repository should be 5", 5, con.size());
    assertEquals("Size of named context should be 3", 3, con.size(context1));

    URI unknownContext = new URIImpl(EXAMPLE_NS + "unknown");

    assertEquals("Size of unknown context should be 0", 0, con.size(unknownContext));

    URIImpl uriImplContext1 = new URIImpl(context1.toString());

    assertEquals("Size of named context (defined as URIImpl) should be 3", 3, con.size(uriImplContext1));
  }
View Full Code Here

   */
  public void testNamedContext_PUT()
    throws Exception
  {
    String location = Protocol.getStatementsLocation(TestServer.REPOSITORY_URL);
    String encContext = Protocol.encodeValue(new URIImpl("urn:x-local:graph1"));
    location = HttpClientUtil.appendParameter(location, Protocol.CONTEXT_PARAM_NAME, encContext);
    putFile(location, "/testcases/named-graph-1.ttl");
  }
View Full Code Here

   */
  public void testNamedContext_DELETE()
    throws Exception
  {
    String location = Protocol.getStatementsLocation(TestServer.REPOSITORY_URL);
    String encContext = Protocol.encodeValue(new URIImpl("urn:x-local:graph1"));
    location = HttpClientUtil.appendParameter(location, Protocol.CONTEXT_PARAM_NAME, encContext);
    delete(location);
  }
View Full Code Here

  private TupleQueryResult createQueryResult() {
    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));
View Full Code Here

      return null;

    String redirectURL = cacheController.getCachedRedirect(lookupURL);
   
    try {
      lookupURLContext = new URIImpl(redirectURL != null ? redirectURL : lookupURL);
    }
    catch (IllegalArgumentException e) {
      e.printStackTrace();
      return null;
    }
View Full Code Here

TOP

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

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.