Package org.ontoware.rdf2go.model

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


  }

  @Test
  public void testDirectRepositoryAccess() throws Exception {
    Model model = getModelFactory().createModel();
    model.open();

    // fetch the Repository, a Connection and a ValueFactory
    Repository repository = (Repository) model
        .getUnderlyingModelImplementation();
    RepositoryConnection connection = repository.getConnection();
View Full Code Here


    modelSet.addStatement(context2, new URIImpl("uri:r4"), new URIImpl(
        "uri:p2"), new URIImpl("uri:r5"));
    modelSet.addStatement(context2, new URIImpl("uri:r4"), new URIImpl(
        "uri:p2"), new URIImpl("uri:r6"));
    Model model1 = modelSet.getModel(context1);
    model1.open();
    Model model2 = modelSet.getModel(context2);
    model2.open();
    assertEquals(4, modelSet.size());
    assertEquals(2, model1.size());
    assertEquals(2, model2.size());
View Full Code Here

    modelSet.addStatement(context2, new URIImpl("uri:r4"), new URIImpl(
        "uri:p2"), new URIImpl("uri:r6"));
    Model model1 = modelSet.getModel(context1);
    model1.open();
    Model model2 = modelSet.getModel(context2);
    model2.open();
    assertEquals(4, modelSet.size());
    assertEquals(2, model1.size());
    assertEquals(2, model2.size());

    model2.removeAll();
View Full Code Here

  @Test
  public void testUsingList() {

    RepositoryModelFactory repositoryModelFactory = new RepositoryModelFactory();
    Model model = repositoryModelFactory.createModel();
    model.open();

    URI a = new URIImpl("urn:test:a");
    URI b = new URIImpl("urn:test:b");
    List list = new List(model, "urn:test:list", true);
   
View Full Code Here

public class RDFReactorRuntimeTest {

  @Test
  public void testCalendarHandling() {
    Model model = RDF2Go.getModelFactory().createModel();
    model.open();
    URI s = new URIImpl("urn:test:S");
    URI p = new URIImpl("urn:test:P");
    Calendar cal = Calendar.getInstance();
    BridgeBase.add(model, s, p, cal);
  }
View Full Code Here

   
    // enabling reasoning:
    Reasoning reasoning;
    reasoning = Reasoning.rdfs;
    model = modelFactory.createModel(reasoning);
    model.open();

    // using reasoning (here: assuming RDFS semantics)
    URI A = model.createURI("urn:A");
    URI B = model.createURI("urn:B");
    URI C = model.createURI("urn:C");
View Full Code Here

    QueryExecution qexec = QueryExecutionFactory.create(query, this.jenaModel);
   
    if(query.isConstructType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
      Model resultModel = new ModelImplJena(null, m, Reasoning.none);
      resultModel.open();
      return resultModel;
    } else {
      throw new RuntimeException("Cannot handle this type of queries! Please use CONSTRUCT.");
    }
  }
View Full Code Here

    QueryExecution qexec = QueryExecutionFactory.create(query, this.jenaModel);
   
    if(query.isDescribeType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execDescribe();
      Model resultModel = new ModelImplJena(null, m, Reasoning.none);
      resultModel.open();
      return resultModel;
    } else {
      throw new RuntimeException("Cannot handle this type of queries! Please use DESCRIBE.");
    }
   
View Full Code Here

    QueryExecution qexec = QueryExecutionFactory.create(query, this.jenaModel);
   
    if(query.isConstructType()) {
      com.hp.hpl.jena.rdf.model.Model m = qexec.execConstruct();
      Model resultModel = new ModelImplJena(null, m, Reasoning.none);
      resultModel.open();
      return resultModel;
    } else {
      throw new RuntimeException("Cannot handle this type of queries! Please use CONSTRUCT.");
    }
  }
View Full Code Here

     *     latitude (in decimal degrees), a String
     *     longitude (in decimal degrees), a String
     *     altitude (in decimal meters above the local reference ellipsoid), a String
     */
    Model model = RDF2Go.getModelFactory().createModel();
    model.open();

    Point.init(model);
   
    @SuppressWarnings("unused")
    Point A = new Point("0","0","0");
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.