Package org.ontoware.rdf2go.model

Examples of org.ontoware.rdf2go.model.Model.addStatement()


   
    // link via foaf:knows
    // _:blankNodeWerner
    // <http://xmlns.com/foaf/0.1/knows>
    // _:blankNodeMax.
    model.addStatement(werner, foafKnows, max);
   
    // default dump
    DumpUtils.dump(model, null);
   
    // queries
View Full Code Here


    nsMap.put("", new URIImpl(LOCAL));
    URI a = new URIImpl(LOCAL + "a");
    URI b = new URIImpl(LOCAL + "b");
    URI c = new URIImpl(LOCAL + "c");

    m.addStatement(a, b, c);
    m.addStatement(a, RDF.type, c);
    log.debug("Before");
    m.dump();

    String constructRemove = "?x a " + c.toSPARQL();
View Full Code Here

    URI a = new URIImpl(LOCAL + "a");
    URI b = new URIImpl(LOCAL + "b");
    URI c = new URIImpl(LOCAL + "c");

    m.addStatement(a, b, c);
    m.addStatement(a, RDF.type, c);
    log.debug("Before");
    m.dump();

    String constructRemove = "?x a " + c.toSPARQL();
    String constructAdd = "?x a " + b.toSPARQL();
View Full Code Here

    URI b = new URIImpl("urn:test:b");
    URI c = new URIImpl("urn:test:c");

    URI superRel = new URIImpl(
        "http://www.semanticdesktop.org/ontologies/2007/09/cds/hasSuperRelation");
    m.addStatement(superRel, b, c);
    m.addStatement(a, superRel, c);
    m.addStatement(a, b, superRel);
    Map<String, URI> nsMap = new HashMap<String, URI>();
    URISearchReplaceRule.searchAndReplace(m, nsMap, superRel,
        RDFS.subPropertyOf);
View Full Code Here

    URI c = new URIImpl("urn:test:c");

    URI superRel = new URIImpl(
        "http://www.semanticdesktop.org/ontologies/2007/09/cds/hasSuperRelation");
    m.addStatement(superRel, b, c);
    m.addStatement(a, superRel, c);
    m.addStatement(a, b, superRel);
    Map<String, URI> nsMap = new HashMap<String, URI>();
    URISearchReplaceRule.searchAndReplace(m, nsMap, superRel,
        RDFS.subPropertyOf);
View Full Code Here

    URI superRel = new URIImpl(
        "http://www.semanticdesktop.org/ontologies/2007/09/cds/hasSuperRelation");
    m.addStatement(superRel, b, c);
    m.addStatement(a, superRel, c);
    m.addStatement(a, b, superRel);
    Map<String, URI> nsMap = new HashMap<String, URI>();
    URISearchReplaceRule.searchAndReplace(m, nsMap, superRel,
        RDFS.subPropertyOf);

    m.dump();
View Full Code Here

    URI b = new URIImpl("urn:test:b");
    URI c = new URIImpl("urn:test:c");

    URI superRel = new URIImpl(
        "http://www.semanticdesktop.org/ontologies/2007/09/cds/hasSuperRelation");
    m.addStatement(superRel, b, c);
    m.addStatement(a, superRel, c);
    m.addStatement(a, b, superRel);
    NamespaceSearchReplaceRule.searchAndReplace(m, "urn:test:", "http://example.com#");
   
    m.dump();
View Full Code Here

    URI c = new URIImpl("urn:test:c");

    URI superRel = new URIImpl(
        "http://www.semanticdesktop.org/ontologies/2007/09/cds/hasSuperRelation");
    m.addStatement(superRel, b, c);
    m.addStatement(a, superRel, c);
    m.addStatement(a, b, superRel);
    NamespaceSearchReplaceRule.searchAndReplace(m, "urn:test:", "http://example.com#");
   
    m.dump();
    Assert.assertFalse(m.contains(a, Variable.ANY, Variable.ANY));
View Full Code Here

    URI superRel = new URIImpl(
        "http://www.semanticdesktop.org/ontologies/2007/09/cds/hasSuperRelation");
    m.addStatement(superRel, b, c);
    m.addStatement(a, superRel, c);
    m.addStatement(a, b, superRel);
    NamespaceSearchReplaceRule.searchAndReplace(m, "urn:test:", "http://example.com#");
   
    m.dump();
    Assert.assertFalse(m.contains(a, Variable.ANY, Variable.ANY));
  }
View Full Code Here

        String oURI = o.asURI().toString().replace(searchURIPrefix, replaceURIPrefix);
        o = new URIImpl(oURI);
      }
     
      if(match) {
        remove.addStatement(stmt);
        add.addStatement(s, p, o);
      }
    }
    it.close();
    ClosableIterator<Statement> addIt = add.iterator();
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.