hafsi.amal
hafsi.amal

Reputation: 15

Create RDF File Using SOAF Ontology

With Apache Jena, we can generate FOAF file like this:

model.createResource("http://example.org/alice", FOAF.Person)
            .addProperty(FOAF.name, "Alice")
            .addProperty(FOAF.mbox, model.createResource("mailto:[email protected]"))
            .addProperty(FOAF.knows, model.createResource("http://example.org/bob"));

I want to generate a SOAF file (extension of FOAF).

Is there any method or API to do this?

Upvotes: 0

Views: 69

Answers (1)

AndyS
AndyS

Reputation: 16630

Jena has a utility "schemagen" that generates vocabulary files from RDFS. It is how FOAF.java is made. There is nothing special about vocabularies, they don't have to be installed specially in a particular package. Make a SOAF.java and compile it into your program or look at FOAF.java.

Upvotes: 1

Related Questions