Nvm, fixed dependency problem and this fixes my problem.
-Ursprüngliche Nachricht-
Von: Andy Seaborne
Gesendet: Samstag, 31. Juli 2021 11:54
An: users@jena.apache.org
Betreff: Re: AW: Storing ThingDescription in Dataset
> But i get:
> Exception in thread
] \- org.glassfish:jakarta.json:jar:2.0.0:compile
There is just one import of commons-codec with version 1.11
-Ursprüngliche Nachricht-
Von: Andy Seaborne
Gesendet: Samstag, 31. Juli 2021 11:54
An: users@jena.apache.org
Betreff: Re: AW: Storing ThingDescription in Dataset
> But i get:
> Exc
But i get:
Exception in thread "main"
org.apache.jena.ext.com.google.common.util.concurrent.ExecutionError:
java.lang.NoClassDefFoundError: org/apache/commons/codec/digest/MurmurHash3
No commons-codec on the classpath, or there is an old version being
picked up by dependency resolution
pache.jena.riot.RDFParser.parse(RDFParser.java:295)
at
org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:550)
at
org.apache.jena.riot.RDFDataMgr.parseFromInputStream(RDFDataMgr.java:721)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:510)
to convert titanium-Dataset to jena-Dataset.
-Ursprüngliche Nachricht-
Von: Andy Seaborne
Gesendet: Sonntag, 25. Juli 2021 18:58
An: users@jena.apache.org
Betreff: Re: AW: AW: AW: Storing ThingDescription in Dataset
On 25/07/2021 12:47, Philipp Leeb wrote:
Doesn't work either.
What
Didn't see any way to convert titanium-Dataset to jena-Dataset.
-Ursprüngliche Nachricht-
Von: Andy Seaborne
Gesendet: Sonntag, 25. Juli 2021 18:58
An: users@jena.apache.org
Betreff: Re: AW: AW: AW: Storing ThingDescription in Dataset
On 25/07/2021 12:47, Philipp Leeb wrote
-Ursprüngliche Nachricht-
Von: Andy Seaborne
Gesendet: Sonntag, 25. Juli 2021 13:17
An: users@jena.apache.org
Betreff: Re: AW: AW: Storing ThingDescription in Dataset
Jena prints an error.
2:12:36 ERROR riot:: invalid term definition: 1.1
The playgound says it's JSON-LD 1.1 which
Doesn't work either. Is there any other way of how to add my TD in JSOn-LD into
my dataset?
-Ursprüngliche Nachricht-
Von: Andy Seaborne
Gesendet: Sonntag, 25. Juli 2021 13:17
An: users@jena.apache.org
Betreff: Re: AW: AW: Storing ThingDescription in Dataset
Jena prints an error.
2
lue" : "_:b7"
}
}, {
"subject" : {
"type" : "blank node",
"value" : "_:b6"
},
"predicate" : {
"type" : "IRI",
"value" : "https://www.w3.org/2019/wo
"subject" : {
"type" : "blank node",
"value" : "_:b6"
},
"predicate" : {
"type" : "IRI",
"value" : "https://www.w3.org/2019/wot/td#hasForm;
},
"object" : {
&quo
Hi Phil,
That does not look like JSON-LD.
JSON-LD parsing ignores anything it does not understand, not give an
error. In your code snippet, no Jena involved,
Object compact
is a jsonld-data object "Dataset" (which isn't a Jena Dataset) with
nothing in it.
JSON-LD parsing ignores
quot;,
"value" : "_:b7"
},
"predicate" : {
"type" : "IRI",
"value" : "htv:methodName"
},
"object" : {
"type" : "literal",
"value"
Hi Phil,
Jena has an RDF reader that wraps up the use of jsonld-java so you don't
have to use jsonld-java code directly.
InputStream in = ...
Dataset dataset = ...
RDFDataMgr.read(dataset, in, Lang.JSONLD);
If you want to see the source code to see how it uses
Hey guys,
I'm trying to store a WoT-TD (JSON-LD format) in Dataset of embedded fuseki.
When using:
InputStream inputStream = new
ByteArrayInputStream(exposedThing.toJson().getBytes(StandardCharsets.UTF_8))
;
Object jsonObject = JsonUtils.fromInputStream(inputStream);
Object compact =
14 matches
Mail list logo