Package org.ontoware.rdf2go.model

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


    // adding a statement to the model
    model.addStatement(max, currentProject, semweb4j);
    model.addStatement(max, name, "Max Völkel");

    // dumping model to the screen
    model.dump();

    // removing a statement from the model
    model.removeStatement(max, currentProject, semweb4j);

    // dumping model to the screen
View Full Code Here


    // removing a statement from the model
    model.removeStatement(max, currentProject, semweb4j);

    // dumping model to the screen
    model.dump();

  }

}
View Full Code Here

    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();
    String where = constructRemove;
View Full Code Here

    String where = constructRemove;

    SearchRemoveAddRule.searchAndReplace(m, nsMap, where, constructRemove,
        constructAdd);
    log.debug("After");
    m.dump();
  }

  @Test
  public void testUriRename() {
    Model m = RDF2Go.getModelFactory().createModel();
View Full Code Here

    m.addStatement(a, b, superRel);
    Map<String, URI> nsMap = new HashMap<String, URI>();
    URISearchReplaceRule.searchAndReplace(m, nsMap, superRel,
        RDFS.subPropertyOf);

    m.dump();
    Assert.assertFalse(m.contains(superRel, Variable.ANY, Variable.ANY));
  }

  @Test
  public void testUriPrefixRename() {
View Full Code Here

    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

    Iterator<? extends Model> it = getModels();
    while (it.hasNext()) {
      Model m = it.next();
      System.out.println("Dumping model with context: "
          + m.getContextURI() + " ----------");
      m.dump();
      m.close();
    }
  }

  /* subclasses should overwrite this method for better performance */
 
View Full Code Here

    ClosableIterator<Statement> rows2 = md.findStatements(null, null, null);
    while(rows2.hasNext()){
        System.out.println(rows2.next());
    }
    rows2.close();
    md.dump();
    md.commit();
    md.close();
  }
 
  //TODO: create query for this operation
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.