Examples of URIImpl


Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

     * @throws ModelRuntimeException if URI syntax is wrong
     *
     *             [Generated from RDFReactor template rule #c7]
     */
    public Resource(Model model, String uriString, boolean write) throws ModelRuntimeException {
        super(model, RDFS_CLASS, new URIImpl(uriString, false), write);
    }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

    // solution.
    if(n == null)
      return null;
   
    if(n.isURI())
      return new URIImpl(n.getURI());
   
    if(n.isVariable())
      throw new RuntimeException("Cannot convert a Jena variable to an RDF2Go node");
   
    if(n.isLiteral()) {
      LiteralLabel lit = n.getLiteral();
      // datatype
      if(lit.getDatatypeURI() != null) {
        return new DatatypeLiteralImpl(lit.getLexicalForm(), new URIImpl(
                lit.getDatatypeURI()));
      }
     
      // language tagged
      if(lit.language() != null && !lit.language().equals(""))
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

  @Before
  public void setUp() throws Exception {
    this.model = RDF2Go.getModelFactory().createModel();
    this.model.open();
    this.model.removeAll();
    this.instanceURI = new URIImpl("data://person-1");
  }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl

    this.model.removeAll();
    this.instanceURI = new URIImpl("data://person-1");
  }

  public void testTyping() throws Exception {
    URI jim = new URIImpl("data://jim");
    Person p = new Person(this.model, jim, true);
    Assert.assertTrue(this.model.contains(jim, RDF.type, Person.PERSON));
  }
View Full Code Here

Examples of org.openrdf.model.impl.URIImpl

  }

  public void testEncode()
    throws Exception
  {
    assertEquals(ValueType.URI, ids.valueOf(ids.nextId(new URIImpl("urn:root"))));
    assertEquals(ValueType.URI, ids.valueOf(ids.nextId(new URIImpl(
        "urn:The quick brown fox jumps over the lazy dog"))));
  }
View Full Code Here

Examples of org.openrdf.model.impl.URIImpl

  }

  private void compareURIs(String uri)
    throws Exception
  {
    URIImpl uriImpl = new URIImpl(uri);
    MemURI memURI = new MemURI(this, uriImpl.getNamespace(), uriImpl.getLocalName());

    assertEquals("MemURI not equal to URIImpl for: " + uri, uriImpl, memURI);
    assertEquals("MemURI has different hash code than URIImpl for: " + uri, uriImpl.hashCode(),
        memURI.hashCode());
  }
View Full Code Here

Examples of org.openrdf.model.impl.URIImpl

  }

  public void testEncode()
    throws Exception
  {
    assertEquals(ValueType.URI, ids.valueOf(ids.hashOf(new URIImpl("urn:root"))));
    assertEquals(ValueType.URI, ids.valueOf(ids.hashOf(new URIImpl(
        "urn:The quick brown fox jumps over the lazy dog"))));
  }
View Full Code Here

Examples of org.openrdf.model.impl.URIImpl

    List<NameValuePair> params = new ArrayList<NameValuePair>(5);
    for (String encodedContext : Protocol.encodeContexts(contexts)) {
      params.add(new NameValuePair(Protocol.CONTEXT_PARAM_NAME, encodedContext));
    }
    if (baseURI != null && baseURI.trim().length() != 0) {
      String encodedBaseURI = Protocol.encodeValue(new URIImpl(baseURI));
      params.add(new NameValuePair(Protocol.BASEURI_PARAM_NAME, encodedBaseURI));
    }
    request.sendQueryString(params);

    // Set payload
View Full Code Here

Examples of org.openrdf.model.impl.URIImpl

  private TupleResult 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

Examples of org.openrdf.model.impl.URIImpl

      }
      else if (baseURI.charAt(baseURI.length() - 1) == '/') {
        relativeURI = new java.net.URI(baseURI);
      }
      else {
        String ns = new URIImpl(baseURI).getNamespace();
        if (ns.charAt(ns.length() - 1) == '/') {
          relativeURI = new java.net.URI(ns);
        }
        else {
          relativeURI = null;
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.