Package edu.isi.karma.kr2rml.planning

Examples of edu.isi.karma.kr2rml.planning.UserSpecifiedRootStrategy


      PrintWriter pw = new PrintWriter(sw);
      JSONKR2RMLRDFWriter writer = new JSONKR2RMLRDFWriter(pw);
      RDFGeneratorRequest request = new RDFGeneratorRequest("employees-model", filename);
      request.setInputFile(new File(getTestResource(filename).toURI()));
      request.setDataType(InputType.JSON);
      request.setStrategy(new UserSpecifiedRootStrategy("http://isi.edu/integration/karma/dev#TriplesMap_6c6ae57b-f0ac-4443-9a49-4ae5d2e20630"));
      request.addWriter(writer);
      rdfGen.generateRDF(request);
     
      String rdf = sw.toString();
      assertNotEquals(rdf.length(), 0);
View Full Code Here


      ErrorReport errorReport = new ErrorReport();
      if(rootStrategy == null)
      {
        if(rootTripleMap != null)
        {
          rootStrategy = new UserSpecifiedRootStrategy(rootTripleMap, new SteinerTreeRootStrategy(new WorksheetDepthRootStrategy()));
        }
        else
        {
          rootStrategy = new SteinerTreeRootStrategy(new WorksheetDepthRootStrategy());;
        }
View Full Code Here

   
    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);
        logger.info("RDF written to file.");
View Full Code Here

        url.append(ServletContextParameterMap.getParameterValue(ContextParameter.JSON_PUBLISH_RELATIVE_DIR));
        url.append(contextName);
        writer.setGlobalContext(context, new ContextIdentifier(context.toString(), new URL(url.toString())));
      }
      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);
        logger.info("RDF written to file.");
      } catch (IOException e1) {
View Full Code Here

TOP

Related Classes of edu.isi.karma.kr2rml.planning.UserSpecifiedRootStrategy

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.