You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@marmotta.apache.org by Joshua Dunham <jo...@vrtx.com> on 2014/07/30 18:13:48 UTC

Marmotta/Kiwi and Anonymous Nodes

Hi Marmotta Users,

     I have a ontology design for Kiwi question. Let’s say I want to describe some properties of a computer/server. I could use this simple turtle,

@prefix xsd: ….
@prefix rdf ….
@prefix maront: <http://my.server.domain/ont/1/#>
@prefix mar: <http://my.marmottaDB.domain/marmotta/resource/>

mar:server a maront:linuxserver ;
   maront:amountRamGB “4”^^xsd:decimal ;
   maront:amountHDTB “2”^^xsd:decimal .

to define the server, what it ‘is’, the amount of RAM and the amount of HD (space). If I want to say that this server is running marmotta 3.3.0 this is a bit more difficult. Normally I’d use an anonymous node,

@prefix ~ ~ ~

mar:server [
    maront:hasResourceName mar:ApacheMarmotta ;
    maront:hasResourceVersion “3.3.0” ;
    maront:hasResourceType “Database” ;
] .

but even though it’s OK turtle syntax, this seems to be not allowed in Marmotta/Kiwi. I want to describe the server to say it runs Marmotta but that it’s specifically the 3.3.0 version.My question is, how do community members handle this sort of situation?  This is a simple example but there are more complex things I want to describe like saying this particular install uses a specific config file or that this runs as a specific user while another one may be run as root. This is the sort of situation anonymous nodes seemed to solve, but in a linked data platform anonymous nodes don’t really make sense, but I’m not sure how to best sort out this situation.

 Thanks Everyone,
   -Joshua


This email message and any attachments are confidential and intended for use by the addressee(s) only. If you are not the intended recipient, please notify me immediately by replying to this message, and destroy all copies of this message and any attachments. Thank you.

Re: Marmotta/Kiwi and Anonymous Nodes

Posted by Joshua Dunham <jo...@vrtx.com>.
Hey Sergio

On Aug 1, 2014, at 2:44 AM, Sergio Fernández <wi...@apache.org> wrote:

> Hi Joshua,
>
> On 31/07/14 18:54, Joshua Dunham wrote:
>> I think I hastily typed a minimal working example. My real case was converted via rapper from ttl to rdfxml which checks out OK. What I’m seeing is, after import using the admin UI, the main record goes in a ‘linuxserver’ type which has three linked records (RAM, HD, and ‘runs’). No matter what I try I can’t get Marmotta to generate a URI for ‘runs’. My terminology is off, but the behavior I’d like is that the value for the runs (which seems like a randomly generated string?) be a typical link to the record which has the values for the Marmotta installation. Currently it looks like it’s just a string with no link to the sub-records.
>
> Because that the definition of a blank node in rdf: a node which does not get a name (URI). The bnode identifier is just an internal system identifier, never a proper identifier.
>
> I'd suggest you to read a bit more about the blank nodes concept in RDF: https://urldefense.proofpoint.com/v1/url?u=http://www.w3.org/TR/rdf11-concepts/%23section-blank-nodes&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=TOY66dhdYH823IZKarqLmztTlwNDTCoh9M%2B%2BTo0Hy30%3D%0A&s=885c2b7355e96e2e39d42bbb33b81d27467ec6e6ceaece4b76474f3ee21175e2
>

Thanks for that.

