Commits

Anonymous committed 4534747

First committ? Hope it works!!!

Comments (0)

Files changed (2)

semsci-experiment/pom.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>gigadot.semsci</groupId>
+        <artifactId>semsci-pom</artifactId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+    <groupId>gigadot.semsci</groupId>
+    <artifactId>semsci-experiment</artifactId>
+    <version>0.1-SNAPSHOT</version>
+    <name>SemSci Experiment</name>
+    <url>http://maven.apache.org</url>
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.8.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.hp.hpl.jena</groupId>
+            <artifactId>jena</artifactId>
+            <version>2.6.3</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j</artifactId>
+                    <groupId>log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+</project>

semsci-experiment/src/main/java/gigadot/semsci/experiment/RRDatabaseSemantics.java

+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package gigadot.semsci.experiment;
+
+import com.hp.hpl.jena.rdf.model.Property;
+import com.hp.hpl.jena.rdf.model.Resource;
+import com.hp.hpl.jena.rdf.model.ResourceFactory;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.UUID;
+
+/**
+ *
+ * @author rebecca
+ */
+public class RRDatabaseSemantics {
+    
+    //NOTE: I am doing this in the same way as Weerapong, hopefully ...
+
+    //Namespace definitions
+    public static final String RR_SCHEMA_NS = "http://www.rrdatabase.org/rdf-namespace#";
+    public static final String RRData_NS = "http://www.rrdatabase.org/Data#";
+    public static final String RRDict_NS = "http://www.rrdatabase.org/Dict#";
+    public static final String RRData_SCHEMA_NS = "http://www.rrdatabase.org/Data/rdf-schema#";
+    public static final String RRDataPrRDF_SCHEMA_NS = "http://www.rrdatabase.org/pr-rdf-schema#";
+    public static final String RRDataAXIOM_NS = "http://rrisbrilliant.com/allhailrr#";
+    public static final String XSD_NS = "http://www.w3.org/2001/XMLSchema#";
+    public static final String RDF_NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+
+
+    public static final Resource RRResource(String local) {
+        return ResourceFactory.createResource(RRData_SCHEMA_NS + local);
+    }
+
+    public static final Property RRProperty(String local) {
+        return ResourceFactory.createProperty(RRData_NS, local);
+    }
+
+    public static final Resource RRrdfResource(String local) {
+        return ResourceFactory.createResource(RRData_NS + local);
+    }
+
+    public static final Property RRrdfProperty(String local) {
+        return ResourceFactory.createProperty(RRData_NS, local);
+    }
+
+    public static final Resource PrResource(String local) {
+        return ResourceFactory.createResource(RRDataPrRDF_SCHEMA_NS + local);
+    }
+
+    public static final Property PrProperty(String local) {
+        return ResourceFactory.createProperty(RRDataPrRDF_SCHEMA_NS, local);
+    }
+
+    public static final Resource axiomResource(String local) {
+        return ResourceFactory.createResource(RRDataAXIOM_NS + local);
+    }
+
+    public static final Property axiomProperty(String local) {
+        return ResourceFactory.createProperty(RRDataAXIOM_NS, local);
+    }
+
+    /*
+     * List of resources.
+     */
+    public static final Resource RRProperty = RRrdfResource("Property");
+    public static final Resource RRExperiment = PrResource("Experiment");
+    public static final Resource RRData = PrResource("Data");
+    public static final Resource RRShockTube = PrResource("ShockTube");
+    public static final Resource RRReflectedShock = PrResource("ReflectedShock");
+    /*
+     * List of properties.
+     */
+    public static final Property RRrdfData = RRrdfProperty("Data");
+    public static final Property RRrdfDataLabel = RRrdfProperty("dataLabel");
+    public static final Property RRrdfExperData = RRrdfProperty("experimentData");
+    public static final Property RRrdfDataFile = RRrdfProperty("experimentDataFile");
+    public static final Property RRrdfDataPoints = RRrdfProperty("DataPoints");
+    public static final Property RRrdfHasComponent = RRrdfProperty("hasComponent");
+    public static final Property RRrdfSpeciesName = RRrdfProperty("hasSpeciesName");
+    public static final Property RRrdfHasUnits = RRrdfProperty("hasUnits");
+    public static final Property RRrdfHasLabel = RRrdfProperty("hasLabel");
+    public static final Property RRrdfInitCondition = RRrdfProperty("initialCondition");
+    public static final Property RRrdfHasInitialisation = RRrdfProperty("hasInitialisation");
+    public static final Property RRrdfHasInitData = RRrdfProperty("hasInitialData");
+
+	public static String createUUIDURI() {
+		try {
+			return new URI("uri", "uuid:" + UUID.randomUUID().toString(), null)
+					.toString();
+		} catch (URISyntaxException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+}