[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Tue Nov 8 00:34:25 UTC 2005
senger
Mon Nov 7 19:34:25 EST 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory pub.open-bio.org:/tmp/cvs-serv25267/src/main/org/biomoby/client
Modified Files:
CentralImpl.java
Log Message:
moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.32,1.33
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/08 00:34:25 1.33
@@ -1151,8 +1151,7 @@
/*************************************************************************
*
*************************************************************************/
- public void registerDataType (MobyDataType dataType)
- throws MobyException, NoSuccessException, PendingCurationException {
+ public String getRegisterDataTypeXML (MobyDataType dataType) {
// build the ISA tag (expressing hierarchy of data types)
String[] names = dataType.getParentNames();
@@ -1184,23 +1183,31 @@
}
}
+ return
+ "<registerObjectClass>" +
+ "<objectType>" + dataType.getName() + "</objectType>" +
+ "<Description><![CDATA[" + dataType.getDescription() + "]]>" +
+ "</Description>" +
+ "<Relationship relationshipType=\"ISA\">" + new String (buf) +
+ "</Relationship>" +
+ "<Relationship relationshipType=\"HASA\">" + new String (buf2) +
+ "</Relationship>" +
+ "<Relationship relationshipType=\"HAS\">" + new String (buf3) +
+ "</Relationship>" +
+ "<authURI>" + dataType.getAuthority() + "</authURI>" +
+ "<contactEmail>" + dataType.getEmailContact() + "</contactEmail>" +
+ "</registerObjectClass>";
+ }
+
+ /*************************************************************************
+ *
+ *************************************************************************/
+ public void registerDataType (MobyDataType dataType)
+ throws MobyException, NoSuccessException, PendingCurationException {
+
String result =
(String)doCall ("registerObjectClass",
- new Object[] {
- "<registerObjectClass>" +
- "<objectType>" + dataType.getName() + "</objectType>" +
- "<Description><![CDATA[" + dataType.getDescription() + "]]>" +
- "</Description>" +
- "<Relationship relationshipType=\"ISA\">" + new String (buf) +
- "</Relationship>" +
- "<Relationship relationshipType=\"HASA\">" + new String (buf2) +
- "</Relationship>" +
- "<Relationship relationshipType=\"HAS\">" + new String (buf3) +
- "</Relationship>" +
- "<authURI>" + dataType.getAuthority() + "</authURI>" +
- "<contactEmail>" + dataType.getEmailContact() + "</contactEmail>" +
- "</registerObjectClass>"
- });
+ new Object[] { getRegisterDataTypeXML (dataType) });
dataType.setId (checkRegistration (result, dataType)[0]);
}
@@ -1222,8 +1229,7 @@
/*************************************************************************
*
*************************************************************************/
- public void registerServiceType (MobyServiceType serviceType)
- throws MobyException, NoSuccessException, PendingCurationException {
+ public String getRegisterServiceTypeXML (MobyServiceType serviceType) {
// build the ISA tag (expressing hierarchy of service types)
String[] names = serviceType.getParentNames();
@@ -1235,35 +1241,30 @@
buf.append ("\n");
}
+ return
+ "<registerServiceType>" +
+ "<serviceType>" + serviceType.getName() + "</serviceType>" +
+ "<contactEmail>" + serviceType.getEmailContact() + "</contactEmail>" +
+ "<authURI>" + serviceType.getAuthority() + "</authURI>" +
+ "<Description><![CDATA[" + serviceType.getDescription() + "]]>" +
+ "</Description>" +
+ "<Relationship relationshipType=\"ISA\">" + new String (buf) +
+ "</Relationship>" +
+ "</registerServiceType>";
+ }
+
+ /*************************************************************************
+ *
+ *************************************************************************/
+ public void registerServiceType (MobyServiceType serviceType)
+ throws MobyException, NoSuccessException, PendingCurationException {
+
String result =
(String)doCall ("registerServiceType",
- new Object[] {
- "<registerServiceType>" +
- "<serviceType>" + serviceType.getName() + "</serviceType>" +
- "<contactEmail>" + serviceType.getEmailContact() + "</contactEmail>" +
- "<authURI>" + serviceType.getAuthority() + "</authURI>" +
- "<Description><![CDATA[" + serviceType.getDescription() + "]]>" +
- "</Description>" +
- "<Relationship relationshipType=\"ISA\">" + new String (buf) +
- "</Relationship>" +
- "</registerServiceType>"
- });
+ new Object[] { getRegisterServiceTypeXML (serviceType) });
serviceType.setId (checkRegistration (result, serviceType)[0]);
}
-// <registerServiceType>
-// <serviceType>NewServiceType</serviceType>
-// <contactEmail>your_name at contact.address.com</contactEmail>
-// <authURI>Your.URI.here</authURI>
-// <Description>
-// <![CDATA[ human description of service type here]]>
-// </Description>
-// <Relationship relationshipType="RelationshipOntologyTerm">
-// <serviceType>ExistingServiceType</serviceType>
-// <serviceType>ExistingServiceType</serviceType>
-// </Relationship>
-// </registerServiceType>
-
/*************************************************************************
*
*************************************************************************/
@@ -1282,19 +1283,25 @@
/*************************************************************************
*
*************************************************************************/
+ public String getRegisterNamespaceXML (MobyNamespace namespace) {
+ return
+ "<registerNamespace>" +
+ "<namespaceType>" + namespace.getName() + "</namespaceType>" +
+ "<contactEmail>" + namespace.getEmailContact() + "</contactEmail>" +
+ "<authURI>" + namespace.getAuthority() + "</authURI>" +
+ "<Description><![CDATA[" + namespace.getDescription() + "]]>" +
+ "</Description>" +
+ "</registerNamespace>";
+ }
+
+ /*************************************************************************
+ *
+ *************************************************************************/
public void registerNamespace (MobyNamespace namespace)
throws MobyException, NoSuccessException, PendingCurationException {
String result =
(String)doCall ("registerNamespace",
- new Object[] {
- "<registerNamespace>" +
- "<namespaceType>" + namespace.getName() + "</namespaceType>" +
- "<contactEmail>" + namespace.getEmailContact() + "</contactEmail>" +
- "<authURI>" + namespace.getAuthority() + "</authURI>" +
- "<Description><![CDATA[" + namespace.getDescription() + "]]>" +
- "</Description>" +
- "</registerNamespace>"
- });
+ new Object[] { getRegisterNamespaceXML (namespace) });
namespace.setId (checkRegistration (result, namespace)[0]);
}
More information about the MOBY-guts
mailing list