Skip to Content.
Sympa Menu

perfsonar-dev - nmwg: r375 - in trunk/nmwg/java/org/ogf/schema/network/topology: base/v20070828 l3/v20070828

Subject: perfsonar development work

List archive

nmwg: r375 - in trunk/nmwg/java/org/ogf/schema/network/topology: base/v20070828 l3/v20070828


Chronological Thread 
  • From:
  • To: ,
  • Subject: nmwg: r375 - in trunk/nmwg/java/org/ogf/schema/network/topology: base/v20070828 l3/v20070828
  • Date: Tue, 14 Oct 2008 08:49:53 -0400

Author: mac
Date: 2008-10-14 08:49:53 -0400 (Tue, 14 Oct 2008)
New Revision: 375

Added:
trunk/nmwg/java/org/ogf/schema/network/topology/base/v20070828/Node.java
trunk/nmwg/java/org/ogf/schema/network/topology/l3/v20070828/Port.java
Modified:
trunk/nmwg/java/org/ogf/schema/network/topology/base/v20070828/Name.java
Log:
Updates to satisfy OWAMP registration request

Modified:
trunk/nmwg/java/org/ogf/schema/network/topology/base/v20070828/Name.java
===================================================================
--- trunk/nmwg/java/org/ogf/schema/network/topology/base/v20070828/Name.java
2008-09-16 20:44:55 UTC (rev 374)
+++ trunk/nmwg/java/org/ogf/schema/network/topology/base/v20070828/Name.java
2008-10-14 12:49:53 UTC (rev 375)
@@ -12,15 +12,21 @@
*/
package org.ogf.schema.network.topology.base.v20070828;

+import org.xml.sax.helpers.AttributesImpl;
+import org.xml.sax.helpers.NamespaceSupport;

+
public class Name extends org.ggf.ns.nmwg.topology.base.v3_0.Name {

- /**
+ private String value;
+
+ /**
* Constructor.
*/
public Name() {
name = "";
type = "";
+ value="";

parent = null;
id = "";
@@ -33,4 +39,103 @@
fileName =
"org/ogf/schema/network/topology/base/v20070828/Name.java";
}

+ /**
+ * Not used in this element.
+ */
+ public boolean addAttr(String attr, String value, NamespaceSupport nss) {
+ if(attr.equals("type")) {
+ setType(value);
+ }
+ else if (attr.equals("value")) {
+ setValue(value);
+ }
+ else if(attr.indexOf("xmlns") >= 0) {
+ if(attr.split(":").length == 1) {
+ if(nss.getURI("") == null) {
+ nss.declarePrefix("", value);
+ }
+ if((prefix.equals("")) && !(value.equals(uri))) {
+ uri = value;
+ }
+ }
+ else {
+ if(nss.getURI(attr.split(":")[1]) == null) {
+ nss.declarePrefix(attr.split(":")[1], value);
+ }
+ if((prefix.equals(attr.split(":")[1])) &&
!(value.equals(uri))) {
+ uri = value;
+ }
+ }
+ }
+ else {
+ super.addAttr(attr, value, nss);
+
+ }
+ return true;
+ }
+
+
+
+ public void setValue(String value) {
+
+ this.value=value;
+
+ }
+
+
+ public String getValue() {
+
+ return value;
+ }
+
+ /**
+ * Converts items into attributes for an xml tag.
+ */
+ public AttributesImpl getAttributes(NamespaceSupport nss) {
+ AttributesImpl atts = new AttributesImpl();
+
+ if(nss.getURI(getPrefix()) == null) {
+ nss.pushContext();
+ if(getPrefix().equals("")) {
+ atts.addAttribute(getUri(), "xmlns", "xmlns", "CDATA",
getUri());
+ }
+ else {
+ atts.addAttribute(getUri(), "xmlns:" + getPrefix(), "xmlns:"
+ getPrefix(), "CDATA", getUri());
+ }
+ nss.declarePrefix(getPrefix(), getUri());
+ setCompleted();
+ }
+
+ if(!(getType().equals(""))) {
+ atts.addAttribute(getUri(), "type", "type", "CDATA", getType());
+ }
+ if(!(getType().equals(""))) {
+ atts.addAttribute(getUri(), "value", "value", "CDATA",
getValue());
+ }
+ return atts;
+ }
+
+ /**
+ * Given a DOM element (a parent), construct
+ * the children elements.
+ */
+ public void getDOM(org.w3c.dom.Element parent) {
+ org.w3c.dom.Document doc = parent.getOwnerDocument();
+ if(!(getName().equals(""))) {
+ org.w3c.dom.Element name = doc.createElementNS(getUri(),
getQName());
+ parent.appendChild(name);
+ org.w3c.dom.Text nametext = doc.createTextNode(getName());
+ name.appendChild(nametext);
+
+ if(!(getType().equals(""))) {
+ name.setAttribute("type", getType());
+ }
+ if(!(getValue().equals(""))) {
+ name.setAttribute("value", getType());
+ }
+
+ }
+ }
+
+
}

Added:
trunk/nmwg/java/org/ogf/schema/network/topology/base/v20070828/Node.java


Property changes on:
trunk/nmwg/java/org/ogf/schema/network/topology/base/v20070828/Node.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native

Added: trunk/nmwg/java/org/ogf/schema/network/topology/l3/v20070828/Port.java


Property changes on:
trunk/nmwg/java/org/ogf/schema/network/topology/l3/v20070828/Port.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native



  • nmwg: r375 - in trunk/nmwg/java/org/ogf/schema/network/topology: base/v20070828 l3/v20070828, svnlog, 10/14/2008

Archive powered by MHonArc 2.6.16.

Top of Page