On Thu, 2011-09-08 at 13:48 +0300, Evangelia Daskalaki wrote: > Dear all, > I have an OWL file which I read by using the jena API. > At the moment I read all the Classes ( model.listClasses() ) , the > Objectproperties (model.listObjectProperties() ) , the > Datatypeproperties (model.listDatatypeProperties() ) and the Individuals > (model.listIndividuals()).
[Probably just use of language but the "read" step is when you load the data into your Model. All those list* API calls are then queries onto that model, they aren't literally reading the file.] > But the OWL file contains also Individuals expressed in the form of > rdf:Description: > > Example: > <rdf:Description rdf:about="#7700574884352544358"> > <hasDataValue rdf:datatype="&xsd;string">Rachel Rath</hasDataValue> > </rdf:Description> > > How can I read these individuals? Depends what it is about those that identify them. You could use: listSubjectsWithProperty( EG.hasDataValue ) or (nearly equivalent) listStatements( null, EG.hasDataValue, (RDFNode)null) Alternatively if your ontology defines a domain for hasDataValue then you could turn on inference (OWLMicro) and those would then become identifiable as individuals. Dave