>> Is this possible? If so, what could be the issue that it doesn’t create a link to the record? When I’m using the data viewer and choose the test namespace I assigned this record to I see 50% of the records are in the linuxserver type and 50% are in a ‘no-type’. When I click on no-type in the admin UI I see that it actually made three copies of the records in the ‘runs’ array. I’m not sure why this happened either.
>
> Well, I'm not sure how the Data Views handles navigation from bnodes. For that it's much better that you use directly the resource view:
>
> https://urldefense.proofpoint.com/v1/url?u=http://localhost:8080/marmotta/resource?uri%3Dhttp%253A%252F%252Fmy.marmottaDB.domain%252Fmarmotta%252Fresource%252Fserver&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=TOY66dhdYH823IZKarqLmztTlwNDTCoh9M%2B%2BTo0Hy30%3D%0A&s=46c74c0b77bc5966b0d2202dc33b1d6c6469242e9f284abaf1a0474b17f9df5a
>
> If you really have Marmotta accessible at my.marmottaDB.domain/marmotta, then you can directly access the resource: https://urldefense.proofpoint.com/v1/url?u=http://my.marmottadb.domain/marmotta/resource/server&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=TOY66dhdYH823IZKarqLmztTlwNDTCoh9M%2B%2BTo0Hy30%3D%0A&s=7bbf10d6bf4fd46b385bbf437ee7c86de2cf7f673422e3110c88ba134dab5e56
>
> I'd recommend you to use a visualization tool, such as https://urldefense.proofpoint.com/v1/url?u=http://dev.redlink.io/demos/rdfdot&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=TOY66dhdYH823IZKarqLmztTlwNDTCoh9M%2B%2BTo0Hy30%3D%0A&s=0865f355e72df939a82e800b791f2dc65ad67d6b49955d5d7ed696c8b259ae09 , to see the actual graph your are generating from that RDF source.
>

I was trying to use the DataViewer to quickly ‘bug test’ the design. Since it looked drastically different from what the WME should have produced I was confused.

The RDFDot program on Redlink works. Looks similar to rapper and dot so I can use that going forward.


>> So my question is threefold.
>> - Why is Marmotta not making the anonymous node a link from the linuxserver record to the node.
>
> Because the Data Views does not support bnodes navigation, as I told you above.
>
>> - Why is Marmotta making three copies of the hasResourceName/Version/Type records?
>
> I saw it. It might be a bug in the Data Views. Such functionally it was never meant to be an inspector tool. Please, file in issue in case you think it's important.
>

I will only b/c it’s a bug. Will mark as trivial.


>> - Is it possible to define how the UUID for the anonymous node is created? Its difficult to traverse the linked data path if I’m not sure of the names that are in each record.
>
> No, internal system identifier. Use a proper resource identifier with a uri if you want a meaningful identifier.
>

This is an important point. How would this be done without using anonymous nodes? What I want to convey is that there is an object that has a relationship to another object BUT the relationship has some qualifiers which deviate from the generic state of the second object.

Are anonymous nodes the best way to do this? Maybe it’s a better question for a mailing list specific to RDF design (if you could recc’d one that would be helpful!)

> Hope that helps.
>
> Cheers,
>

Thanks for your help getting started!

> --
> Sergio Fernández
> Partner Technology Manager
> Redlink GmbH
> m: +43 660 2747 925
> e: sergio.fernandez@redlink.co
> w: https://urldefense.proofpoint.com/v1/url?u=http://redlink.co/&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=TOY66dhdYH823IZKarqLmztTlwNDTCoh9M%2B%2BTo0Hy30%3D%0A&s=b6b89b058578966591f7a117f3601f8db2904fb233481a79401c1e706e8fdfce

This email message and any attachments are confidential and intended for use by the addressee(s) only. If you are not the intended recipient, please notify me immediately by replying to this message, and destroy all copies of this message and any attachments. Thank you.

Re: Marmotta/Kiwi and Anonymous Nodes

Posted by Sergio Fernández <wi...@apache.org>.
Hi Joshua,

On 31/07/14 18:54, Joshua Dunham wrote:
> I think I hastily typed a minimal working example. My real case was converted via rapper from ttl to rdfxml which checks out OK. What I’m seeing is, after import using the admin UI, the main record goes in a ‘linuxserver’ type which has three linked records (RAM, HD, and ‘runs’). No matter what I try I can’t get Marmotta to generate a URI for ‘runs’. My terminology is off, but the behavior I’d like is that the value for the runs (which seems like a randomly generated string?) be a typical link to the record which has the values for the Marmotta installation. Currently it looks like it’s just a string with no link to the sub-records.

