Re: Naming entities
Where uniqueness is more important than readability, I would go with UUIDs. On Thu, Aug 15, 2013 at 2:03 AM, David Moss admo...@gmail.com wrote: This is a fairly basic question, but how do others go about naming entities in an RDF graph? The semantic web evangelists are keen on URIs that mean something ie http://admoss.info/David_Moss. This sounds great but in practice it doesn't scale. There are many people named David Moss in the world. It is possible to have URIs such as http://admoss.info/David_Moss1 http://admoss.info/David_Moss2 ... http://admoss.info/David_Moss249, but differentiating between them is not a human readable task. It also becomes problematic in tracking the highest number of each entity name so additions can be made to the graph. I first tried using blank nodes as entity identifiers but they are no good for the purpose as searching is difficult and they are not supposed to be used outside the environment in which they are created. They are supposed to be internal only references for convenience of the machine. They are also the antithesis of human readable. I currently maintainable next_id entity in my graph and use and update its value to obtain entity names, ending up with http://admoss.info/person22, http://admoss.info/organisation23 and http://admoss.info/Building24 etc. This is not exactly human readable, but I can't think of any naming policy that maintains the dream of human readable identifiers yet scales. How are others addressing this issue?
Fwd: Apache Jena for Developing Java App
Subject: Apache Jena for Developing Java App Dear Sir, I have the questions regarding creating the Java applications in NetBeans with Apache Jena. 1. Is there any possibility to create project without using Maven? If yes, how to do it? 2. Perhaps there are possibilities to download all libraries of Jena, and add to the normal (not Maven) project because later it would be more easy for the user just to use my application without any additional installations like Jena? In the case I do not use nor NetBeans neither Eclipse, how can I get/import these libraries in my Java app? Sincerely Yours, Darius Miliauskas
Re: Starting studies in Jena
Someone else could help me? 2013/8/13 Márcio Vinicius marciosena@gmail.com Now I understand better. An example of how I am adding to the database: See the file Controller.java (http://fallante.com.br/jena) method addNurse on line 51. I do not know if I'm doing the right way, but when necessary add triple feature + id, property and value (line 54). am I correct? carefully. thank you 2013/8/13 Joshua TAYLOR joshuaaa...@gmail.com On Tue, Aug 13, 2013 at 4:11 PM, Márcio Vinicius marciosena@gmail.com wrote: 2 - The SchemaGen generates a java class from a file. Owl among the resources are on the line 280 valueSystolic01 (MonitorSinalVital.java) from what I understand this would be an individual and not a resource. OK, so it's not a property (you'd mentioned Property + id, so I wasn't sure what the resource was supposed to be). Even if it's an individual, I wouldn't go and modify that Java file. Rather, I'd do something more like: OntModel myModel = ...; Individual vs01 = MonitorSinalVital.inModel( myModel ).as( Individual.class ); I haven't tested that code, but something along those lines should work. Note, even though you can get the Individuals, OntProperties, and OntClasses from the vocabulary class, using those constants won't get your model (in this case `myModel`) the axioms from the original OWL ontology. Your model will still need to load the ontology if you want to do any reasoning. The schemagen classes *only* provide a convenient way to get the Resources/Individuals/OntProperties/... that you need without specifying the namespace, etc. -- Joshua Taylor, http://www.cs.rpi.edu/~tayloj/ -- *Márcio Vinícius Oliveira Sena* Bacharelando em Sistemas de Informação - UFG Desenvolvedor Front-end no Laboratório de Tecnologia e Mídias Educacionais - Labtime/UFG Gerente de Projeto e Desenvolvedor Front-end @marciosena17 http://twitter.com/marciosena17 -- *Márcio Vinícius Oliveira Sena* Bacharelando em Sistemas de Informação - UFG Desenvolvedor Front-end no Laboratório de Tecnologia e Mídias Educacionais - Labtime/UFG Gerente de Projeto e Desenvolvedor Front-end @marciosena17 http://twitter.com/marciosena17
Leaving URIs relative
Hello world, If I load this .ttl file with Jena: http://example.org/ml/people/John_Smith livesIn London . Jena helpfully makes the livesIn URI absolute using the file I loaded or, if I specify a baseURI, absolute with respect to that base URI. Is there any way to leave it relative? It happens that I'm moving the data from one place to another and I'd just as soon not bake the absolute URI of the source document into the model. Be seeing you, norm -- Norman Walsh n...@nwalsh.com | Kinship is healing; we are physicians http://nwalsh.com/| to each other.--Oliver Sacks signature.asc Description: PGP signature
TDB: Fuseki, one's own server, hybrid?
A TDB dataset only allows a single JVM to access/manage it at a time. It is my understanding that Fuseki is primarily simply a SPARQL endpoint server to issue queries to for one or more TDB datasets. One can also write their own TDB application, creating their own TDB access server, using the TDB libraries. While it is possible to support SPARQL queries through the TDB libraries, it “may” be the case that the multi-client serviceability mechanisms that are built into Fuseki are not directly available in the TDB libraries if one is wanting to also add their own non-SPARQL access code. I believe it is the case that TDB would not allow both a Fuseki server as well as one’s own server accessing the same TDB instance. Is there any means to enable a hybrid approach, where you can have a server that includes all the capabilities provided by Fuseki, but also allow for extending that server to support access to code that one would write directly against the TDB and Jena libraries? David Jordan Senior Software Developer SAS Institute Inc. Health Life Sciences, Research Development Bldg R ▪ Office 4467 600 Research Drive ▪ Cary, NC 27513 Tel: 919 531 1233 ▪ david.jor...@sas.commailto:david.jor...@sas.com www.sas.comhttp://www.sas.com/ SAS® … THE POWER TO KNOW®
Re: Leaving URIs relative
No, URIs are absolute in RDF model, even though they can be relative in serializations. Why don't you use base URI (@base in Turtle) and/or prefixes so that URIs stay stable no matter where you load the file from? Martynas On Thu, Aug 15, 2013 at 5:39 PM, Norman Walsh n...@nwalsh.com wrote: Hello world, If I load this .ttl file with Jena: http://example.org/ml/people/John_Smith livesIn London . Jena helpfully makes the livesIn URI absolute using the file I loaded or, if I specify a baseURI, absolute with respect to that base URI. Is there any way to leave it relative? It happens that I'm moving the data from one place to another and I'd just as soon not bake the absolute URI of the source document into the model. Be seeing you, norm -- Norman Walsh n...@nwalsh.com | Kinship is healing; we are physicians http://nwalsh.com/| to each other.--Oliver Sacks
Re: Leaving URIs relative
Martynas Jusevičius marty...@graphity.org writes: No, URIs are absolute in RDF model, even though they can be relative in serializations. Why don't you use base URI (@base in Turtle) and/or prefixes so that URIs stay stable no matter where you load the file from? It's not my data. :-) Thanks, though, for confirming what I expected. Be seeing you, norm -- Norman Walsh n...@nwalsh.com | Hanging is too good for a man who makes http://nwalsh.com/| puns; he should be drawn and | quoted.--Fred Allen signature.asc Description: PGP signature
N-Triples and Unicode escapes
Hi, Jena falls over parsing this triple: http://www.worldcat.org/oclc/5512944 http://schema.org/about http://id.loc.gov/authorities/classification/Microfilm 06252 \u003CMicroRR\u003E . It appears to expande the unicode escape and then treat the resulting character as a markup character. Is that a bug or is this triple malformed? Be seeing you, norm -- Norman Walsh n...@nwalsh.com | Art has to move you and design does http://nwalsh.com/| not, unless it's a good design for a | bus.--David Hockney signature.asc Description: PGP signature
Re: Starting studies in Jena
I walked a little more about my studies and found that the Protege (software I developed my ontology generates interfaces java implementation), the truth is I implement these classes with properties (specializations, generalizations, etc.)? carefully. 2013/8/15 Márcio Vinicius marciosena@gmail.com Someone else could help me? 2013/8/13 Márcio Vinicius marciosena@gmail.com Now I understand better. An example of how I am adding to the database: See the file Controller.java (http://fallante.com.br/jena) method addNurse on line 51. I do not know if I'm doing the right way, but when necessary add triple feature + id, property and value (line 54). am I correct? carefully. thank you 2013/8/13 Joshua TAYLOR joshuaaa...@gmail.com On Tue, Aug 13, 2013 at 4:11 PM, Márcio Vinicius marciosena@gmail.com wrote: 2 - The SchemaGen generates a java class from a file. Owl among the resources are on the line 280 valueSystolic01 (MonitorSinalVital.java) from what I understand this would be an individual and not a resource. OK, so it's not a property (you'd mentioned Property + id, so I wasn't sure what the resource was supposed to be). Even if it's an individual, I wouldn't go and modify that Java file. Rather, I'd do something more like: OntModel myModel = ...; Individual vs01 = MonitorSinalVital.inModel( myModel ).as( Individual.class ); I haven't tested that code, but something along those lines should work. Note, even though you can get the Individuals, OntProperties, and OntClasses from the vocabulary class, using those constants won't get your model (in this case `myModel`) the axioms from the original OWL ontology. Your model will still need to load the ontology if you want to do any reasoning. The schemagen classes *only* provide a convenient way to get the Resources/Individuals/OntProperties/... that you need without specifying the namespace, etc. -- Joshua Taylor, http://www.cs.rpi.edu/~tayloj/ -- *Márcio Vinícius Oliveira Sena* Bacharelando em Sistemas de Informação - UFG Desenvolvedor Front-end no Laboratório de Tecnologia e Mídias Educacionais - Labtime/UFG Gerente de Projeto e Desenvolvedor Front-end @marciosena17 http://twitter.com/marciosena17 -- *Márcio Vinícius Oliveira Sena* Bacharelando em Sistemas de Informação - UFG Desenvolvedor Front-end no Laboratório de Tecnologia e Mídias Educacionais - Labtime/UFG Gerente de Projeto e Desenvolvedor Front-end @marciosena17 http://twitter.com/marciosena17 -- *Márcio Vinícius Oliveira Sena* Bacharelando em Sistemas de Informação - UFG Desenvolvedor Front-end no Laboratório de Tecnologia e Mídias Educacionais - Labtime/UFG Gerente de Projeto e Desenvolvedor Front-end @marciosena17 http://twitter.com/marciosena17
Re: N-Triples and Unicode escapes
On 15/08/13 21:36, Norman Walsh wrote: Hi, Jena falls over parsing this triple: http://www.worldcat.org/oclc/5512944 http://schema.org/about http://id.loc.gov/authorities/classification/Microfilm 06252 \u003CMicroRR\u003E . It appears to expande the unicode escape and then treat the resulting character as a markup character. Is that a bug or is this triple malformed? Malformed. is never legal in an IRI. \u003C is NTriples, Turtle escape sequence. It does not put \-u-0-0-3-C into the IRI. It puts a single . It does not matter how you force it into an IRI - there is an in it and it's illegal. (\u processing is done before parsing the IRI to pin point the error more exactly ... but it would fail the IRI validation step if you did get it through). See also http://www.sparql.org/iri-validator.html It's got a space in it as well. Andy Be seeing you, norm
Re: Leaving URIs relative
Are you getting data with relative URIs? Can't you set base URI programatically? Here's some code that does that: https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/processor/provider/OntologyProvider.java Martynas On Aug 15, 2013 11:34 PM, Norman Walsh n...@nwalsh.com wrote: Martynas Jusevičius marty...@graphity.org writes: No, URIs are absolute in RDF model, even though they can be relative in serializations. Why don't you use base URI (@base in Turtle) and/or prefixes so that URIs stay stable no matter where you load the file from? It's not my data. :-) Thanks, though, for confirming what I expected. Be seeing you, norm -- Norman Walsh n...@nwalsh.com | Hanging is too good for a man who makes http://nwalsh.com/| puns; he should be drawn and | quoted.--Fred Allen
Re: Leaving URIs relative
Note that for RDF/XML-ABBREV writer at least you can set your own dummy base URI on the read API call, set the same intended base URI on the write call and so preserve relative URIs that way. Not sure if that works with the Turtle writer. Dave On 15/08/13 22:12, Martynas Jusevičius wrote: Are you getting data with relative URIs? Can't you set base URI programatically? Here's some code that does that: https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/processor/provider/OntologyProvider.java Martynas On Aug 15, 2013 11:34 PM, Norman Walsh n...@nwalsh.com wrote: Martynas Jusevičius marty...@graphity.org writes: No, URIs are absolute in RDF model, even though they can be relative in serializations. Why don't you use base URI (@base in Turtle) and/or prefixes so that URIs stay stable no matter where you load the file from? It's not my data. :-) Thanks, though, for confirming what I expected. Be seeing you, norm -- Norman Walsh n...@nwalsh.com | Hanging is too good for a man who makes http://nwalsh.com/| puns; he should be drawn and | quoted.--Fred Allen