Author: bimargulies
Date: Wed Jan  7 14:10:40 2009
New Revision: 732530

URL: http://svn.apache.org/viewvc?rev=732530&view=rev
Log:
Remove the obsolete two-argument toString methods. These created XML, but not 
useful or valid XML, since they lacked the context to deal with ref= and the 
like.

Modified:
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContent.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentExtension.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentRestriction.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexType.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaEnumerationFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObject.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSequence.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContent.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleType.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeRestriction.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaTotalDigitsFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaWhiteSpaceFacet.java
    
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/FacetsTest.java

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContent.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContent.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContent.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContent.java
 Wed Jan  7 14:10:40 2009
@@ -58,25 +58,4 @@
     public void setMixed(boolean mixed) {
         this.mixed = mixed;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        xml += "<" + prefix + "complexContent>\n";
-
-        xml += content.toString(prefix, tab + 1);
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-        xml += "<" + prefix + "complexContent>\n";
-        return xml;
-    }
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentExtension.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentExtension.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentExtension.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentExtension.java
 Wed Jan  7 14:10:40 2009
@@ -77,27 +77,4 @@
     public void setParticle(XmlSchemaParticle particle) {
         this.particle = particle;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        xml += "<" + prefix + "extension>\n";
-
-        if (particle != null) {
-            xml += particle.toString(prefix, tab + 1);
-        }
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "</" + prefix + "extension>\n";
-        return xml;
-    }
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentRestriction.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentRestriction.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentRestriction.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexContentRestriction.java
 Wed Jan  7 14:10:40 2009
@@ -77,27 +77,4 @@
     public void setParticle(XmlSchemaParticle particle) {
         this.particle = particle;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        xml += "<" + prefix + "restriction>\n";
-
-        if (particle != null) {
-            xml += particle.toString(prefix, tab + 1);
-        }
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "</" + prefix + "restriction>\n";
-        return xml;
-    }
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexType.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexType.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexType.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaComplexType.java
 Wed Jan  7 14:10:40 2009
@@ -126,42 +126,6 @@
     public void setParticle(XmlSchemaParticle particle) {
         this.particle = particle;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        String typeName = !isAnonymous() ? getName() : "";
-
-        xml += "<" + prefix + "complexType name=\"" + typeName + "\">\n";
-
-        if (particle != null) {
-            xml += particle.toString(prefix, tab + 1);
-        }
-
-        if (contentModel != null) {
-            xml += contentModel.toString(prefix, tab + 1);
-        }
-
-        for (int i = 0; i < attributes.getCount(); i++) {
-            xml += attributes.getItem(i).toString(prefix, tab + 1);
-        }
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "</" + prefix + "complexType>\n";
-        return xml;
-    }
-
     /**
      * Return the QName of the base schema type, if any, as defined in the 
content model.
      */

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaElement.java
 Wed Jan  7 14:10:40 2009
@@ -170,61 +170,6 @@
         this.substitutionGroup = substitutionGroup;
     }
 
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "<" + prefix + "element ";
-
-        if (!isAnonymous()) {
-            xml += "name=\"" + getName() + "\" ";
-        }
-
-        if (schemaTypeName != null) {
-            xml += "type=\"" + schemaTypeName + "\"";
-        }
-
-        if (ref.getTargetQName() != null) {
-            xml += "ref=\"" + ref.getTargetQName() + "\" ";
-        }
-
-        if (getMinOccurs() != 1) {
-            xml += "minOccurs=\"" + getMinOccurs() + "\" ";
-        }
-
-        if (getMaxOccurs() != 1) {
-            xml += "maxOccurs=\"" + getMaxOccurs() + "\" ";
-        }
-
-        if (nillable) {
-            xml += "nillable=\"" + nillable + "\" ";
-        }
-
-        xml += ">\n";
-
-        if (constraints != null) {
-            xml += constraints.toString(prefix, tab + 1);
-        }
-
-        if (schemaType != null) {
-            xml += schemaType.toString(prefix, tab + 1);
-        }
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "</" + prefix + "element>\n";
-
-        return xml;
-    }
-
     public void setType(XmlSchemaType type) {
         this.schemaType = type;
     }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaEnumerationFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaEnumerationFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaEnumerationFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaEnumerationFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,20 +34,4 @@
     public XmlSchemaEnumerationFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<enumeration value=\"");
