[MOBY-guts] biomoby commit

Martin Senger senger at pub.open-bio.org
Sun Nov 20 12:30:52 UTC 2005


senger
Sun Nov 20 07:30:52 EST 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema
In directory pub.open-bio.org:/tmp/cvs-serv4966/src/main/org/biomoby/shared/schema

Modified Files:
	MElement.java 
Log Message:


moby-live/Java/src/main/org/biomoby/shared/schema MElement.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.java	2005/08/30 18:34:11	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/schema/MElement.java	2005/11/20 12:30:52	1.2
@@ -1,173 +1,173 @@
-/*
- * Created on Jun 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.biomoby.shared.schema;
-
-import java.util.Vector;
-
-/**
- * @author Eddie
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class MElement {
-	// enumeration of types
-	/**
-	 * A moby:String primitive type
-	 */
-	public static String STRING = "String";
-	/**
-	 * A moby:Integer primitive type
-	 */
-	public static String INTEGER = "Integer";
-	/**
-	 * A moby:Float primitive type
-	 */
-	public static String FLOAT = "Float";
-	/**
-	 * A moby:DateTime primitive type
-	 */
-	public static String DATA_TIME = "DataTime";
-	
-	/**
-	 * A moby data type that is not a primitive.
-	 */
-	public static String NON_PRIMITIVE = "NonPrimitiveType";
-	
-	private String name = "";
-	private String articleName = "";
-	private Vector hasaMElements = new Vector();
-	private Vector hasMElements = new Vector();;
-	private String description = "";
-	private String type = "";
-	
-	/**
-	 * Default constructor. Name, etc need to be set.
-	 */
-	public MElement() {
-	}
-	
-	public MElement(String name) {
-		this.name = name;
-	}
-	
-	public MElement(String name, String articleName) {
-		this.name = name;
-		this.articleName = articleName;
-	}
-	
-	public String getArticleName()
-	{
-		return this.articleName;
-	}	
-	public MElement(String name, String articleName, String description) {
-		this.name = name;
-		this.articleName = articleName;
-		this.description = description;
-	}
-	
-	
-	/**
-	 * @return Returns the description.
-	 */
-	public String getDescription() {
-		return description;
-	}
-	/**
-	 * @param description The description to set.
-	 */
-	public void setDescription(String description) {
-		this.description = description;
-	}
-	/**
-	 * @return Returns the name.
-	 */
-	public String getName() {
-		return name;
-	}
-	/**
-	 * @param name The name to set.
-	 */
-	public void setName(String name) {
-		this.name = name;
-	}
-	/**
-	 * @return Returns the type.
-	 */
-	public String getType() {
-		return type;
-	}
-	/**
-	 * @param type The type to set.
-	 */
-	public void setType(String type) {
-		this.type = type;
-	}
-	/**
-	 * @return Returns the hasaMElements.
-	 */
-	public Vector getHasaMElements() {
-		return hasaMElements;
-	}
-	/**
-	 * @return Returns the hasMElements.
-	 */
-	public Vector getHasMElements() {
-		return hasMElements;
-	}
-	
-	public boolean addHasMElement(MElement element) {
-		return hasMElements.add(element);
-	}
-	
-	public boolean addHasaMElement(MElement element) {
-		return hasaMElements.add(element);
-	}
-	
-	public static boolean isPrimitive(String object) {
-		if (object.equals(MElement.STRING))
-			return true;
-		if (object.equals(MElement.INTEGER))
-			return true;
-		if (object.equals(MElement.FLOAT))
-			return true;
-		if (object.equals(MElement.DATA_TIME))
-			return true;
-		return false;
-	}
-
-	/**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to
-	/*store MElement and articleNames;*/
-	public int hashCode()
-	{
-		return this.name.hashCode();
-	}
-
-	
-
-	public boolean equals(Object obj)
-	{
-		if(obj==null)
-		{
-			return false;
-		}
-
-		if(obj instanceof MElement)
-		{
-			MElement mk=(MElement)obj;
-
-			return (this.name).equalsIgnoreCase(mk.name);
-		}
-		return false;
-	}
-
-		
-	public String toString() {
-		return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n";
-}
-}
-
+/*
+ * Created on Jun 17, 2005
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.biomoby.shared.schema;
+
+import java.util.Vector;
+
+/**
+ * @author Eddie
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class MElement {
+	// enumeration of types
+	/**
+	 * A moby:String primitive type
+	 */
+	public static String STRING = "String";
+	/**
+	 * A moby:Integer primitive type
+	 */
+	public static String INTEGER = "Integer";
+	/**
+	 * A moby:Float primitive type
+	 */
+	public static String FLOAT = "Float";
+	/**
+	 * A moby:DateTime primitive type
+	 */
+	public static String DATA_TIME = "DataTime";
+	
+	/**
+	 * A moby data type that is not a primitive.
+	 */
+	public static String NON_PRIMITIVE = "NonPrimitiveType";
+	
+	private String name = "";
+	private String articleName = "";
+	private Vector hasaMElements = new Vector();
+	private Vector hasMElements = new Vector();;
+	private String description = "";
+	private String type = "";
+	
+	/**
+	 * Default constructor. Name, etc need to be set.
+	 */
+	public MElement() {
+	}
+	
+	public MElement(String name) {
+		this.name = name;
+	}
+	
+	public MElement(String name, String articleName) {
+		this.name = name;
+		this.articleName = articleName;
+	}
+	
+	public String getArticleName()
+	{
+		return this.articleName;
+	}	
+	public MElement(String name, String articleName, String description) {
+		this.name = name;
+		this.articleName = articleName;
+		this.description = description;
+	}
+	
+	
+	/**
+	 * @return Returns the description.
+	 */
+	public String getDescription() {
+		return description;
+	}
+	/**
+	 * @param description The description to set.
+	 */
+	public void setDescription(String description) {
+		this.description = description;
+	}
+	/**
+	 * @return Returns the name.
+	 */
+	public String getName() {
+		return name;
+	}
+	/**
+	 * @param name The name to set.
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+	/**
+	 * @return Returns the type.
+	 */
+	public String getType() {
+		return type;
+	}
+	/**
+	 * @param type The type to set.
+	 */
+	public void setType(String type) {
+		this.type = type;
+	}
+	/**
+	 * @return Returns the hasaMElements.
+	 */
+	public Vector getHasaMElements() {
+		return hasaMElements;
+	}
+	/**
+	 * @return Returns the hasMElements.
+	 */
+	public Vector getHasMElements() {
+		return hasMElements;
+	}
+	
+	public boolean addHasMElement(MElement element) {
+		return hasMElements.add(element);
+	}
+	
+	public boolean addHasaMElement(MElement element) {
+		return hasaMElements.add(element);
+	}
+	
+	public static boolean isPrimitive(String object) {
+		if (object.equals(MElement.STRING))
+			return true;
+		if (object.equals(MElement.INTEGER))
+			return true;
+		if (object.equals(MElement.FLOAT))
+			return true;
+		if (object.equals(MElement.DATA_TIME))
+			return true;
+		return false;
+	}
+
+	/**override the hashCode() and equals() method of Object; In MElementHashtable class, we will use a hashtable to
+	/*store MElement and articleNames;*/
+	public int hashCode()
+	{
+		return this.name.hashCode();
+	}
+
+	
+
+	public boolean equals(Object obj)
+	{
+		if(obj==null)
+		{
+			return false;
+		}
+
+		if(obj instanceof MElement)
+		{
+			MElement mk=(MElement)obj;
+
+			return (this.name).equalsIgnoreCase(mk.name);
+		}
+		return false;
+	}
+
+		
+	public String toString() {
+		return "\nBegin element**************************\n"+"Name: " + name +"\nArticleName: " + articleName + "\nDescription: " + description + "\nType: " + type+"\nHASA's:\n" + hasaMElements + "\nHAS's:\n" + hasMElements+"\nend the element++++++++\n\n";
+}
+}
+




More information about the MOBY-guts mailing list