Package edu.isi.karma.kr2rml.mapping

Examples of edu.isi.karma.kr2rml.mapping.R2RMLMappingIdentifier


  @Before
  public void setUp() throws Exception {
    rdfGen = new GenericRDFGenerator(null);

    // Add the models in
    R2RMLMappingIdentifier modelIdentifier = new R2RMLMappingIdentifier(
        "events-model", getTestResource(
             "context/events-no-augmentation-model.ttl"));
    rdfGen.addModel(modelIdentifier);
  }
View Full Code Here


  @Before
  public void setUp() throws Exception {
    rdfGen = new GenericRDFGenerator(null);

    // Add the models in
    R2RMLMappingIdentifier modelIdentifier = new R2RMLMappingIdentifier(
        "groupby-top-model", getTestResource(
             "groupby/groupby-top-model.ttl"));
    rdfGen.addModel(modelIdentifier);
    modelIdentifier = new R2RMLMappingIdentifier(
        "groupby-nested-model", getTestResource(
             "groupby/groupby-nested-model.ttl"));
    rdfGen.addModel(modelIdentifier);
   
  }
View Full Code Here

 
  private void generateRDF(String modelName, String sourceName,String contextName, InputStream data, InputType dataType, int maxNumLines,
      boolean addProvenance, List<KR2RMLRDFWriter> writers, RootStrategy rootStrategy)
          throws KarmaException, IOException {
   
    R2RMLMappingIdentifier id = this.modelIdentifiers.get(modelName);
    ContextIdentifier contextId = this.contextIdentifiers.get(contextName);
    if(id == null) {
      throw new KarmaException("Cannot generate RDF. Model named " + modelName + " does not exist");
    }
    JSONObject context;
View Full Code Here

  @Before
  public void setUp() throws Exception {
    rdfGen = new GenericRDFGenerator(null);

    // Add the models in
    R2RMLMappingIdentifier modelIdentifier = new R2RMLMappingIdentifier(
        "people-model", getTestResource(
             "people-model.ttl"));
    rdfGen.addModel(modelIdentifier);
   
    modelIdentifier = new R2RMLMappingIdentifier(
        "people-avro-model", getTestResource(
             "people-avro-model.ttl"));
    rdfGen.addModel(modelIdentifier);
   
    modelIdentifier = new R2RMLMappingIdentifier(
        "people-array.avro-model", getTestResource(
             "people-array.avro-model.ttl"));
    rdfGen.addModel(modelIdentifier);
  }
View Full Code Here

  @Before
  public void setUp() throws Exception {
    rdfGen = new GenericRDFGenerator(null);

    // Add the models in
    R2RMLMappingIdentifier modelIdentifier = new R2RMLMappingIdentifier(
        "people-model", getTestResource(
             "people-model.ttl"));
    rdfGen.addModel(modelIdentifier);
   
    modelIdentifier = new R2RMLMappingIdentifier("schedule-model",
         getTestResource("schedule-model.txt")
            );
    rdfGen.addModel(modelIdentifier);
  }
View Full Code Here

        PrintWriter pw = new PrintWriter(tmp);
        pw.println(utilObj.getMappingFromTripleStore(modelRepoUrl, modelContext, url));
        pw.close();
        Model model = WorksheetR2RMLJenaModelParser.loadSourceModelIntoJenaModel(tmp.toURI().toURL());
        tmp.delete();
        R2RMLMappingIdentifier identifier = new R2RMLMappingIdentifier(mapping.getId().getName(), new URL(url));
        WorksheetR2RMLJenaModelParser parser = new WorksheetR2RMLJenaModelParser(model, identifier);
        mapping = parser.parse();
      } catch (Exception e) {
        e.printStackTrace();
      }
View Full Code Here

      String base64EncodedBloomFilter = serializedManager.getString(id);
      KR2RMLBloomFilter bf = new KR2RMLBloomFilter();
      bf.populateFromCompressedAndBase64EncodedString(base64EncodedBloomFilter);
      idToBloomFilter.put(id, bf);
    }
    this.mappingIdentifier = new R2RMLMappingIdentifier(serializedManager.getJSONObject("mappingIdentifier"));
  }
View Full Code Here

  @Before
  public void setUp() throws Exception {
    rdfGen = new GenericRDFGenerator(null);

    // Add the models in
    R2RMLMappingIdentifier modelIdentifier = new R2RMLMappingIdentifier("names.csv-model-new",
         getTestResource("names.csv-model-new.ttl")
            );
    rdfGen.addModel(modelIdentifier);
 
  }
View Full Code Here

   * @throws Exception
   */
  protected void generateRdfFile(File inputFile, InputType inputType, String modelName, File modelFile, PrintWriter pw)
      throws Exception {
    GenericRDFGenerator rdfGen = new GenericRDFGenerator(null);
    R2RMLMappingIdentifier modelIdentifier = new R2RMLMappingIdentifier(
        modelName, modelFile.toURI().toURL());
    rdfGen.addModel(modelIdentifier);
    List<KR2RMLRDFWriter> writers = createBasicWriter(pw);
    RDFGeneratorRequest request = new RDFGeneratorRequest(modelName, inputFile.getName());
    request.setAddProvenance(false);
View Full Code Here

  private JSONArray extractHistoryFromModel(Workspace workspace, UpdateContainer uc)
      throws RepositoryException, RDFParseException, IOException, JSONException, KarmaException {

    Worksheet ws = workspace.getFactory().getWorksheet(worksheetId);
    R2RMLMappingIdentifier id = new R2RMLMappingIdentifier(ws.getTitle(), r2rmlModelFile.toURI().toURL());
    WorksheetR2RMLJenaModelParser parser = new WorksheetR2RMLJenaModelParser(id);
    KR2RMLMapping mapping = parser.parse();
    KR2RMLVersion version = mapping.getVersion();
    if(version.compareTo(KR2RMLVersion.current) < 0)
    {
View Full Code Here

TOP

Related Classes of edu.isi.karma.kr2rml.mapping.R2RMLMappingIdentifier

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.