Because that the definition of a blank node in rdf: a node which does 
not get a name (URI). The bnode identifier is just an internal system 
identifier, never a proper identifier.

I'd suggest you to read a bit more about the blank nodes concept in RDF: 
http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes

> Is this possible? If so, what could be the issue that it doesn’t create a link to the record? When I’m using the data viewer and choose the test namespace I assigned this record to I see 50% of the records are in the linuxserver type and 50% are in a ‘no-type’. When I click on no-type in the admin UI I see that it actually made three copies of the records in the ‘runs’ array. I’m not sure why this happened either.

Well, I'm not sure how the Data Views handles navigation from bnodes. 
For that it's much better that you use directly the resource view:

http://localhost:8080/marmotta/resource?uri=http%3A%2F%2Fmy.marmottaDB.domain%2Fmarmotta%2Fresource%2Fserver

If you really have Marmotta accessible at my.marmottaDB.domain/marmotta, 
then you can directly access the resource: 
http://my.marmottaDB.domain/marmotta/resource/server

I'd recommend you to use a visualization tool, such as 
http://dev.redlink.io/demos/rdfdot , to see the actual graph your are 
generating from that RDF source.

> So my question is threefold.
> - Why is Marmotta not making the anonymous node a link from the linuxserver record to the node.

Because the Data Views does not support bnodes navigation, as I told you 
above.

> - Why is Marmotta making three copies of the hasResourceName/Version/Type records?

I saw it. It might be a bug in the Data Views. Such functionally it was 
never meant to be an inspector tool. Please, file in issue in case you 
think it's important.

> - Is it possible to define how the UUID for the anonymous node is created? Its difficult to traverse the linked data path if I’m not sure of the names that are in each record.

No, internal system identifier. Use a proper resource identifier with a 
uri if you want a meaningful identifier.

Hope that helps.

Cheers,

-- 
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co

Re: Marmotta/Kiwi and Anonymous Nodes

Posted by Joshua Dunham <jo...@vrtx.com>.
Hey Sergio,

   I think I hastily typed a minimal working example. My real case was converted via rapper from ttl to rdfxml which checks out OK. What I’m seeing is, after import using the admin UI, the main record goes in a ‘linuxserver’ type which has three linked records (RAM, HD, and ‘runs’). No matter what I try I can’t get Marmotta to generate a URI for ‘runs’. My terminology is off, but the behavior I’d like is that the value for the runs (which seems like a randomly generated string?) be a typical link to the record which has the values for the Marmotta installation. Currently it looks like it’s just a string with no link to the sub-records.

   Is this possible? If so, what could be the issue that it doesn’t create a link to the record? When I’m using the data viewer and choose the test namespace I assigned this record to I see 50% of the records are in the linuxserver type and 50% are in a ‘no-type’. When I click on no-type in the admin UI I see that it actually made three copies of the records in the ‘runs’ array. I’m not sure why this happened either.

So my question is threefold.
- Why is Marmotta not making the anonymous node a link from the linuxserver record to the node.
- Why is Marmotta making three copies of the hasResourceName/Version/Type records?
- Is it possible to define how the UUID for the anonymous node is created? Its difficult to traverse the linked data path if I’m not sure of the names that are in each record.

   Thanks for helping clear this up for me, sorry to be a pest!

   -Joshua


Joshua Dunham
Scientific Computing | Vertex
E: joshua_dunham@vrtx.com<ma...@vrtx.com>
P: 617-229-5157
W: http://www.vrtx.com<http://www.vrtx.com/>
L: http://linkedin.com/in/joshuadunham
S: joshua.dunham