-        xml.append(super.getValue());
-        xml.append("\" ");
-
-        xml.append("fixed=\"");
-        xml.append(super.isFixed());
-        xml.append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFractionDigitsFacet.java
 Wed Jan  7 14:10:40 2009
@@ -35,20 +35,4 @@
     public XmlSchemaFractionDigitsFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<fractionDigits value=\"");
-        xml.append(super.getValue());
-        xml.append("\" ");
-
-        xml.append("fixed=\"");
-        xml.append(super.isFixed());
-        xml.append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaLengthFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,19 +34,4 @@
     public XmlSchemaLengthFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<length value=\"");
-        xml.append(super.getValue());
-        xml.append("\" ");
-        xml.append("fixed=\"");
-        xml.append(super.isFixed());
-        xml.append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxExclusiveFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,19 +34,4 @@
     public XmlSchemaMaxExclusiveFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<maxExclusive value=\"");
-        xml.append(super.getValue());
-        xml.append("\" ");
-        xml.append("fixed=\"");
-        xml.append(super.isFixed());
-        xml.append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxInclusiveFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,15 +34,4 @@
     public XmlSchemaMaxInclusiveFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<maxInclusive 
value=\"").append(super.getValue()).append("\" ");
-        xml.append("fixed=\"" + super.isFixed() + "\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMaxLengthFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,15 +34,4 @@
     public XmlSchemaMaxLengthFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<maxLength value=\"").append(super.getValue()).append("\" 
");
-        xml.append("fixed=\"" + super.isFixed() + "\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinExclusiveFacet.java
 Wed Jan  7 14:10:40 2009
@@ -35,14 +35,4 @@
         super(value, fixed);
     }
 
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<minExclusive 
value=\"").append((String)super.getValue()).append("\" ");
-        xml.append("fixed=\"" + super.isFixed() + "\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinInclusiveFacet.java
 Wed Jan  7 14:10:40 2009
@@ -35,14 +35,4 @@
         super(value, fixed);
     }
 
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<minInclusive 
value=\"").append(super.getValue()).append("\" ");
-        xml.append("fixed=\"" + super.isFixed() + "\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaMinLengthFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,15 +34,4 @@
     public XmlSchemaMinLengthFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<minLength value=\"").append(super.getValue()).append("\" 
");
-        xml.append("fixed=\"").append(super.isFixed()).append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObject.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObject.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObject.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObject.java
 Wed Jan  7 14:10:40 2009
@@ -133,14 +133,4 @@
     public void setSourceURI(String sourceURI) {
         this.sourceURI = sourceURI;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += this.getClass().toString() + "\n";
-        return xml;
-    }
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectCollection.java
 Wed Jan  7 14:10:40 2009
@@ -73,15 +73,4 @@
     public Iterator getIterator() {
         return objects.iterator();
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-
-        for (int i = 0; i < getCount(); i++) {
-            xml += getItem(i).toString(prefix, tab);
-        }
-
-        return xml;
-
-    }
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaPatternFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,15 +34,4 @@
     public XmlSchemaPatternFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<pattern value=\"").append(super.getValue()).append("\" ");
-        xml.append("fixed=\"").append(super.isFixed()).append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSequence.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSequence.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSequence.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSequence.java
 Wed Jan  7 14:10:40 2009
@@ -39,26 +39,4 @@
     public XmlSchemaObjectCollection getItems() {
         return items;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        xml += "<" + prefix + "sequence>\n";
-        for (int i = 0; i < items.getCount(); i++) {
-            xml += items.getItem(i).toString(prefix, tab + 1);
-        }
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "</" + prefix + "sequence>\n";
-        return xml;
-    }
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContent.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContent.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContent.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContent.java
 Wed Jan  7 14:10:40 2009
@@ -42,13 +42,4 @@
     public void setContent(XmlSchemaContent content) {
         this.content = content;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-        return xml;
-    }
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleType.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleType.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleType.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleType.java
 Wed Jan  7 14:10:40 2009
