[MOBY-guts] biomoby commit
Gary Schiltz
gss at pub.open-bio.org
Thu Nov 3 22:31:00 UTC 2005
gss
Thu Nov 3 17:31:00 EST 2005
Update of /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph
In directory pub.open-bio.org:/tmp/cvs-serv22135/src/org/semanticmoby/graph
Modified Files:
MOBYResource.java
Log Message:
Added inputURI, outputURI
s-moby/ref-impl/core/src/org/semanticmoby/graph MOBYResource.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/10/31 17:24:54 1.4
+++ /home/repository/moby/s-moby/ref-impl/core/src/org/semanticmoby/graph/MOBYResource.java 2005/11/03 22:31:00 1.5
@@ -24,18 +24,30 @@
private Statement nameStmt;
/**
- * A one line description of the provider; stored in the
+ * A one line description of the resource; stored in the
* MOBY.oneLineDescription property
*/
private Statement oneLineDescriptionStmt;
/**
* A URI at which more information can be retrieved about the
- * provider; stored in the MOBY.moreInfoURI property
+ * resource; stored in the MOBY.moreInfoURI property
*/
private Statement aboutURIStmt;
/**
+ * A URI that can be accessed to get a page for an end user to fill in
+ * information for this resource; stored in the MOBY.inputURI property
+ */
+ private Statement inputURIStmt;
+
+ /**
+ * A URI that can be accessed to display this resource; stored in the
+ * MOBY.outputURI property
+ */
+ private Statement outputURIStmt;
+
+ /**
* The MOBYGraphNode objects that this Resource operates on (instances of
* either MOBYCollection or MOBYGraph), each keyed by the statement that
* links this resource's URI to it via a hasMapping property
@@ -92,13 +104,21 @@
* Constructor for creating an instance from existing RDF statements, as
* is the case when parsing an existing model.
*/
- MOBYResource(Model jenaModel, Statement definingStmt,
- Statement nameStmt, Statement oneLineDescriptionStmt,
- Statement aboutURIStmt, Map operatesOnGraphs) {
+ MOBYResource(Model jenaModel,
+ Statement definingStmt,
+ Statement nameStmt,
+ Statement oneLineDescriptionStmt,
+ Statement aboutURIStmt,
+ Statement inputURIStmt,
+ Statement outputURIStmt,
+ Map operatesOnGraphs) {
super(jenaModel, definingStmt);
+
this.nameStmt = nameStmt;
this.oneLineDescriptionStmt = oneLineDescriptionStmt;
this.aboutURIStmt = aboutURIStmt;
+ this.inputURIStmt = inputURIStmt;
+ this.outputURIStmt = outputURIStmt;
for (Iterator it = operatesOnGraphs.keySet().iterator(); it.hasNext();) {
Statement operatesOnStmt = (Statement) it.next();
@@ -191,7 +211,9 @@
* Return a descriptive name for the provider.
*/
public String getName() {
- return (nameStmt == null) ? "" : nameStmt.getObject().toString();
+ return (nameStmt == null)
+ ? null
+ : nameStmt.getObject().toString();
}
/**
@@ -199,7 +221,7 @@
*/
public String getOneLineDescription() {
return (oneLineDescriptionStmt == null)
- ? ""
+ ? null
: oneLineDescriptionStmt.getObject().toString();
}
@@ -209,11 +231,30 @@
*/
public String getAboutURI() {
return (aboutURIStmt == null)
- ? ""
+ ? null
: aboutURIStmt.getObject().toString();
}
/**
+ * Return a URI that can be accessed to get a page for an end user
+ * to fill in information for this resource
+ */
+ public String getInputURI() {
+ return (inputURIStmt == null)
+ ? null
+ : inputURIStmt.getObject().toString();
+ }
+
+ /**
+ * Return a URI that can be accessed to display this resource
+ */
+ public String getOutputURI() {
+ return (outputURIStmt == null)
+ ? null
+ : outputURIStmt.getObject().toString();
+ }
+
+ /**
* Serialize the underlying model as RDF/XML to the given output stream
*/
public void serialize(OutputStream out) {
More information about the MOBY-guts
mailing list