Hi Arif,

On 10/12/15 09:19, M. Arif Wicaksana wrote:
Hi Dave,

thanks for your response.

I tried using RDFS_MEM. It gave me the classes, but I got the following
error for printing the properties:

Exception in thread "main" org.apache.jena.ontology.ProfileException:
Attempted to use language construct OBJECT_PROPERTY that is not supported
in the current language profile: RDFS

That's because RDFS doesn't have a notion of DatatypeProperty or ObjectProperty, just Property.

DAML has it's own thing so ...

I am not sure I understand about this:
"However, for interpreting all the DAML specific things like
daml:Restriction you will have to work at the RDF level and do this
yourself."
What does working at the RDF level mean? (I am sorry, still new in this
topic)

Well, for example. To list the DAML object properties you could do:

        final String DAML_NS = "http://www.daml.org/2001/03/daml+oil#";;
OntModel model = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM);
        model.read("http://www.daml.org/2001/01/gedcom/gedcom";);

Property damlObjectProperty = model.createProperty(DAML_NS, "ObjectProperty"); ResIterator i = model.listSubjectsWithProperty(RDF.type, damlObjectProperty);
        while (i.hasNext()) {
            System.out.println(" - " + i.next());
        }

which outputs:

 - http://www.daml.org/2001/01/gedcom/gedcom#childIn
 - http://www.daml.org/2001/01/gedcom/gedcom#birth
 - http://www.daml.org/2001/01/gedcom/gedcom#spouseIn
 - http://www.daml.org/2001/01/gedcom/gedcom#eventProperty
 - http://www.daml.org/2001/01/gedcom/gedcom#individualEventProperty
 - http://www.daml.org/2001/01/gedcom/gedcom#marriage
 - http://www.daml.org/2001/01/gedcom/gedcom#divorce
 - http://www.daml.org/2001/01/gedcom/gedcom#death
 - http://www.daml.org/2001/01/gedcom/gedcom#familyEventProperty

So you are working at the level of the RDF API - searching individual triples and triple patterns.

If DAML support is deprecated, does it mean that I cannot enrich the GEDCOM
ontology, and use it to do inference on a RDF file?

You can add more statements using Jena by adding the corresponding RDF triples but Jena doesn't support DAML inference.

Dave

Reply via email to