Giter VIP home page Giter VIP logo

Comments (2)

DylanVanAssche avatar DylanVanAssche commented on September 3, 2024

It seems that your SubjectMap is not correct. You must use rr:BlankNode as rr:termType's object:

rr:subjectMap [
rr:column "Column_Name";
rr:termType rr:BlankNode;
rr:class giam:Entitlement
]

from rmlmapper-java.

jaxley avatar jaxley commented on September 3, 2024

Okay, I'm getting the same null pointer exception error.

I did some experimenting and it's being caused by attempting to add an rdf:comment that's an empty string

Use sample data file stuff.json:

{
   "stuff": [
        {"id":"12345", "value":"hi"}
   ]
}

This will cause an exception:

17:09:30.580 [main] DEBUG b.u.rml.records.JSONRecordFactory   .getRecords(40) - No document found for stuff.json. Creating new one
17:09:30.597 [main] DEBUG c.j.j.internal.path.CompiledPath    .evaluate(93) - Evaluating path: $['stuff'][*]
17:09:30.600 [main] DEBUG c.j.j.internal.path.CompiledPath    .evaluate(93) - Evaluating path: $['stuff'][0]['id']
17:09:30.601 [main] ERROR be.ugent.rml.cli.Main               .run(420) - Cannot invoke "be.ugent.rml.functions.SingleRecordFunctionExecutor.execute(be.ugent.rml.records.Record)" because "this.functionExecutor" is null
17:09:30.601 [main] ERROR be.ugent.rml.cli.Main               .run(457) - Cannot invoke "be.ugent.rml.functions.SingleRecordFunctionExecutor.execute(be.ugent.rml.records.Record)" because "this.functionExecutor" is null
java.lang.NullPointerException: Cannot invoke "be.ugent.rml.functions.SingleRecordFunctionExecutor.execute(be.ugent.rml.records.Record)" because "this.functionExecutor" is null
	at be.ugent.rml.termgenerator.LiteralGenerator.generate(LiteralGenerator.java:47)
	at be.ugent.rml.Executor.generatePredicateObjectGraphs(Executor.java:345)
	at be.ugent.rml.Executor.executeWithFunction(Executor.java:178)
	at be.ugent.rml.Executor.execute(Executor.java:132)
	at be.ugent.rml.cli.Main.run(Main.java:416)
	at be.ugent.rml.cli.Main.main(Main.java:49)
---
base: http://www.semanticweb.org/Broken#

prefixes:
  instance: http://www.semanticweb.org/Broken#
  rdfs: http://www.w3.org/2000/01/rdf-schema#
  idlab-fn: http://example.com/idlab/function/
  grel: http://users.ugent.be/~bjdmeest/function/grel.ttl#

sources:
  stuff:
    access: stuff.json
    referenceFormulation: jsonpath
    iterator: "$.stuff[*]"

mappings:
  threats:
    sources: stuff
    subjects: instance:$(id)
    predicateobjects:
      - [rdf:comment, ""]

But, this will process just fine. Only difference is a single character.

---
base: http://www.semanticweb.org/Broken#

prefixes:
  instance: http://www.semanticweb.org/Broken#
  rdfs: http://www.w3.org/2000/01/rdf-schema#
  idlab-fn: http://example.com/idlab/function/
  grel: http://users.ugent.be/~bjdmeest/function/grel.ttl#

sources:
  stuff:
    access: stuff.json
    referenceFormulation: jsonpath
    iterator: "$.stuff[*]"

mappings:
  threats:
    sources: stuff
    subjects: instance:$(id)
    predicateobjects:
      - [rdf:comment, " "]

from rmlmapper-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.