perfsonar-dev - r180 - trunk/nmwg/java/org/ggf/ns/nmwg/topology/base/v3_0
Subject: perfsonar development work
List archive
- From:
- To: ,
- Subject: r180 - trunk/nmwg/java/org/ggf/ns/nmwg/topology/base/v3_0
- Date: Mon, 27 Nov 2006 09:14:25 -0500
Author: zurawski
Date: 2006-11-27 09:14:24 -0500 (Mon, 27 Nov 2006)
New Revision: 180
Modified:
trunk/nmwg/java/org/ggf/ns/nmwg/topology/base/v3_0/Node.java
Log:
Backwards compatibility for the node class, this addersses the issue of
no longer being able to access the 'city', 'institution', 'country',
'latitude', and 'longitude' elements directly in the node. In the
future they will be accessable through the 'location' element.
-jason
Modified: trunk/nmwg/java/org/ggf/ns/nmwg/topology/base/v3_0/Node.java
===================================================================
--- trunk/nmwg/java/org/ggf/ns/nmwg/topology/base/v3_0/Node.java
2006-11-08 23:09:37 UTC (rev 179)
+++ trunk/nmwg/java/org/ggf/ns/nmwg/topology/base/v3_0/Node.java
2006-11-27 14:14:24 UTC (rev 180)
@@ -78,7 +78,48 @@
*/
protected Name nameElement;
+
+
+
+/**
+ * Backwards compat w/ node classes
+ * <begin>
+ */
/**
+ *
+ */
+ protected Country countryElement;
+
+ /**
+ *
+ */
+ protected City cityElement;
+
+ /**
+ *
+ */
+ protected Longitude longitudeElement;
+
+ /**
+ *
+ */
+ protected Latitude latitudeElement;
+
+ /**
+ *
+ */
+ protected Institution institutionElement;
+
+/**
+ * </end>
+ * Backwards compat w/ node classes
+ */
+
+
+
+
+
+ /**
* attribute for nodeIdRef
*/
protected String nodeIdRef;
@@ -103,7 +144,19 @@
locationElement = null;
nameElement = null;
interfaceMap = new HashMap();
-
+
+/**
+ * <begin>
+ */
+ countryElement = null;
+ cityElement = null;
+ longitudeElement = null;
+ latitudeElement = null;
+ institutionElement = null;
+/**
+ * </end>
+ */
+
parent = null;
id = "";
completed = false;
@@ -255,7 +308,92 @@
nameElement = newNameElement;
}
+
+
+/**
+ * <begin>
+ */
+
/**
+ * Returns the country element.
+ */
+ public Country getCountryElement() {
+ return countryElement;
+ }
+
+ /**
+ * Sets the country element.
+ */
+ public void setCountryElement(Country newCountryElement) {
+ countryElement = newCountryElement;
+ }
+
+ /**
+ * Returns the city element.
+ */
+ public City getCityElement() {
+ return cityElement;
+ }
+
+ /**
+ * Sets the city element.
+ */
+ public void setCityElement(City newCityElement) {
+ cityElement = newCityElement;
+ }
+
+ /**
+ * Returns the longitude element.
+ */
+ public Longitude getLongitudeElement() {
+ return longitudeElement;
+ }
+
+ /**
+ * Sets the longitude element.
+ */
+ public void setLongitudeElement(Longitude newLongitudeElement) {
+ longitudeElement = newLongitudeElement;
+ }
+
+ /**
+ * Returns the latitude element.
+ */
+ public Latitude getLatitudeElement() {
+ return latitudeElement;
+ }
+
+ /**
+ * Sets the latitude element.
+ */
+ public void setLatitudeElement(Latitude newLatitudeElement) {
+ latitudeElement = newLatitudeElement;
+ }
+
+ /**
+ * Returns the institution element.
+ */
+ public Institution getInstitutionElement() {
+ return institutionElement;
+ }
+
+ /**
+ * Sets the institution element.
+ */
+ public void setInstitutionElement(Institution newInstitutionElement) {
+ institutionElement = newInstitutionElement;
+ }
+
+/**
+ * </end>
+ */
+
+
+
+
+
+
+ /**
* clear all Interface elements
*/
public void clearInterface() {
@@ -345,6 +483,21 @@
else if(newChild.getLocalName().equals("name")) {
setNameElement((Name)newChild);
}
+ else if(newChild.getLocalName().equals("country")) {
+ setCountryElement((Country)newChild);
+ }
+ else if(newChild.getLocalName().equals("city")) {
+ setCityElement((City)newChild);
+ }
+ else if(newChild.getLocalName().equals("longitude")) {
+ setLongitudeElement((Longitude)newChild);
+ }
+ else if(newChild.getLocalName().equals("latitude")) {
+ setLatitudeElement((Latitude)newChild);
+ }
+ else if(newChild.getLocalName().equals("institution")) {
+ setInstitutionElement((Institution)newChild);
+ }
else if(newChild.getLocalName().equals("interface")) {
setInterface((Interface)newChild);
}
@@ -479,6 +632,30 @@
handler = getNameElement().toXML(handler, nss);
}
+
+/**
+ * <begin>
+ */
+ if(getCountryElement() != null) {
+ handler = getCountryElement().toXML(handler, nss);
+ }
+ if(getCityElement() != null) {
+ handler = getCityElement().toXML(handler, nss);
+ }
+ if(getLongitudeElement() != null) {
+ handler = getLongitudeElement().toXML(handler, nss);
+ }
+ if(getLatitudeElement() != null) {
+ handler = getLatitudeElement().toXML(handler, nss);
+ }
+ if(getInstitutionElement() != null) {
+ handler = getInstitutionElement().toXML(handler, nss);
+ }
+/**
+ * </end>
+ */
+
+
return handler;
}
@@ -533,6 +710,30 @@
if(getNameElement() != null) {
getNameElement().getDOM(node);
}
+
+/**
+ * <begin>
+ */
+ if(getCountryElement() != null) {
+ getCountryElement().getDOM(node);
+ }
+ if(getCityElement() != null) {
+ getCityElement().getDOM(node);
+ }
+ if(getLongitudeElement() != null) {
+ getLongitudeElement().getDOM(node);
+ }
+ if(getLatitudeElement() != null) {
+ getLatitudeElement().getDOM(node);
+ }
+ if(getInstitutionElement() != null) {
+ getInstitutionElement().getDOM(node);
+ }
+/**
+ * </end>
+ */
+
+
}
/**
- r180 - trunk/nmwg/java/org/ggf/ns/nmwg/topology/base/v3_0, svnlog, 11/27/2006
Archive powered by MHonArc 2.6.16.