On Jul 31, 2014, at 11:58 AM, Sergio Fernández <se...@salzburgresearch.at>> wrote:

Joshua,

sorry, but the second snippet is not valid Turtle syntax... I think you want something likehttps://urldefense.proofpoint.com/v1/url?u=https://gist.github.com/wikier/57c92f9f280d28a71bc9&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=xpu%2BZTTG40izzVuDFn0uBUB%2BruWNeVae4nCYj%2BvGAU8%3D%0A&s=fa1ef1d18ec29b5a6862a360df5734ac5ed533a6072e09124aa6f59243832e6f<https://urldefense.proofpoint.com/v1/url?u=https://gist.github.com/wikier/57c92f9f280d28a71bc9&k=nlnsHLn0ybmZ0IJA5X3Bfg==
&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U=
&m=xpu+ZTTG40izzVuDFn0uBUB+ruWNeVae4nCYj+vGAU8=
&s=fa1ef1d18ec29b5a6862a360df5734ac5ed533a6072e09124aa6f59243832e6f>

I'd recommend you to firstly take a look to the Turtle syntax: https://urldefense.proofpoint.com/v1/url?u=http://www.w3.org/TR/turtle/&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=xpu%2BZTTG40izzVuDFn0uBUB%2BruWNeVae4nCYj%2BvGAU8%3D%0A&s=5b53f1d213ee9d424f406e8dda30dd261886752a6f72ad4796a36a78ae281ccb

I wonder how you tried to import such data in Marmotta, because you should get an error regarding the wrong syntax used. Please, provide the details in case.

Cheers,


On 30/07/14 18:13, Joshua Dunham wrote:
Hi Marmotta Users,

     I have a ontology design for Kiwi question. Let’s say I want to describe some properties of a computer/server. I could use this simple turtle,

@prefix xsd: ….
@prefix rdf ….
@prefix maront: <https://urldefense.proofpoint.com/v1/url?u=http://my.server.domain/ont/1/%23&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=xpu%2BZTTG40izzVuDFn0uBUB%2BruWNeVae4nCYj%2BvGAU8%3D%0A&s=486d61e0bff4629338b4f4b7494555bba3f067b144fc940187176e0bd5b38dab>
@prefix mar: <https://urldefense.proofpoint.com/v1/url?u=http://my.marmottadb.domain/marmotta/resource/&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=xpu%2BZTTG40izzVuDFn0uBUB%2BruWNeVae4nCYj%2BvGAU8%3D%0A&s=a0400901139f6434b1b3fb6d786695d3b258a32e0355f62c7888f34d499c59c0>

mar:server a maront:linuxserver ;
   maront:amountRamGB “4”^^xsd:decimal ;
   maront:amountHDTB “2”^^xsd:decimal .

to define the server, what it ‘is’, the amount of RAM and the amount of HD (space). If I want to say that this server is running marmotta 3.3.0 this is a bit more difficult. Normally I’d use an anonymous node,

@prefix ~ ~ ~

mar:server [
    maront:hasResourceName mar:ApacheMarmotta ;
    maront:hasResourceVersion “3.3.0” ;
    maront:hasResourceType “Database” ;
] .

but even though it’s OK turtle syntax, this seems to be not allowed in Marmotta/Kiwi. I want to describe the server to say it runs Marmotta but that it’s specifically the 3.3.0 version.My question is, how do community members handle this sort of situation?  This is a simple example but there are more complex things I want to describe like saying this particular install uses a specific config file or that this runs as a specific user while another one may be run as root. This is the sort of situation anonymous nodes seemed to solve, but in a linked data platform anonymous nodes don’t really make sense, but I’m not sure how to best sort out this situation.

 Thanks Everyone,
   -Joshua


This email message and any attachments are confidential and intended for use by the addressee(s) only. If you are not the intended recipient, please notify me immediately by replying to this message, and destroy all copies of this message and any attachments. Thank you.


