Hi everyone,
I need to parse an RDFS file (RDFS-Schema) (which is an ontology,
containing
classes, sub-classes, properties...). I tried the API Jena, but the
examples
I found just parse data (RDF files) and not RDF-schemas. Do you have an
example of a java class that parse an RDFS file ?
thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev
-~----------~----~----~----~------~----~------~--~---
Parsing an RDFSchema file
On 7/11/06, enisch@gmail.com wrote:
>
> Hi everyone,
>
> I need to parse an RDFS file (RDFS-Schema) (which is an ontology,
> containing
> classes, sub-classes, properties...). I tried the API Jena, but the
> examples
> I found just parse data (RDF files) and not RDF-schemas. Do you have an
> example of a java class that parse an RDFS file ?
RDF schemas are RDF, so you can use the standard parsers loading data
into a regular Model. If you're wanting to use RDFS inference, there
is the Ontology API, see:
http://jena.sourceforge.net/ontology/index.html
Cheers,
Danny.
--
http://dannyayers.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev
-~----------~----~----~----~------~----~------~--~---
Parsing an RDFSchema file
Thanks, I read that but I can't find a full example that reads the
ontology and returns classes, sub-classes, and properties.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev
-~----------~----~----~----~------~----~------~--~---
Parsing an RDFSchema file
On 7/13/06, enisch@gmail.com wrote:
>
> Thanks, I read that but I can't find a full example that reads the
> ontology and returns classes, sub-classes, and properties.
It depends on what you want to do, but you can achieve this kind of thing with -
ResIterator iter = model.listSubjectsWithProperty(RDF.type, RDF.Property);
while (iter.hasNext()) {
Resource r = iter.nextResource();
...
}
Check the Javadoc for Model and -
http://jena.sourceforge.net/tutorial/RDF_API/index.html#ch-Querying%20a%20Model
Cheers,
Danny.
--
http://dannyayers.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev
-~----------~----~----~----~------~----~------~--~---
Parsing an RDFSchema file
how to read the ontology file ?
I tried with this but it deoes'nt work :
InputStream in = FileManager.get().open("OntologieTourism.rdf");
if (in == null) {
throw new IllegalArgumentException("File: "+OntologieTourism.rdf+"not
found");}
model.read(in, "OntologieTourism.rdf");
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "SIOC-Dev" group.
To post to this group, send email to sioc-dev@googlegroups.com
To unsubscribe from this group, send email to sioc-dev-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sioc-dev
-~----------~----~----~----~------~----~------~--~---
Parsing an RDFSchema file
Hello, looks like you are using Java and Jena, best place to ask
those questions is the Jena-dev Mailinglist at Yahoo!
From my mind the easiest way is a model.read("OntologieTourism.rdf");
Christoph
Am 02.08.2006 um 02:39 schrieb nice:
>
> how to read the ontology file ?
> I tried with this but it deoes'nt work :
>
> InputStream in = FileManager.get().open("OntologieTourism.rdf");
> if (in == null) {
> throw new IllegalArgumentException("File: "+OntologieTourism.rdf
> +"not
> found");}
> model.read(in, "OntologieTourism.rdf");
--
Christoph Görn
http://B4mad.Net/FOAF/goern.rdf#goern
Usability schmusability... where's the part where we talk about how
this helps users kick ass?