Package edu.isi.karma.kr2rml.writer

Examples of edu.isi.karma.kr2rml.writer.N3KR2RMLRDFWriter


  private Text reusableOutputValue = new Text("");
  private Text reusableOutputKey = new Text("");
  protected KR2RMLRDFWriter configureRDFWriter(StringWriter sw) {
    PrintWriter pw = new PrintWriter(sw);
    URIFormatter uriFormatter = new URIFormatter();
    N3KR2RMLRDFWriter outWriter = new N3KR2RMLRDFWriter(uriFormatter, pw);
    outWriter.setBaseURI(karma.getBaseURI());
    return outWriter;
  }
View Full Code Here


      throws UnsupportedEncodingException, FileNotFoundException {

    OutputStreamWriter fw = new OutputStreamWriter(new FileOutputStream(outputFilePath), "UTF-8");
    BufferedWriter bw = new BufferedWriter(fw);
    PrintWriter pw = new PrintWriter(bw);
    N3KR2RMLRDFWriter n3Writer = new N3KR2RMLRDFWriter(new URIFormatter(), pw);
    if (outputFileJSONPath != null) {
      JSONKR2RMLRDFWriter jsonWriter = new JSONKR2RMLRDFWriter(new PrintWriter(outputFileJSONPath), baseURI);
      writers.add(jsonWriter);
    }
    if(baseURI != null)
    {
      n3Writer.setBaseURI(baseURI);
    }
    writers.add(n3Writer);
  }
View Full Code Here

             "people-model.ttl"));
    worksheet.getSuperSelectionManager().defineSelection("test").addSelection(sel);
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    List<KR2RMLRDFWriter> writers = new ArrayList<KR2RMLRDFWriter>();
    writers.add(new N3KR2RMLRDFWriter(new URIFormatter(), pw));
    WorksheetR2RMLJenaModelParser modelParser = new WorksheetR2RMLJenaModelParser(modelIdentifier);
    applyHistoryToWorksheet(workspace, worksheet, modelParser.parse());
    KR2RMLWorksheetRDFGenerator rdfGen = new KR2RMLWorksheetRDFGenerator(worksheet,
            workspace.getFactory(), workspace.getOntologyManager(), writers,
            false, modelParser.parse(), new ErrorReport(), worksheet.getSuperSelectionManager().getSuperSelection("test"));
View Full Code Here

    super(selectionName);
  }
 
  void generateRDF(String modelName, String jsonData, boolean addProvenance, PrintWriter pw) throws KarmaException, JSONException, IOException {
    URIFormatter uriFormatter = new URIFormatter();
    KR2RMLRDFWriter outWriter = new N3KR2RMLRDFWriter(uriFormatter, pw);
    RDFGeneratorRequest request = new RDFGeneratorRequest(modelName, null);
    request.setAddProvenance(addProvenance);
    request.setDataType(InputType.JSON);
    request.setInputData(jsonData);
    request.addWriter(outWriter);
View Full Code Here

      File f = new File(rdfFileLocalPath);
      File parentDir = f.getParentFile();
      parentDir.mkdirs();
      BufferedWriter bw = new BufferedWriter(
          new OutputStreamWriter(new FileOutputStream(f),"UTF-8"));
      N3KR2RMLRDFWriter writer = new N3KR2RMLRDFWriter(new URIFormatter(workspace.getOntologyManager(), errorReport), new PrintWriter (bw));
      writer.setBaseURI(rdfSourceNamespace);
      writers.add(writer);
      if (generateBloomFilters && utilObj.testURIExists(modelRepoUrl, "", url)) {
        BloomFilterKR2RMLRDFWriter bfWriter = new BloomFilterKR2RMLRDFWriter(new PrintWriter(sw), false, this.rdfSourceNamespace);
        writers.add(bfWriter);
        bfWriter.setR2RMLMappingIdentifier(mapping.getId());
View Full Code Here

    request.addWriters(writers);
    rdfGen.generateRDF(request);
  }

  protected List<KR2RMLRDFWriter> createBasicWriter(PrintWriter pw) {
    N3KR2RMLRDFWriter writer = new N3KR2RMLRDFWriter(new URIFormatter(), pw);
    List<KR2RMLRDFWriter> writers = new LinkedList<KR2RMLRDFWriter>();
    writers.add(writer);
    return writers;
  }
View Full Code Here

    File f = new File(this.outputFileName);
    File parentDir = f.getParentFile();
    parentDir.mkdirs();
    BufferedWriter bw = new BufferedWriter(
        new OutputStreamWriter(new FileOutputStream(f),"UTF-8"));
    outWriters.add(new N3KR2RMLRDFWriter(uriFormatter, new PrintWriter (bw)));
    this.selection = sel;

  }
View Full Code Here

      OntologyManager ontMgr, PrintWriter writer, KR2RMLMapping kr2rmlMapping,  
      ErrorReport errorReport, boolean addColumnContextInformation, SuperSelection sel) {
    super();
    initializeMemberVariables(worksheet, factory, ontMgr, outputFileName,
        addColumnContextInformation, kr2rmlMapping, errorReport);
    this.outWriters.add(new N3KR2RMLRDFWriter(uriFormatter, writer));
    this.selection = sel;
  }
View Full Code Here

    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);

    URIFormatter uriFormatter = new URIFormatter();
    KR2RMLRDFWriter outWriter = new N3KR2RMLRDFWriter(uriFormatter, pw);

    String sourceName = r2rmlURI;
    RDFGeneratorRequest request = new RDFGeneratorRequest(rmlID.getName(), sourceName);
    request.addWriter(outWriter);
    request.setInputStream(dataStream);
View Full Code Here

TOP

Related Classes of edu.isi.karma.kr2rml.writer.N3KR2RMLRDFWriter

Copyright © 2018 www.massapicom. 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.