Package edu.isi.karma.kr2rml.writer

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


  public void testGenerateAvro1() {
    try {
      String filename = "people.json";
      logger.info("Loading json file: " + filename);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      AvroKR2RMLRDFWriter arvowriter = new AvroKR2RMLRDFWriter(baos);

      StringWriter sw = new StringWriter();
      PrintWriter pw = new PrintWriter(sw);
      JSONKR2RMLRDFWriter jsonwriter = new JSONKR2RMLRDFWriter(pw);
      List<KR2RMLRDFWriter> writers = new LinkedList<KR2RMLRDFWriter>();
View Full Code Here


      String filename = "people.avro";
      logger.info("Loading avro file: " + filename);
      File tempAvroOutput = File.createTempFile("testgenerateavro2", "avro");
      tempAvroOutput.deleteOnExit();
      FileOutputStream fos = new FileOutputStream(tempAvroOutput );
      AvroKR2RMLRDFWriter arvowriter = new AvroKR2RMLRDFWriter(fos);

      StringWriter sw = new StringWriter();
      PrintWriter pw = new PrintWriter(sw);
      JSONKR2RMLRDFWriter jsonwriter = new JSONKR2RMLRDFWriter(pw);
      List<KR2RMLRDFWriter> writers = new LinkedList<KR2RMLRDFWriter>();
View Full Code Here

      String filename = "people-array.avro";
      logger.info("Loading json file: " + filename);
      File tempAvroOutput = File.createTempFile("testgenerateavro4", "avro");
      tempAvroOutput.deleteOnExit();
      FileOutputStream fos = new FileOutputStream(tempAvroOutput );
      AvroKR2RMLRDFWriter arvowriter = new AvroKR2RMLRDFWriter(fos);

      StringWriter sw = new StringWriter();
      PrintWriter pw = new PrintWriter(sw);
      JSONKR2RMLRDFWriter jsonwriter = new JSONKR2RMLRDFWriter(pw);
      List<KR2RMLRDFWriter> writers = new LinkedList<KR2RMLRDFWriter>();
View Full Code Here

    final String avroFileLocalPath = ServletContextParameterMap.getParameterValue(ContextParameter.AVRO_PUBLISH_DIR)
        avroFileName;
   
    try {
      FileOutputStream fos = new FileOutputStream(new File(avroFileLocalPath));
      AvroKR2RMLRDFWriter writer = new AvroKR2RMLRDFWriter(fos);
      writer.addPrefixes(mapping.getPrefixes());
      RootStrategy strategy = new UserSpecifiedRootStrategy(rootTriplesMapId, new SteinerTreeRootStrategy(new WorksheetDepthRootStrategy()));
      KR2RMLWorksheetRDFGenerator generator = new KR2RMLWorksheetRDFGenerator(worksheet, f, ontMgr, writer,
          false, strategy, mapping, errorReport, selection);
      try {
        generator.generateRDF(true);
View Full Code Here

            List<String> triplesMapIds = entry.getValue();
            jsonWriter.addRootTriplesMapId(triplesMapIds.get(triplesMapIds.size()-1))
          }
          if(jsonWriter instanceof AvroKR2RMLRDFWriter)
          {
            AvroKR2RMLRDFWriter avroWriter = (AvroKR2RMLRDFWriter) jsonWriter;
            avroWriter.setProcessingOrder(graphTriplesMapsProcessingOrder);
          }
        }
      }
      int i=1;
      TriplesMapPlanExecutor e = new TriplesMapPlanExecutor();
View Full Code Here

TOP

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

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.