--
Sergio Fernández
Senior Researcher
Knowledge and Media Technologies
Salzburg Research Forschungsgesellschaft mbH
Jakob-Haringer-Straße 5/3 | 5020 Salzburg, Austria
T: +43 662 2288 318 | M: +43 660 2747 925
sergio.fernandez@salzburgresearch.at<ma...@salzburgresearch.at>
https://urldefense.proofpoint.com/v1/url?u=http://www.salzburgresearch.at/&k=nlnsHLn0ybmZ0IJA5X3Bfg%3D%3D%0A&r=Ti2ZOdevHxjcPRKaSErKsJsdngV4bllmizMzlKHBb0U%3D%0A&m=xpu%2BZTTG40izzVuDFn0uBUB%2BruWNeVae4nCYj%2BvGAU8%3D%0A&s=9a969adfbfa16c4ca40e5c40a92a58ca6865866d417233c67b47cd47810429c2

This email message and any attachments are confidential and intended for use by the addressee(s) only. If you are not the intended recipient, please notify me immediately by replying to this message, and destroy all copies of this message and any attachments. Thank you.

Re: Marmotta/Kiwi and Anonymous Nodes

Posted by Sergio Fernández <se...@salzburgresearch.at>.
Joshua,

sorry, but the second snippet is not valid Turtle syntax... I think you 
want something like https://gist.github.com/wikier/57c92f9f280d28a71bc9

I'd recommend you to firstly take a look to the Turtle syntax: 
http://www.w3.org/TR/turtle/

I wonder how you tried to import such data in Marmotta, because you 
should get an error regarding the wrong syntax used. Please, provide the 
details in case.

Cheers,


On 30/07/14 18:13, Joshua Dunham wrote:
> Hi Marmotta Users,
>
>       I have a ontology design for Kiwi question. Let’s say I want to describe some properties of a computer/server. I could use this simple turtle,
>
> @prefix xsd: ….
> @prefix rdf ….
> @prefix maront: <http://my.server.domain/ont/1/#>
> @prefix mar: <http://my.marmottaDB.domain/marmotta/resource/>
>
> mar:server a maront:linuxserver ;
>     maront:amountRamGB “4”^^xsd:decimal ;
>     maront:amountHDTB “2”^^xsd:decimal .
>
> to define the server, what it ‘is’, the amount of RAM and the amount of HD (space). If I want to say that this server is running marmotta 3.3.0 this is a bit more difficult. Normally I’d use an anonymous node,
>
> @prefix ~ ~ ~
>
> mar:server [
>      maront:hasResourceName mar:ApacheMarmotta ;
>      maront:hasResourceVersion “3.3.0” ;
>      maront:hasResourceType “Database” ;
> ] .
>
> but even though it’s OK turtle syntax, this seems to be not allowed in Marmotta/Kiwi. I want to describe the server to say it runs Marmotta but that it’s specifically the 3.3.0 version.My question is, how do community members handle this sort of situation?  This is a simple example but there are more complex things I want to describe like saying this particular install uses a specific config file or that this runs as a specific user while another one may be run as root. This is the sort of situation anonymous nodes seemed to solve, but in a linked data platform anonymous nodes don’t really make sense, but I’m not sure how to best sort out this situation.
>
>   Thanks Everyone,
>     -Joshua
>
>
> This email message and any attachments are confidential and intended for use by the addressee(s) only. If you are not the intended recipient, please notify me immediately by replying to this message, and destroy all copies of this message and any attachments. Thank you.
>

-- 
Sergio Fernández
Senior Researcher
Knowledge and Media Technologies
Salzburg Research Forschungsgesellschaft mbH
Jakob-Haringer-Straße 5/3 | 5020 Salzburg, Austria
T: +43 662 2288 318 | M: +43 660 2747 925
sergio.fernandez@salzburgresearch.at
http://www.salzburgresearch.at