[MOBY-guts] biomoby commit
senger@ebi.ac.uk
senger at pub.open-bio.org
Fri Jun 20 11:06:22 UTC 2003
senger
Fri Jun 20 07:06:22 EDT 2003
Update of /home/repository/moby/moby-live/Java/org/biomoby/shared
In directory pub.open-bio.org:/tmp/cvs-serv16795/org/biomoby/shared
Modified Files:
Central.java MobyDataType.java
Log Message:
retrieveObjectDefinition added
moby-live/Java/org/biomoby/shared Central.java,1.4,1.5 MobyDataType.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/org/biomoby/shared/Central.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/org/biomoby/shared/Central.java 2003/06/12 10:00:22 1.4
+++ /home/repository/moby/moby-live/Java/org/biomoby/shared/Central.java 2003/06/20 11:06:22 1.5
@@ -91,12 +91,21 @@
throws MobyException;
/*************************************************************************
+ * Get definition of the given data type.
+ *<p>
+ * @throws MobyException if communication with the Moby Registry fails
+ * @throws NoSuccessException if 'dataTypeName' was not found
+ *************************************************************************/
+ MobyDataType getDataType (String dataTypeName)
+ throws MobyException, NoSuccessException;
+
+ /*************************************************************************
* Get XML Schema definition of the given data type.
*<p>
* @throws MobyException if communication with the Moby Registry fails
* @throws NoSuccessException if 'dataTypeName' was not found
*************************************************************************/
-// String getDataType (String dataTypeName)
+// String getDataTypeSchema (String dataTypeName)
// throws MobyException, NoSuccessException;
/*************************************************************************
===================================================================
RCS file: /home/repository/moby/moby-live/Java/org/biomoby/shared/MobyDataType.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/org/biomoby/shared/MobyDataType.java 2003/06/20 09:08:47 1.3
+++ /home/repository/moby/moby-live/Java/org/biomoby/shared/MobyDataType.java 2003/06/20 11:06:22 1.4
@@ -107,11 +107,10 @@
/**
* Describes what children this data type has (expressing ontology
* term HAS-A). The returned value is a hashtable with:
- * key is a name of a data type (an existing or a basic type)
- * value is a name of this child; note that this value may be
- * in some cases equal to the 'key' (this happens
- * especially for the basic data types - but we do not care)
- *
+ * <ul>
+ * <li> key is a (unique) name of this child a data type
+ * <li> value is a name of a data type representing this child
+ * </ul>
*/
public Hashtable getChildren() {
return children;
@@ -121,13 +120,14 @@
}
/**
* 'name' is a name given to this child (attribute)
- * 'typeName' is a name of a type represented byte this child
+ * 'typeName' is a name of a type represented by this child
*/
public void addChild (String name, String typeName) {
if (typeName != null) {
if (name == null || name.equals (""))
name = typeName;
- children.put (typeName, name);
+// children.put (typeName, name);
+ children.put (name, typeName);
}
}
@@ -148,7 +148,10 @@
buf.append ("Children:\n");
for (Enumeration en = children.keys(); en.hasMoreElements(); ) {
buf.append (Utils.format (null, 1));
- buf.append ((String)en.nextElement());
+ String key = (String)en.nextElement();
+ buf.append (key);
+ buf.append (" => ");
+ buf.append (children.get (key));
buf.append ("\n");
}
return new String (buf);
More information about the MOBY-guts
mailing list