@@ -42,30 +42,4 @@
     public void setContent(XmlSchemaSimpleTypeContent content) {
         this.content = content;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        xml += "<" + prefix + "simpleType>\n";
-
-        if (content != null) {
-            xml += content.toString(prefix, tab + 1);
-        }
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "</" + prefix + "simpleType>\n";
-        return xml;
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeRestriction.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeRestriction.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeRestriction.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeRestriction.java
 Wed Jan  7 14:10:40 2009
@@ -58,36 +58,4 @@
     public XmlSchemaObjectCollection getFacets() {
         return this.facets;
     }
-
-    public String toString(String prefix, int tab) {
-        String xml = new String();
-
-        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
-            prefix += ":";
-        }
-
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-
-        xml += "<" + prefix + "restriction ";
-
-        if (baseTypeName != null) {
-            xml += "base =\"" + baseTypeName + "\">\n";
-        } else {
-            xml += ">\n";
-            // inline def
-            xml += baseType.toString(prefix, tab + 1);
-        }
-
-        xml += facets.toString(prefix, tab + 1);
-        for (int i = 0; i < tab; i++) {
-            xml += "\t";
-        }
-        xml += "</" + prefix + "restriction>\n";
-
-        return xml;
-
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaTotalDigitsFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaTotalDigitsFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaTotalDigitsFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaTotalDigitsFacet.java
 Wed Jan  7 14:10:40 2009
@@ -34,15 +34,4 @@
     public XmlSchemaTotalDigitsFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<totalDigits 
value=\"").append(super.getValue()).append("\" ");
-        xml.append("fixed=\"").append(super.isFixed()).append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaWhiteSpaceFacet.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaWhiteSpaceFacet.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaWhiteSpaceFacet.java
 (original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaWhiteSpaceFacet.java
 Wed Jan  7 14:10:40 2009
@@ -38,15 +38,4 @@
     public XmlSchemaWhiteSpaceFacet(Object value, boolean fixed) {
         super(value, fixed);
     }
-
-    public String toString(String prefix, int tab) {
-        StringBuffer xml = new StringBuffer();
-        for (int i = 0; i < tab; i++) {
-            xml.append("\t");
-        }
-        xml.append("<whiteSpace value=\"").append(super.getValue()).append("\" 
");
-        xml.append("fixed=\"").append(super.isFixed()).append("\"/>\n");
-        return xml.toString();
-    }
-
 }

Modified: 
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/FacetsTest.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/FacetsTest.java?rev=732530&r1=732529&r2=732530&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/FacetsTest.java 
(original)
+++ 
webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/FacetsTest.java 
Wed Jan  7 14:10:40 2009
@@ -94,17 +94,9 @@
             if (o instanceof XmlSchemaLengthFacet) {
                 assertEquals("5", ((XmlSchemaLengthFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaLengthFacet)o).isFixed());
-                String toStr = ((XmlSchemaLengthFacet)o).toString("xsd", 1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"length\", but did contain: " + toStr,
-                           toStr.indexOf("length value=\"5\"") != -1);
             } else if (o instanceof XmlSchemaPatternFacet) {
                 assertEquals("\\d{5}", ((XmlSchemaPatternFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaPatternFacet)o).isFixed());
-                String toStr = ((XmlSchemaPatternFacet)o).toString("xsd", 1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"pattern\", but did contain: " + toStr, toStr
-                    .indexOf("pattern value=\"\\d{5}\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -157,10 +149,6 @@
             if (o instanceof XmlSchemaPatternFacet) {
                 assertEquals("\\d{15}", ((XmlSchemaPatternFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaPatternFacet)o).isFixed());
-                String toStr = ((XmlSchemaPatternFacet)o).toString("xsd", 1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"pattern\", but did contain: " + toStr, toStr
-                    .indexOf("pattern value=\"\\d{15}\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -213,10 +201,6 @@
             if (o instanceof XmlSchemaTotalDigitsFacet) {
                 assertEquals("3", ((XmlSchemaTotalDigitsFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaTotalDigitsFacet)o).isFixed());
-                String toStr = ((XmlSchemaTotalDigitsFacet)o).toString("xsd", 
1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"totalDigits\", but did contain: " + toStr, 
toStr
-                    .indexOf("totalDigits value=\"3\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -271,17 +255,9 @@
             if (o instanceof XmlSchemaMaxInclusiveFacet) {
                 assertEquals("100", 
((XmlSchemaMaxInclusiveFacet)o).getValue());
                 assertEquals(true, ((XmlSchemaMaxInclusiveFacet)o).isFixed());
-                String toStr = ((XmlSchemaMaxInclusiveFacet)o).toString("xsd", 
1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"maxInclusive\", but did contain: " + toStr, 
toStr
-                    .indexOf("maxInclusive value=\"100\"") != -1);
             } else if (o instanceof XmlSchemaMinInclusiveFacet) {
                 assertEquals("0", ((XmlSchemaMinInclusiveFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaMinInclusiveFacet)o).isFixed());
-                String toStr = ((XmlSchemaMinInclusiveFacet)o).toString("xsd", 
1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"minInclusive\", but did contain: " + toStr, 
toStr
-                    .indexOf("minInclusive value=\"0\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -335,17 +311,9 @@
             if (o instanceof XmlSchemaMaxExclusiveFacet) {
                 assertEquals("200", 
((XmlSchemaMaxExclusiveFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaMaxExclusiveFacet)o).isFixed());
-                String toStr = ((XmlSchemaMaxExclusiveFacet)o).toString("xsd", 
1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"maxExclusive\", but did contain: " + toStr, 
toStr
-                    .indexOf("maxExclusive value=\"200\"") != -1);
             } else if (o instanceof XmlSchemaMinExclusiveFacet) {
                 assertEquals("1", ((XmlSchemaMinExclusiveFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaMinExclusiveFacet)o).isFixed());
-                String toStr = ((XmlSchemaMinExclusiveFacet)o).toString("xsd", 
1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"minExclusive\", but did contain: " + toStr, 
toStr
-                    .indexOf("minExclusive value=\"1\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -398,10 +366,6 @@
             if (o instanceof XmlSchemaWhiteSpaceFacet) {
                 assertEquals("collapse", 
((XmlSchemaWhiteSpaceFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaWhiteSpaceFacet)o).isFixed());
-                String toStr = ((XmlSchemaWhiteSpaceFacet)o).toString("xsd", 
1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"minExclusive\", but did contain: " + toStr, 
toStr
-                    .indexOf("whiteSpace value=\"collapse\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -455,17 +419,8 @@
             if (o instanceof XmlSchemaFractionDigitsFacet) {
                 assertEquals("2", 
((XmlSchemaFractionDigitsFacet)o).getValue());
                 assertEquals(false, 
((XmlSchemaFractionDigitsFacet)o).isFixed());
-                String toStr = 
((XmlSchemaFractionDigitsFacet)o).toString("xsd", 1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"fractionDigits\", but did contain: " + toStr, 
toStr
-                    .indexOf("fractionDigits value=\"2\"") != -1);
             } else if (o instanceof XmlSchemaTotalDigitsFacet) {
                 assertEquals("3", ((XmlSchemaTotalDigitsFacet)o).getValue());
-                assertEquals(false, ((XmlSchemaTotalDigitsFacet)o).isFixed());
-                String toStr = ((XmlSchemaTotalDigitsFacet)o).toString("xsd", 
1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"totalDigits\", but did contain: " + toStr, 
toStr
-                    .indexOf("totalDigits value=\"3\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -521,17 +476,9 @@
             if (o instanceof XmlSchemaMinLengthFacet) {
                 assertEquals("45", ((XmlSchemaMinLengthFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaMinLengthFacet)o).isFixed());
-                String toStr = ((XmlSchemaMinLengthFacet)o).toString("xsd", 1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"minExclusive\", but did contain: " + toStr, 
toStr
-                    .indexOf("minLength value=\"45\"") != -1);
             } else if (o instanceof XmlSchemaMaxLengthFacet) {
                 assertEquals("205", ((XmlSchemaMaxLengthFacet)o).getValue());
                 assertEquals(false, ((XmlSchemaMaxLengthFacet)o).isFixed());
-                String toStr = ((XmlSchemaMaxLengthFacet)o).toString("xsd", 1);
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"maxLength\", but did contain: " + toStr, toStr
-                    .indexOf("maxLength value=\"205\"") != -1);
             } else {
                 fail("Unexpected object encountered: " + 
o.getClass().getName());
             }
@@ -586,18 +533,7 @@
             String value = (String)xsef.getValue();
             assertTrue("Atempted to remove an enumeration with the value of " 
+ "\"" + value
                        + "\", but the value was not in the set.", 
s.remove(value));
-            String toStr = xsef.toString("xsd", 1);
-            if ("Field".equals(value)) {
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"enumeration\", but did contain: " + toStr, 
toStr
-                    .indexOf("enumeration value=\"Field\"") != -1);
-            } else if ("Separator".equals(value)) {
-                assertTrue("The toString(String, int) method did not contain "
-                           + "\"enumeration\", but did contain: " + toStr, 
toStr
-                    .indexOf("enumeration value=\"Separator\"") != -1);
-            }
         }
-
         assertTrue("The set should have been empty, but instead contained: " + 
s + ".", s.isEmpty());
 
     }


Reply via email to