[MOBY-guts] biomoby commit
Eddie Kawas
kawas at pub.open-bio.org
Fri Sep 30 14:52:55 UTC 2005
kawas
Fri Sep 30 10:52:54 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder
In directory pub.open-bio.org:/tmp/cvs-serv6613/org/biomoby/client/rdf/builder
Modified Files:
ServiceInstanceRDF.java
Log Message:
modified the lsid authority domain to be hard coded to biomoby.org
moby-live/Java/src/main/org/biomoby/client/rdf/builder ServiceInstanceRDF.java,1.7,1.8
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/08/29 20:22:32 1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/rdf/builder/ServiceInstanceRDF.java 2005/09/30 14:52:54 1.8
@@ -39,9 +39,14 @@
*/
/**
- * @author Eddie Kawas <p>This class was created to present a way to retrieve a
- * service instances' RDF using just a service name and authority. <p>For
- * questions, comments, or bugs <p>email me at edward.kawas at gmail.com
+ * @author Eddie Kawas
+ * <p>
+ * This class was created to present a way to retrieve a service
+ * instances' RDF using just a service name and authority.
+ * <p>
+ * For questions, comments, or bugs
+ * <p>
+ * email me at edward.kawas at gmail.com
*/
public class ServiceInstanceRDF {
@@ -79,10 +84,13 @@
/**
*
- * <b>PRE:</b>name is either a valid name or null<p> <b>POST:</b>If
- * authorURI is a valid authority, then a RDF containing all of the service
- * instances will be returned. If authorURI and name are valid then a single
- * RDF containing just the service instance identified by name is returned.<p>
+ * <b>PRE: </b>name is either a valid name or null
+ * <p>
+ * <b>POST: </b>If authorURI is a valid authority, then a RDF containing all
+ * of the service instances will be returned. If authorURI and name are
+ * valid then a single RDF containing just the service instance identified
+ * by name is returned.
+ * <p>
*
* @param authorURI -
* the authority to query
@@ -108,8 +116,11 @@
/**
*
* method that retrieves the RDF describing a specific service instance
- * based on the parameters domain, serviceName, url and uri. <p><b>PRE:</b>None.
- * <p><b>POST:</b>The RDF describing the service with parameters domain,
+ * based on the parameters domain, serviceName, url and uri.
+ * <p>
+ * <b>PRE: </b>None.
+ * <p>
+ * <b>POST: </b>The RDF describing the service with parameters domain,
* serviceName, url and uri is created.
*
* @param domain -
@@ -282,11 +293,23 @@
.getCategory(), "en"));
subject.addProperty(DC.source, model.createTypedLiteral(services[i]
.getURL()));
- subject.addProperty(DC.identifier, model
- .createTypedLiteral("urn:lsid:"
- + MobyProperties.SERVICE_INSTANCE_PROPERTIES().getProperty("lsid_authority") +":"
- + MobyProperties.SERVICE_INSTANCE_PROPERTIES().getProperty("lsid_namespace") +":"+ services[i].getAuthority()
- + "," + services[i].getName()));
+ subject
+ .addProperty(
+ DC.identifier,
+ model
+ .createTypedLiteral("urn:lsid:"
+ + "biomoby.org"
+ + ":"
+ + (MobyProperties
+ .SERVICE_INSTANCE_PROPERTIES()
+ .getProperty(
+ "lsid_namespace") == null ? "serviceinstance"
+ : MobyProperties
+ .SERVICE_INSTANCE_PROPERTIES()
+ .getProperty(
+ "lsid_namespace"))
+ + ":" + services[i].getAuthority()
+ + "," + services[i].getName()));
subject.addProperty(Predicates.performs_task, model
.createResource(SRV + services[i].getType()));
subject.addProperty(Predicates.SignatureURL, model
@@ -375,8 +398,7 @@
.getDefaultValue()));
_li.addProperty(Predicates.datatype, model
.createTypedLiteral(data.getDataType()));
- _li.addProperty(RDF.type,
- Predicates.Secondary);
+ _li.addProperty(RDF.type, Predicates.Secondary);
if (data.getDataType().equals("Integer")) {
_li
.addProperty(Predicates.min, model
@@ -476,7 +498,7 @@
return stream.getOutput();
}
-
+
/*
* convenience method that adds a resource to a model
*/
@@ -519,9 +541,12 @@
/**
*
- * <b>PRE:</b>None<p> <b>POST:</b>If a service instance exists such that
- * it has a name of name and an authoring URI of uri true is returned,
- * otherwise false is returned.<p>
+ * <b>PRE: </b>None
+ * <p>
+ * <b>POST: </b>If a service instance exists such that it has a name of name
+ * and an authoring URI of uri true is returned, otherwise false is
+ * returned.
+ * <p>
*
* @param uri -
* the authors uri
@@ -554,10 +579,13 @@
/**
*
- * Usage: ServiceInstanceRDF <i>authorityURI</i> <i>[serviceName]</i><p>
- * <b>authorityURI:</b> is the authortitys' domain to query<p>
- * <b>serviceName:</b>optional argument that identifies a specific service
- * instance<p>
+ * Usage: ServiceInstanceRDF <i>authorityURI </i> <i>[serviceName] </i>
+ * <p>
+ * <b>authorityURI: </b> is the authortitys' domain to query
+ * <p>
+ * <b>serviceName: </b>optional argument that identifies a specific service
+ * instance
+ * <p>
*
* @throws LSIDException
*/
@@ -588,4 +616,4 @@
public String getOutput() {
return sb.toString();
}
-}
+}
\ No newline at end of file
More information about the MOBY-guts
mailing list