You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mikael Pesonen <mi...@lingsoft.fi> on 2019/12/17 13:43:49 UTC

Resource ID created by service

Hi,

not directly about Jena/Fuseki but hope someone can help.

When posting new metadata into db, for example as turtle, user have to 
have the resource IDs generated:

<http://example.com/1234> a foaf:Document .
...

Is there a standard way to have the service, either Jena or some other 
layer, to generate the ID for the user.
So in that case user could send

<INSERT NEW ID HERE> a foaf:Document .
...

and service would replace <INSERT NEW ID HERE> with 
<http://example.com/1234> and return the ID for the user.

Re: Resource ID created by service

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Empty node <> works for a single node only. So maybe blank nodes would 
be better solution - user can have as many of them as needed in a single 
document. Only possible issue is that if the data already contains blank 
nodes, how to recognize them.

On 17/12/2019 17.06, Mikael Pesonen wrote:
>
> Ah, LDP solution of <> seems the way to go, why make it more 
> complicated :)
> Blank nodes could make things bit more complicated I think. They are 
> good for using as values for other resources, but haven't seen them 
> used as the only/main resource when describing something.
>
> Thanks!
>

-- 
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.pesonen@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: Resource ID created by service

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Ah, LDP solution of <> seems the way to go, why make it more complicated :)
Blank nodes could make things bit more complicated I think. They are 
good for using as values for other resources, but haven't seen them used 
as the only/main resource when describing something.

Thanks!


Re: Resource ID created by service

Posted by Martynas Jusevičius <ma...@atomgraph.com>.
Do you really need URIs? Can't you send blank nodes?

On Tue, Dec 17, 2019 at 3:10 PM Mikael Pesonen
<mi...@lingsoft.fi> wrote:
>
>
> Thanks for the link, answer #2 is how we could do it with SPARQL. I'm
> still interested in how user should tell in data that service has to
> create ID. Is there some standard notation for  <INSERT NEW ID HERE> ?
>
> On 17/12/2019 15.56, Richard Cyganiak wrote:
> > See here for some (non-Jena-specific) approaches and discussion:
> >
> > https://stackoverflow.com/questions/55635814/best-approach-to-create-uris-with-sparql-like-auto-increment
> >
> >
> >> On 17 Dec 2019, at 13:44, Mikael Pesonen <mi...@lingsoft.fi> wrote:
> >>
> >> Hi,
> >>
> >> not directly about Jena/Fuseki but hope someone can help.
> >>
> >> When posting new metadata into db, for example as turtle, user have to have the resource IDs generated:
> >>
> >> <http://example.com/1234> a foaf:Document .
> >> ...
> >>
> >> Is there a standard way to have the service, either Jena or some other layer, to generate the ID for the user.
> >> So in that case user could send
> >>
> >> <INSERT NEW ID HERE> a foaf:Document .
> >> ...
> >>
> >> and service would replace <INSERT NEW ID HERE> with <http://example.com/1234> and return the ID for the user.
>
> --
> 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.pesonen@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: Resource ID created by service

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Actually my example was wrong in sense that we are using UUIDs. 
http://www.example.com/1234
should be http://www.example.com/<uuid> so we don't have the issue of 
uniqueness.

