Re: Trasforming and quering RDFs

2022-01-18 Thread Martynas Jusevičius
As for the query, you need to stop thinking in nested objects and
start thinking in triples.

Could the query be something like this?

SELECT  ?s ?datatype
WHERE
  { ?s    1 ;
  ?datatype
  }

You can try it on your data on sparql.org: https://bit.ly/3nBQKnr

On Tue, Jan 18, 2022 at 10:03 PM Rinor Sefa  wrote:
>
> Hey,
>
> Regarding your problem "I can't find X in the RDF file". In your example, the 
> RDF file is in XML format, which may not be ideal for user reading. Why don't 
> you try to present the RDF in more readable formats such as N3 or Turtle?
>
> Rinor Sefa
>
> -Original Message-
> From: Martynas Jusevičius 
> Sent: Tuesday, 18 January 2022 17:38
> To: jena-users-ml 
> Subject: Re: Trasforming and quering RDFs
>
> Hi,
>
> SPARQL is an RDF query language, so no.
>
> But there are tools that can help:
> https://github.com/AtomGraph/JSON2RDF
> https://sparql-anything.cc
>
>
> Martynas
> atomgraph.com
>
> On Tue, Jan 18, 2022 at 5:32 PM emri mbiemri  
> wrote:
> >
> > Dears,
> >
> > In order to have a more scalable knowledge base and easy to query, I
> > have converted JSON files [1] to RDFgraphs [2]. I am trying to get all
> > "Datatype" from "ViewModel" which has a "Type":1. The issue is I
> > cannot find the Type: 1 within the RDF file and if so, I don't know
> > how to query the "Datatype" which has "Type":1 within the "ViewModel" tag?
> >
> > And secondly, is there a direct way to query the JSON files easier
> > using SPARQL without having to convert them into RDF?
> >
> > Hope for your help.
> >
> >
> > [1]
> > https://github.com/iliriani/iliriangit/blob/master/CustomerForm.json
> > [2]
> > https://github.com/iliriani/iliriangit/blob/master/CustomerForm.rdf


RE: Trasforming and quering RDFs

2022-01-18 Thread Rinor Sefa
Hey,

Regarding your problem "I can't find X in the RDF file". In your example, the 
RDF file is in XML format, which may not be ideal for user reading. Why don't 
you try to present the RDF in more readable formats such as N3 or Turtle? 

Rinor Sefa

-Original Message-
From: Martynas Jusevičius  
Sent: Tuesday, 18 January 2022 17:38
To: jena-users-ml 
Subject: Re: Trasforming and quering RDFs

Hi,

SPARQL is an RDF query language, so no.

But there are tools that can help:
https://github.com/AtomGraph/JSON2RDF
https://sparql-anything.cc


Martynas
atomgraph.com

On Tue, Jan 18, 2022 at 5:32 PM emri mbiemri  wrote:
>
> Dears,
>
> In order to have a more scalable knowledge base and easy to query, I 
> have converted JSON files [1] to RDFgraphs [2]. I am trying to get all 
> "Datatype" from "ViewModel" which has a "Type":1. The issue is I 
> cannot find the Type: 1 within the RDF file and if so, I don't know 
> how to query the "Datatype" which has "Type":1 within the "ViewModel" tag?
>
> And secondly, is there a direct way to query the JSON files easier 
> using SPARQL without having to convert them into RDF?
>
> Hope for your help.
>
>
> [1] 
> https://github.com/iliriani/iliriangit/blob/master/CustomerForm.json
> [2] 
> https://github.com/iliriani/iliriangit/blob/master/CustomerForm.rdf


Re: Trasforming and quering RDFs

2022-01-18 Thread Martynas Jusevičius
Hi,

SPARQL is an RDF query language, so no.

But there are tools that can help:
https://github.com/AtomGraph/JSON2RDF
https://sparql-anything.cc


Martynas
atomgraph.com

On Tue, Jan 18, 2022 at 5:32 PM emri mbiemri  wrote:
>
> Dears,
>
> In order to have a more scalable knowledge base and easy to query, I have
> converted JSON files [1] to RDFgraphs [2]. I am trying to get
> all "Datatype" from "ViewModel" which has a "Type":1. The issue is I cannot
> find the Type: 1 within the RDF file and if so, I don't know how to query
> the "Datatype" which has "Type":1 within the "ViewModel" tag?
>
> And secondly, is there a direct way to query the JSON files easier using
> SPARQL without having to convert them into RDF?
>
> Hope for your help.
>
>
> [1] https://github.com/iliriani/iliriangit/blob/master/CustomerForm.json
> [2] https://github.com/iliriani/iliriangit/blob/master/CustomerForm.rdf


Trasforming and quering RDFs

2022-01-18 Thread emri mbiemri
Dears,

In order to have a more scalable knowledge base and easy to query, I have
converted JSON files [1] to RDFgraphs [2]. I am trying to get
all "Datatype" from "ViewModel" which has a "Type":1. The issue is I cannot
find the Type: 1 within the RDF file and if so, I don't know how to query
the "Datatype" which has "Type":1 within the "ViewModel" tag?

And secondly, is there a direct way to query the JSON files easier using
SPARQL without having to convert them into RDF?

Hope for your help.


[1] https://github.com/iliriani/iliriangit/blob/master/CustomerForm.json
[2] https://github.com/iliriani/iliriangit/blob/master/CustomerForm.rdf