import java.util.*;
-//import org.biojava.dasobert.das2.io.DasSourceWriter;
-//import org.biojava.dasobert.das2.io.DasSourceWriterImpl;
-//import org.biojava.utils.xml.PrettyXMLWriter;
+// import org.biojava.dasobert.das2.io.DasSourceWriter;
+// import org.biojava.dasobert.das2.io.DasSourceWriterImpl;
+// import org.biojava.utils.xml.PrettyXMLWriter;
-
-/** a simple Bean class to be returned via SOAP
+/**
+ * a simple Bean class to be returned via SOAP
+ *
* @author Andreas Prlic
*/
-public class Das1Source
- implements DasSource
+public class Das1Source implements DasSource
{
String url;
+
protected String nickname;
+
String adminemail;
+
String description;
+
DasCoordinateSystem[] coordinateSystem;
+
String[] capabilities;
+
String[] labels;
+
String helperurl;
+
Date registerDate;
+
Date leaseDate;
+
String id;
+
boolean local;
+
Map properties;
+
boolean alertAdmin;
public static String EMPTY_ID = "UNK:-1";
url = "";
adminemail = "";
description = "";
- //String empty = "" ;
+ // String empty = "" ;
nickname = "";
coordinateSystem = new DasCoordinateSystem[0];
- //coordinateSystem[0] = new DasCoordinateSystem();
+ // coordinateSystem[0] = new DasCoordinateSystem();
capabilities = new String[0];
labels = new String[0];
- //capabilities[0] = empty ;
+ // capabilities[0] = empty ;
registerDate = new Date();
leaseDate = new Date();
helperurl = "";
public boolean equals(DasSource other)
{
System.out.println("Das1Source equals, comparing with other DasSource");
- if (! (other instanceof Das1Source))
+ if (!(other instanceof Das1Source))
{
return false;
}
return h;
}
- /** the DAS2 string representation of this DAS source
- *
- public String toString() {
-
- StringWriter writer = new StringWriter();
-
- PrintWriter pw = new PrintWriter(writer);
- PrettyXMLWriter xw = new PrettyXMLWriter(pw);
-
- DasSourceWriter dswriter = new DasSourceWriterImpl();
- try {
- dswriter.writeDasSource(xw,this);
- } catch (IOException e){
- e.printStackTrace();
- }
-
- return writer.toString();
-
- }
+ /**
+ * the DAS2 string representation of this DAS source
+ *
+ * public String toString() {
+ *
+ * StringWriter writer = new StringWriter();
+ *
+ * PrintWriter pw = new PrintWriter(writer); PrettyXMLWriter xw = new
+ * PrettyXMLWriter(pw);
+ *
+ * DasSourceWriter dswriter = new DasSourceWriterImpl(); try {
+ * dswriter.writeDasSource(xw,this); } catch (IOException e){
+ * e.printStackTrace(); }
+ *
+ * return writer.toString();
+ * }
*/
public void setLocal(boolean flag)
{
id = i;
}
- /** get a the Id of the DasSource. The Id is a unique db
- * identifier. The public DAS-Registry has Auto_Ids that look like
- * DASSOURCE:12345; public look like XYZ:12345, where the XYZ
- * prefix can be configured in the config file.
+ /**
+ * get a the Id of the DasSource. The Id is a unique db identifier. The public
+ * DAS-Registry has Auto_Ids that look like DASSOURCE:12345; public look like
+ * XYZ:12345, where the XYZ prefix can be configured in the config file.
*/
public String getId()
{
{
return capabilities;
}
- /** test if a this source has a particular capability
- *
- * @param testCapability
- * @return <code>true</code> if the server has this capability.
- */
- public boolean hasCapability(String testCapability){
- for (int i=0 ; i< capabilities.length;i++){
- String cap = capabilities[i];
- if ( cap.equals(testCapability))
- return true;
- }
- return false;
+
+ /**
+ * test if a this source has a particular capability
+ *
+ * @param testCapability
+ * @return <code>true</code> if the server has this capability.
+ */
+ public boolean hasCapability(String testCapability)
+ {
+ for (int i = 0; i < capabilities.length; i++)
+ {
+ String cap = capabilities[i];
+ if (cap.equals(testCapability))
+ return true;
}
+ return false;
+ }
public DasCoordinateSystem[] getCoordinateSystem()
{
public boolean getAlertAdmin()
{
return alertAdmin;
- }
- public Map getProperties() {
- return properties;
- }
- public void setProperties(Map properties) {
- this.properties = properties;
- }
+ }
+
+ public Map getProperties()
+ {
+ return properties;
+ }
+
+ public void setProperties(Map properties)
+ {
+ this.properties = properties;
+ }
}