[MOBY-guts] biomoby commit
Eddie Kawas
kawas at pub.open-bio.org
Fri May 13 19:18:19 UTC 2005
kawas
Fri May 13 15:18:18 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources
In directory pub.open-bio.org:/tmp/cvs-serv2260/org/biomoby/client/ui/graphical/servlet/jresources
Modified Files:
RESOURCE.java
Log Message:
Fixed some import statements. Not sure really why I had to do this though!?!
Eddie
moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources RESOURCE.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/05/12 05:19:20 1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/servlet/jresources/RESOURCE.java 2005/05/13 19:18:18 1.4
@@ -17,6 +17,7 @@
import javax.servlet.http.HttpServletResponse;
import org.biomoby.client.CentralDigestImpl;
+import org.biomoby.client.CentralImpl;
import org.biomoby.client.rdf.vocabulary.MobyResources;
import org.biomoby.client.rdf.vocabulary.Predicates;
import org.biomoby.registry.definitions.types.JNamespaces;
@@ -25,13 +26,15 @@
import org.biomoby.registry.properties.MobyProperties;
import org.biomoby.shared.CentralDigest;
import org.biomoby.shared.MobyData;
-import org.biomoby.shared.data.MobyDataSecondaryInstance;
+import org.biomoby.shared.MobyDataType;
import org.biomoby.shared.MobyException;
import org.biomoby.shared.MobyNamespace;
import org.biomoby.shared.MobyPrimaryDataSet;
import org.biomoby.shared.MobyPrimaryDataSimple;
import org.biomoby.shared.MobySecondaryData;
import org.biomoby.shared.MobyService;
+import org.biomoby.shared.NoSuccessException;
+import org.biomoby.shared.data.MobyDataSecondaryInstance;
import org.w3c.rdf.model.ModelException;
import com.hp.hpl.jena.rdf.model.Bag;
@@ -663,6 +666,8 @@
// create the base object type "class"
Resource subject = _addClassResource(model, OBJ, "Object",
"a base object class consisting of a namespace and an identifier");
+ model.add(model.createStatement(subject, DC.publisher, model.createLiteral("www.illuminae.com", "en")));
+ model.add(model.createStatement(subject, DC.creator, model.createLiteral("markw at illuminae.com", "en")));
model.add(model.createStatement(subject, RDF.type, RDFS.Class));
for (int x = 0; x < objects.length; x++) {
String[] _line = objects[x].split("\t");
@@ -679,7 +684,17 @@
Matcher m;
if (obj.indexOf("(") >= 0)
obj = obj.substring(0, obj.indexOf("("));
+
Resource _subject = _addClassResource(model, OBJ, sub, def);
+ try {
+ //TODO make this an sql call
+ MobyDataType _datatype = new CentralImpl().getDataType(sub);
+ model.add(model.createStatement(subject, DC.publisher, model.createLiteral(_datatype.getAuthority(), "en")));
+ model.add(model.createStatement(subject, DC.creator, model.createLiteral( _datatype.getEmailContact(), "en")));
+ } catch (NoSuccessException e) {
+ // oh well, at least we tried
+ System.err.println(sub + " could not be augmented with its 'creator' or its 'publisher'. Oh well, at least we tried");
+ }
m = Pattern.compile(".*:isa$", Pattern.CASE_INSENSITIVE).matcher(
pred);
if (m.matches()) {
@@ -921,7 +936,7 @@
}
public static void main(String[] args) throws MobyException {
- System.out.println(new RESOURCE().getRESOURCES("Objects"));
+ System.out.println(new RESOURCE().getRESOURCES("ServiceInstances"));
}
}
More information about the MOBY-guts
mailing list