On 17/12/2019 16.53, Bögershausen, Merlin Michael wrote:
> Hi Mike,
> With respect to the Open World Assumption the task at hand is not an easy one, because the server can not determine the uniqueness of an identifier.
>
> There is a W3C Working Draft for Decentralized Identifier (https://www.w3.org/TR/did-core/) that may help on this issue and maybe could provide a solution for your problem.
>
> Best Merlin
>
> Am 17.12.2019 15:10 schrieb Mikael Pesonen <mi...@lingsoft.fi>:
>
> Thanks for the link, answer #2 is how we could do it with SPARQL. I'm
> still interested in how user should tell in data that service has to
> create ID. Is there some standard notation for  <INSERT NEW ID HERE> ?
>
> On 17/12/2019 15.56, Richard Cyganiak wrote:
>> See here for some (non-Jena-specific) approaches and discussion:
>>
>> https://stackoverflow.com/questions/55635814/best-approach-to-create-uris-with-sparql-like-auto-increment
>>
>>
>>> On 17 Dec 2019, at 13:44, Mikael Pesonen <mi...@lingsoft.fi> wrote:
>>>
>>> Hi,
>>>
>>> not directly about Jena/Fuseki but hope someone can help.
>>>
>>> When posting new metadata into db, for example as turtle, user have to have the resource IDs generated:
>>>
>>> <http://example.com/1234> a foaf:Document .
>>> ...
>>>
>>> Is there a standard way to have the service, either Jena or some other layer, to generate the ID for the user.
>>> So in that case user could send
>>>
>>> <INSERT NEW ID HERE> a foaf:Document .
>>> ...
>>>
>>> and service would replace <INSERT NEW ID HERE> with <http://example.com/1234> and return the ID for the user.
> --
> Lingsoft - 30 years of Leading Language Management
>
> www.lingsoft.fi<http://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.pesonen@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
>

-- 
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.pesonen@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: Resource ID created by service

Posted by Bögershausen, Merlin Michael <me...@rwth-aachen.de>.
Hi Mike,
With respect to the Open World Assumption the task at hand is not an easy one, because the server can not determine the uniqueness of an identifier.

There is a W3C Working Draft for Decentralized Identifier (https://www.w3.org/TR/did-core/) that may help on this issue and maybe could provide a solution for your problem.

Best Merlin

Am 17.12.2019 15:10 schrieb Mikael Pesonen <mi...@lingsoft.fi>:

Thanks for the link, answer #2 is how we could do it with SPARQL. I'm
still interested in how user should tell in data that service has to
create ID. Is there some standard notation for  <INSERT NEW ID HERE> ?

On 17/12/2019 15.56, Richard Cyganiak wrote:
> See here for some (non-Jena-specific) approaches and discussion:
>
> https://stackoverflow.com/questions/55635814/best-approach-to-create-uris-with-sparql-like-auto-increment
>
>
>> On 17 Dec 2019, at 13:44, Mikael Pesonen <mi...@lingsoft.fi> wrote:
>>
>> Hi,
>>
>> not directly about Jena/Fuseki but hope someone can help.
>>
>> When posting new metadata into db, for example as turtle, user have to have the resource IDs generated:
>>
>> <http://example.com/1234> a foaf:Document .
>> ...
>>
>> Is there a standard way to have the service, either Jena or some other layer, to generate the ID for the user.
>> So in that case user could send
>>
>> <INSERT NEW ID HERE> a foaf:Document .
>> ...
>>
>> and service would replace <INSERT NEW ID HERE> with <http://example.com/1234> and return the ID for the user.

--
Lingsoft - 30 years of Leading Language Management

www.lingsoft.fi<http://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.pesonen@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: Resource ID created by service

Posted by Richard Cyganiak <ri...@cyganiak.de>.
> On 17 Dec 2019, at 14:10, Mikael Pesonen <mi...@lingsoft.fi> wrote:
> 
> Thanks for the link, answer #2 is how we could do it with SPARQL. I'm still interested in how user should tell in data that service has to create ID. Is there some standard notation for  <INSERT NEW ID HERE> ?

IIRC, the LDP protocol has something along those lines. If you send an HTTP POST with an RDF payload to a URI representing a container of resources, any empty relative URIs (<> in Turtle) will be treated as <INSERT NEW ID HERE>. The container chooses the URI. I haven't looked at LDP in a while, forgive me if I get some details wrong.

Richard



> 
> On 17/12/2019 15.56, Richard Cyganiak wrote:
>> See here for some (non-Jena-specific) approaches and discussion:
>> 
>> https://stackoverflow.com/questions/55635814/best-approach-to-create-uris-with-sparql-like-auto-increment
>> 
>> 
>>> On 17 Dec 2019, at 13:44, Mikael Pesonen <mi...@lingsoft.fi> wrote:
>>> 
>>> Hi,
>>> 
>>> not directly about Jena/Fuseki but hope someone can help.
>>> 
>>> When posting new metadata into db, for example as turtle, user have to have the resource IDs generated:
>>> 
>>> <http://example.com/1234> a foaf:Document .
>>> ...
>>> 
>>> Is there a standard way to have the service, either Jena or some other layer, to generate the ID for the user.
>>> So in that case user could send
>>> 
>>> <INSERT NEW ID HERE> a foaf:Document .
>>> ...
>>> 
>>> and service would replace <INSERT NEW ID HERE> with <http://example.com/1234> and return the ID for the user.
> 
> -- 
> 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.pesonen@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: Resource ID created by service

Posted by Mikael Pesonen <mi...@lingsoft.fi>.
Thanks for the link, answer #2 is how we could do it with SPARQL. I'm 
still interested in how user should tell in data that service has to 
create ID. Is there some standard notation for  <INSERT NEW ID HERE> ?

On 17/12/2019 15.56, Richard Cyganiak wrote:
> See here for some (non-Jena-specific) approaches and discussion:
>
> https://stackoverflow.com/questions/55635814/best-approach-to-create-uris-with-sparql-like-auto-increment
>
>
>> On 17 Dec 2019, at 13:44, Mikael Pesonen <mi...@lingsoft.fi> wrote:
>>
>> Hi,
>>
>> not directly about Jena/Fuseki but hope someone can help.
>>
>> When posting new metadata into db, for example as turtle, user have to have the resource IDs generated:
>>
>> <http://example.com/1234> a foaf:Document .
>> ...
>>
>> Is there a standard way to have the service, either Jena or some other layer, to generate the ID for the user.
>> So in that case user could send
>>
>> <INSERT NEW ID HERE> a foaf:Document .
>> ...
>>
>> and service would replace <INSERT NEW ID HERE> with <http://example.com/1234> and return the ID for the user.

-- 
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.pesonen@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: Resource ID created by service

Posted by Richard Cyganiak <ri...@cyganiak.de>.
See here for some (non-Jena-specific) approaches and discussion:

https://stackoverflow.com/questions/55635814/best-approach-to-create-uris-with-sparql-like-auto-increment


> On 17 Dec 2019, at 13:44, Mikael Pesonen <mi...@lingsoft.fi> wrote:
> 
> Hi,
> 
> not directly about Jena/Fuseki but hope someone can help.
> 
> When posting new metadata into db, for example as turtle, user have to have the resource IDs generated:
> 
> <http://example.com/1234> a foaf:Document .
> ...
> 
> Is there a standard way to have the service, either Jena or some other layer, to generate the ID for the user.
> So in that case user could send
> 
> <INSERT NEW ID HERE> a foaf:Document .
> ...
> 
> and service would replace <INSERT NEW ID HERE> with <http://example.com/1234> and return the ID for the user.