Package edu.isi.karma.kr2rml.writer

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


  protected void createBloomFilterWriter() throws FileNotFoundException {
    if (bloomFiltersFilePath != null && !bloomFiltersFilePath.trim().isEmpty()) {
      PrintWriter bloomfilterpw = new PrintWriter(new File(bloomFiltersFilePath));
      logger.info(bloomFiltersFilePath);
      BloomFilterKR2RMLRDFWriter bloomfilter = null;
      if (bloomfilterpw != null)
      {
        bloomfilter = new BloomFilterKR2RMLRDFWriter(bloomfilterpw, true, baseURI);
        writers.add(bloomfilter);
      }
    }

  }
View Full Code Here


      if (writer instanceof JSONKR2RMLRDFWriter) {
        JSONKR2RMLRDFWriter t = (JSONKR2RMLRDFWriter)writer;
        t.setGlobalContext(context, contextId);
      }
      if (writer instanceof BloomFilterKR2RMLRDFWriter) {
        BloomFilterKR2RMLRDFWriter t = (BloomFilterKR2RMLRDFWriter)writer;
        t.setR2RMLMappingIdentifier(id);
      }
    }
    //Check if the parser for this model exists, else create one
    WorksheetR2RMLJenaModelParser modelParser = readModelParsers.get(modelName);
    if(modelParser == null) {
View Full Code Here

    System.out.println("Load file: " + inputFileName);
    StringWriter bfsw = new StringWriter();
    PrintWriter bfpw = new PrintWriter(bfsw);

   
    BloomFilterKR2RMLRDFWriter bfWriter = new BloomFilterKR2RMLRDFWriter(bfpw, false, null);
    bfWriter.setR2RMLMappingIdentifier(rdfGen.getModels().get(modelName));
    RDFGeneratorRequest request = new RDFGeneratorRequest(modelName, inputFileName);
    request.setInputFile(new File(getTestResource(inputFileName).toURI()));
    request.setAddProvenance(false);
    request.setDataType(inputType);
    request.addWriter(bfWriter);
View Full Code Here

          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());
      }
      KR2RMLWorksheetRDFGenerator rdfGen = new KR2RMLWorksheetRDFGenerator(worksheet,
          workspace.getFactory(), workspace.getOntologyManager(),
          writers, false, mapping, errorReport, selection);
View Full Code Here

      if (writer instanceof JSONKR2RMLRDFWriter) {
        JSONKR2RMLRDFWriter t = (JSONKR2RMLRDFWriter)writer;
        t.setGlobalContext(contextObj, contextId);
      }
      if (writer instanceof BloomFilterKR2RMLRDFWriter) {
        BloomFilterKR2RMLRDFWriter t = (BloomFilterKR2RMLRDFWriter)writer;
        t.setR2RMLMappingIdentifier(id);
      }
    }
  }
View Full Code Here

    WorksheetR2RMLJenaModelParser parserTest = new WorksheetR2RMLJenaModelParser(id);
    KR2RMLMapping mapping = parserTest.parse();
    for (KR2RMLRDFWriter writer : writers) {
      if (writer instanceof BloomFilterKR2RMLRDFWriter) {
        BloomFilterKR2RMLRDFWriter t = (BloomFilterKR2RMLRDFWriter)writer;
        t.setR2RMLMappingIdentifier(id);
      }
    }
    AbstractJDBCUtil dbUtil = JDBCUtilFactory.getInstance(dbType);
    Connection conn = dbUtil.getConnection(hostname, portnumber, username, password, dBorSIDName);
    conn.setAutoCommit(false);
View Full Code Here

TOP

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

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.