JSON2RDF

2019-08-15 Thread Martynas Jusevičius
Hi all,

just wanted to let you know that in addition to CSV2RDF we've now
published JSON2RDF:
https://github.com/AtomGraph/JSON2RDF

It's a Jena-based generic JSON2RDF converter which reads JSON and
writes streaming N-Triples output.
Such output is well-suited for further transformation with SPARQL
CONSTRUCT, for vocabulary (re-)mapping, URI building, datatype fixing
etc.

I think the algorithm is similar to JSON-LD but I'm not too sure. In
any case, no @context is necessary as JSON2RDF accepts arbitrary JSON.

I see JSON2RDF+CONSTRUCT as a more flexible alternative to
JSON-LD+@context when it comes to lifting JSON data to RDF.

Hope it can be useful.


Martynas
atomgraph.com


Validating with shapes

2019-08-15 Thread Mikael Pesonen



I'm trying to figure out how to validate RDF data that is modified with 
GUI form and stored on Fuseki.


For example SHACL API has command line tool which inputs ttl file and 
SHACL file. So lets say there is a resource consisting of 10 triplets 
and user modifies one triplet with the form. Is the only/best way to 
validate the modified resource by saving the triplet into db, read all 
10 into a turtle file and then validate that?



--
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi

Speech Applications - Language Management - Translation - Reader's and Writer's 
Tools - Text Tools - E-books and M-books

Mikael Pesonen
System Engineer

e-mail: mikael.peso...@lingsoft.fi
Tel. +358 2 279 3300

Time zone: GMT+2

Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND

Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND



Re: StreamRDF.base()

2019-08-15 Thread Andy Seaborne




On 15/08/2019 13:02, Claude Warren wrote:

Learn something new every day...

On Wed, Aug 14, 2019 at 5:44 PM Andy Seaborne  wrote:





(and it is technically wrong to have a # in the base)



so as a base "http://example.com/myfile.txt#; is incorrect but "
http://example.com/myfile.txt/; is correct?


Legal.

They are completely different URIs. "/" means something in http URIs.

Fragments are within the document named.
Base URIs are like HTTP requests which also do not have a fragement,

Resolving  against base URIs:

  http://example/dir/
  http://example/dir/file

and it's the same outcome.

http://example/dir/one

https://twitter.com/AndySeaborne/status/1156227576257482754

RFC 3986, section 5.2

5.2.3 - "Base.fragment" is not mentioned.

Jena does cope with # in the base - it drops it as per 5.2, 5.2.3

The only assignment is

T.fragment = R.fragment

(R being the relative URI being resolved, T the output)

Relative <#one> gives:

  http://example/dir/#one
  http://example/dir/file#'one




or technically does the last segment of the base need to be an NCName[1]?


"need" - no.

NCName is an XML-ism.

For RDF/XML it is a good idea - classes and properties can end up as XML 
qnames.





in which case "http://example.com/myfile.txt; but not "
http://example.com/myfile.txt#; or "http://example.com/myfile.txt/;

How does one create a technically correct base that will convert

to


 can't become 

Resolution can't introduce a fragment that isn't in the relative URI to 
start with. <#one> works.




or


?  Or is that just not possible?

Thx,
Claude


[1] https://www.w3.org/TR/xml-names/#NT-NCName





Re: StreamRDF.base()

2019-08-15 Thread Claude Warren
Learn something new every day...

On Wed, Aug 14, 2019 at 5:44 PM Andy Seaborne  wrote:

>
>
>
> (and it is technically wrong to have a # in the base)
>
>
so as a base "http://example.com/myfile.txt#; is incorrect but "
http://example.com/myfile.txt/; is correct?

or technically does the last segment of the base need to be an NCName[1]?
in which case "http://example.com/myfile.txt; but not "
http://example.com/myfile.txt#; or "http://example.com/myfile.txt/;

How does one create a technically correct base that will convert

to

or


?  Or is that just not possible?

Thx,
Claude


[1] https://www.w3.org/TR/xml-names/#NT-NCName
-- 
I like: Like Like - The likeliest place on the web

LinkedIn: http://www.linkedin.com/in/claudewarren