Commit 2c52dd40 authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

la til hjelpeklasser

parent 0cec7f75
package com.nesstar.rdf;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.ResourceFactory;
/**
* @author Ole Voldsæter
*/
public class FoafVocab {
static final String FOAF_NAMESPACE = "http://xmlns.com/foaf/0.1/";
static final Resource Agent = ResourceFactory.createResource(FOAF_NAMESPACE + "Agent");
static final Resource Person = ResourceFactory.createResource(FOAF_NAMESPACE + "Person");
static final Property mbox = ResourceFactory.createProperty(FOAF_NAMESPACE, "mbox");
static final Property phone = ResourceFactory.createProperty(FOAF_NAMESPACE, "phone");
}
......@@ -15,8 +15,6 @@ import java.util.List;
* @author Ole Voldsæter
*/
public class Main {
private static final String FOAF_NAMESPACE = "http://xmlns.com/foaf/0.1/";
private static final String ORG_NAMESPACE = "http://www.w3.org/ns/org#";
private Model model;
private List<String[]> records;
......@@ -31,8 +29,8 @@ public class Main {
}
private Main doStuff() {
model.setNsPrefix("foaf", FOAF_NAMESPACE);
model.setNsPrefix("org", ORG_NAMESPACE);
model.setNsPrefix("foaf", FoafVocab.FOAF_NAMESPACE);
model.setNsPrefix("org", OrgVocab.ORG_NAMESPACE);
// todo: build a model
......
package com.nesstar.rdf;
import com.hp.hpl.jena.rdf.model.Property;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.rdf.model.ResourceFactory;
/**
* @author Ole Voldsæter
*/
public class OrgVocab {
static final String ORG_NAMESPACE = "http://www.w3.org/ns/org#";
static final Resource FormalOrganization = ResourceFactory.createResource(ORG_NAMESPACE + "FormalOrganization");
static final Resource OrganizationalUnit = ResourceFactory.createResource(ORG_NAMESPACE + "OrganizationalUnit");
static final Resource Membership = ResourceFactory.createResource(ORG_NAMESPACE + "Membership");
static final Resource Role = ResourceFactory.createResource(ORG_NAMESPACE + "Role");
static final Property unitOf = ResourceFactory.createProperty(ORG_NAMESPACE, "unitOf");
static final Property hasMembership = ResourceFactory.createProperty(ORG_NAMESPACE, "hasMembership");
static final Property organization = ResourceFactory.createProperty(ORG_NAMESPACE, "organization");
static final Property memberDuring = ResourceFactory.createProperty(ORG_NAMESPACE, "memberDuring");
static final Property role = ResourceFactory.createProperty(ORG_NAMESPACE, "role");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment