Package org.ontoware.rdf2go.model

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


    jm.write(w, "RDF/XML", "");
  }
 
  public static void write(Model m, Writer w) throws ModelRuntimeException {
    Model jenaModel = new ModelImplJena(Reasoning.none);
    jenaModel.addAll(m.iterator());
    com.hp.hpl.jena.rdf.model.Model jm = (com.hp.hpl.jena.rdf.model.Model)jenaModel
            .getUnderlyingModelImplementation();
    try {
      writeJenaModel(jm, w);
    } catch(IOException e) {
View Full Code Here


    }
  }
 
  public static void write(Model m, String filename, String format) throws ModelRuntimeException {
    Model jenaModel = new ModelImplJena(Reasoning.none);
    jenaModel.addAll(m.iterator());
    com.hp.hpl.jena.rdf.model.Model jm = (com.hp.hpl.jena.rdf.model.Model)jenaModel
            .getUnderlyingModelImplementation();
    DumpUtils.addCommonPrefixesToJenaModel(jm);
   
    try {
View Full Code Here

        log.info("Input model has " + modelWithSchemaData.size() + " triples");
       
        // enable RDFS inferencing
        Model m = RDF2Go.getModelFactory().createModel(Reasoning.rdfs);
        m.open();
        m.addAll(modelWithSchemaData.iterator());
       
        // prepare JModel
        JModel jm = Semantics.getbuiltIns_RDFS();
       
        JPackage jp = new JPackage(packagename);
View Full Code Here

        JModel jm = Semantics.getbuiltIns_RDFS();
       
        log.info("Loading schema triples");
        Model m = RDF2Go.getModelFactory().createModel(Reasoning.rdfsAndOwl);
        m.open();
        m.addAll(schemaDataModel.iterator());
       
        log.info("Skolemisation (replacing all blank nodes with random URIs)");
        ModelUtils.deanonymize(m);
       
        log.info("Add mapping from OWL to RDF");
View Full Code Here

        //
        // Model m = new ModelImplJena22(combined);
       
        Model m = RDF2Go.getModelFactory().createModel(Reasoning.owl);
        m.open();
        m.addAll(schemaDataModel.iterator());
       
        // Reasoner reasoner = ReasonerRegistry.getOWLMicroReasoner();//
        // miniReasoner();
        // reasoner = reasoner.bindSchema(schemaDataModel);
        // InfModel jenaModel = ModelFactory.createInfModel(reasoner,
View Full Code Here

   * @return a copy of the model in a memory model
   */
  public static Model copyModel(Model m) {
    Model res = RDF2Go.getModelFactory().createModel();
    res.open();
    res.addAll(m.iterator());
    return res;
  }
 
  /**
   * format the given date in a good date format: ISO 8601, using only the
View Full Code Here

    defaultModels(A,B);
   
    // set intersection
    System.out.println("intersection of A and B (A \\Cup B):");
    // intersection(A,B) == complement(A, complement(A,B))
    C.addAll(A.iterator());
    C.removeAll(B.iterator());
    A.removeAll(C.iterator());
    A.dump();
    defaultModels(A,B);
   
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.