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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -19,10 +19,10 @@ package org.apache.ws.commons.schema; -import org.apache.ws.commons.schema.constants.Constants; - import javax.xml.namespace.QName; +import org.apache.ws.commons.schema.constants.Constants; + /** * Class for elements. Represents the World Wide Web Consortium (W3C) element element. */ @@ -61,8 +61,8 @@ * the attribute. The default is Unqualified. */ XmlSchemaForm form; - boolean isAbstract; - boolean isNillable; + boolean abstractElement; + boolean nillable; String name; QName qualifiedName; QName refName; @@ -88,8 +88,8 @@ */ public XmlSchemaElement() { constraints = new XmlSchemaObjectCollection(); - isAbstract = false; - isNillable = false; + abstractElement = false; + nillable = false; form = new XmlSchemaForm(XmlSchemaForm.NONE); finalDerivation = new XmlSchemaDerivationMethod(Constants.BlockConstants.NONE); block = new XmlSchemaDerivationMethod(Constants.BlockConstants.NONE); @@ -122,8 +122,8 @@ return finalDerivation; } - public void setFinal(XmlSchemaDerivationMethod finalDerivation) { - this.finalDerivation = finalDerivation; + public void setFinal(XmlSchemaDerivationMethod finalDerivationValue) { + this.finalDerivation = finalDerivationValue; } public XmlSchemaDerivationMethod getBlockResolved() { @@ -151,19 +151,19 @@ } public boolean isAbstract() { - return isAbstract; + return abstractElement; } public void setAbstract(boolean isAbstract) { - this.isAbstract = isAbstract; + this.abstractElement = isAbstract; } public boolean isNillable() { - return isNillable; + return nillable; } public void setNillable(boolean isNillable) { - this.isNillable = isNillable; + this.nillable = isNillable; } public String getName() { @@ -186,8 +186,8 @@ return qualifiedName; } - public void setQName(QName qualifiedName) { - this.qualifiedName = qualifiedName; + public void setQName(QName qname) { + this.qualifiedName = qname; } public XmlSchemaType getSchemaType() { @@ -217,7 +217,7 @@ public String toString(String prefix, int tab) { String xml = new String(); - if (!prefix.equals("") && prefix.indexOf(":") == -1) { + if (!"".equals(prefix) && prefix.indexOf(":") == -1) { prefix += ":"; } @@ -227,7 +227,7 @@ xml += "<" + prefix + "element "; - if (!name.equals("")) { + if (!"".equals(name)) { xml += "name=\"" + name + "\" "; } @@ -247,18 +247,18 @@ xml += "maxOccurs=\"" + maxOccurs + "\" "; } - if (isNillable) { - xml += "nillable=\"" + isNillable + "\" "; + if (nillable) { + xml += "nillable=\"" + nillable + "\" "; } xml += ">\n"; if (constraints != null) { - xml += constraints.toString(prefix, (tab + 1)); + xml += constraints.toString(prefix, tab + 1); } if (schemaType != null) { - xml += schemaType.toString(prefix, (tab + 1)); + xml += schemaType.toString(prefix, tab + 1); } for (int i = 0; i < tab; i++) { xml += "\t";
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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaException.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaException.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaException.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaException.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -25,9 +25,6 @@ public class XmlSchemaException extends RuntimeException { - /** - * - */ private static final long serialVersionUID = 1L; /** Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaExternal.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -25,28 +25,28 @@ public abstract class XmlSchemaExternal extends XmlSchemaAnnotated { + XmlSchema schema; + + String schemaLocation; + /** * Creates new XmlSchemaExternal */ protected XmlSchemaExternal() { } - XmlSchema schema; - public XmlSchema getSchema() { return schema; } - public void setSchema(XmlSchema schema) { - this.schema = schema; - } - - String schemaLocation; - public String getSchemaLocation() { return schemaLocation; } + public void setSchema(XmlSchema schema) { + this.schema = schema; + } + public void setSchemaLocation(String schemaLocation) { this.schemaLocation = schemaLocation; } Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaFacet.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -27,6 +27,10 @@ public abstract class XmlSchemaFacet extends XmlSchemaAnnotated { + boolean fixed; + + Object value; + /** * Creates new XmlSchemaFacet */ @@ -39,26 +43,6 @@ this.fixed = fixed; } - boolean fixed; - - Object value; - - public boolean isFixed() { - return fixed; - } - - public void setFixed(boolean fixed) { - this.fixed = fixed; - } - - public Object getValue() { - return value; - } - - public void setValue(Object value) { - this.value = value; - } - public static XmlSchemaFacet construct(Element el) { String name = el.getLocalName(); boolean fixed = false; @@ -66,29 +50,29 @@ fixed = true; } XmlSchemaFacet facet; - if (name.equals("enumeration")) { + if ("enumeration".equals(name)) { facet = new XmlSchemaEnumerationFacet(); - } else if (name.equals("fractionDigits")) { + } else if ("fractionDigits".equals(name)) { facet = new XmlSchemaFractionDigitsFacet(); - } else if (name.equals("length")) { + } else if ("length".equals(name)) { facet = new XmlSchemaLengthFacet(); - } else if (name.equals("maxExclusive")) { + } else if ("maxExclusive".equals(name)) { facet = new XmlSchemaMaxExclusiveFacet(); - } else if (name.equals("maxInclusive")) { + } else if ("maxInclusive".equals(name)) { facet = new XmlSchemaMaxInclusiveFacet(); - } else if (name.equals("maxLength")) { + } else if ("maxLength".equals(name)) { facet = new XmlSchemaMaxLengthFacet(); - } else if (name.equals("minLength")) { + } else if ("minLength".equals(name)) { facet = new XmlSchemaMinLengthFacet(); - } else if (name.equals("minExclusive")) { + } else if ("minExclusive".equals(name)) { facet = new XmlSchemaMinExclusiveFacet(); - } else if (name.equals("minInclusive")) { + } else if ("minInclusive".equals(name)) { facet = new XmlSchemaMinInclusiveFacet(); - } else if (name.equals("pattern")) { + } else if ("pattern".equals(name)) { facet = new XmlSchemaPatternFacet(); - } else if (name.equals("totalDigits")) { + } else if ("totalDigits".equals(name)) { facet = new XmlSchemaTotalDigitsFacet(); - } else if (name.equals("whiteSpace")) { + } else if ("whiteSpace".equals(name)) { facet = new XmlSchemaWhiteSpaceFacet(); } else { throw new XmlSchemaException("Incorrect facet with name \"" + name + "\" found."); @@ -100,4 +84,20 @@ facet.setValue(el.getAttribute("value")); return facet; } + + public Object getValue() { + return value; + } + + public boolean isFixed() { + return fixed; + } + + public void setFixed(boolean fixed) { + this.fixed = fixed; + } + + public void setValue(Object value) { + this.value = value; + } } Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaForm.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaForm.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaForm.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaForm.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -27,9 +27,9 @@ public class XmlSchemaForm extends Enum { + public static final String NONE = "none"; public static final String QUALIFIED = "qualified"; public static final String UNQUALIFIED = "unqualified"; - public static final String NONE = "none"; static String[] members = new String[] { NONE, QUALIFIED, UNQUALIFIED 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroup.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroup.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroup.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroup.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -29,27 +29,27 @@ public class XmlSchemaGroup extends XmlSchemaAnnotated { + QName name; + + XmlSchemaGroupBase particle; /** * Creates new XmlSchemaGroup */ public XmlSchemaGroup() { } - QName name; - XmlSchemaGroupBase particle; - public QName getName() { return name; } - public void setName(QName name) { - this.name = name; - } - public XmlSchemaGroupBase getParticle() { return particle; } + public void setName(QName name) { + this.name = name; + } + public void setParticle(XmlSchemaGroupBase particle) { this.particle = particle; } Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupBase.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupBase.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupBase.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupBase.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupRef.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupRef.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupRef.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaGroupRef.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -28,20 +28,20 @@ public class XmlSchemaGroupRef extends XmlSchemaParticle { + XmlSchemaGroupBase particle; + + QName refName; + /** * Creates new XmlSchemaGroupRef */ public XmlSchemaGroupRef() { } - XmlSchemaGroupBase particle; - public XmlSchemaGroupBase getParticle() { return this.particle; } - QName refName; - public QName getRefName() { return this.refName; } Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaIdentityConstraint.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -25,6 +25,12 @@ public class XmlSchemaIdentityConstraint extends XmlSchemaAnnotated { + XmlSchemaObjectCollection fields; + + String name; + + XmlSchemaXPath selector; + /** * Creates new XmlSchemaIdentityConstraint */ @@ -32,28 +38,22 @@ fields = new XmlSchemaObjectCollection(); } - XmlSchemaObjectCollection fields; - public XmlSchemaObjectCollection getFields() { return fields; } - String name; - public String getName() { return name; } - public void setName(String name) { - this.name = name; - } - - XmlSchemaXPath selector; - public XmlSchemaXPath getSelector() { return selector; } + public void setName(String name) { + this.name = name; + } + public void setSelector(XmlSchemaXPath selector) { this.selector = selector; } Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaImport.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -26,6 +26,8 @@ public class XmlSchemaImport extends XmlSchemaExternal { + String namespace; + /** * Creates new XmlSchemaImport */ @@ -33,8 +35,6 @@ super(); } - String namespace; - public String getNamespace() { return this.namespace; } Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaInclude.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKey.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKey.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKey.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKey.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKeyref.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKeyref.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKeyref.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaKeyref.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -27,14 +27,14 @@ public class XmlSchemaKeyref extends XmlSchemaIdentityConstraint { + QName refer; + /** * Creates new XmlSchemaKeyref */ public XmlSchemaKeyref() { } - QName refer; - public QName getRefer() { return refer; } 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNotation.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNotation.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNotation.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNotation.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -27,7 +27,9 @@ public class XmlSchemaNotation extends XmlSchemaAnnotated { - String name, system, publicNotation; + String name; + String system; + String publicNotation; /** * Creates new XmlSchemaNotation @@ -39,7 +41,7 @@ return name; } - public void setString(String name) { + public void setName(String name) { this.name = name; } @@ -47,8 +49,8 @@ return publicNotation; } - public void setPublic(String publicNotation) { - this.publicNotation = publicNotation; + public void setPublic(String isPublic) { + this.publicNotation = isPublic; } public String getSystem() { Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaNumericFacet.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -31,22 +31,12 @@ * a map for holding meta information Initially set to null to gain some improvement in memory. will be * initialized only if a user attempts */ - private Map metaInfoMap = null; + private Map<Object, Object> metaInfoMap; /** - * returns the metainfo map. may be null if not utilized - */ - public Map getMetaInfoMap() { - return metaInfoMap; - } - - /** - * Directly set the meta info map into the schema element - * - * @param metaInfoMap + * Creates new XmlSchemaObject */ - public void setMetaInfoMap(Map metaInfoMap) { - this.metaInfoMap = metaInfoMap; + protected XmlSchemaObject() { } /** @@ -57,42 +47,13 @@ */ public void addMetaInfo(Object key, Object value) { if (metaInfoMap == null) { - metaInfoMap = new LinkedHashMap(); + metaInfoMap = new LinkedHashMap<Object, Object>(); } metaInfoMap.put(key, value); } - /** - * Creates new XmlSchemaObject - */ - protected XmlSchemaObject() { - } - - public int getLineNumber() { - return lineNumber; - } - - public void setLineNumber(int lineNumber) { - this.lineNumber = lineNumber; - } - - public int getLinePosition() { - return linePosition; - } - - public void setLinePosition(int linePosition) { - this.linePosition = linePosition; - } - - public String getSourceURI() { - return sourceURI; - } - - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - + @Override public boolean equals(Object what) { if (what == this) { return true; @@ -125,6 +86,51 @@ return true; } + + @Override + public int hashCode() { + return super.hashCode(); + } + + public int getLineNumber() { + return lineNumber; + } + + public int getLinePosition() { + return linePosition; + } + + /** + * returns the metainfo map. may be null if not utilized + */ + public Map<Object, Object> getMetaInfoMap() { + return metaInfoMap; + } + + public String getSourceURI() { + return sourceURI; + } + + public void setLineNumber(int lineNumber) { + this.lineNumber = lineNumber; + } + + public void setLinePosition(int linePosition) { + this.linePosition = linePosition; + } + + /** + * Directly set the meta info map into the schema element + * + * @param metaInfoMap + */ + public void setMetaInfoMap(Map<Object, Object> metaInfoMap) { + this.metaInfoMap = metaInfoMap; + } + + public void setSourceURI(String sourceURI) { + this.sourceURI = sourceURI; + } public String toString(String prefix, int tab) { String xml = new String(); 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -19,21 +19,23 @@ package org.apache.ws.commons.schema; +import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; -import java.util.Vector; +import java.util.List; /** * An object collection class to handle XmlSchemaObjects when collections are returned from method calls. */ public class XmlSchemaObjectCollection { - Vector objects; + List<XmlSchemaObject> objects; /** * Creates new XmlSchemaObjectCollection */ public XmlSchemaObjectCollection() { - objects = new Vector(); + objects = Collections.synchronizedList(new ArrayList<XmlSchemaObject>()); } public int getCount() { @@ -41,15 +43,15 @@ } public XmlSchemaObject getItem(int i) { - return (XmlSchemaObject)objects.elementAt(i); + return (XmlSchemaObject)objects.get(i); } public void setItem(int i, XmlSchemaObject item) { - objects.insertElementAt(item, i); + objects.add(i, item); } public void add(XmlSchemaObject item) { - objects.addElement(item); + objects.add(item); } public boolean contains(XmlSchemaObject item) { @@ -65,7 +67,7 @@ } public void removeAt(int index) { - objects.removeElementAt(index); + objects.remove(index); } public Iterator getIterator() { Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectEnumerator.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectTable.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectTable.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectTable.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaObjectTable.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -19,9 +19,11 @@ package org.apache.ws.commons.schema; -import javax.xml.namespace.QName; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; + +import javax.xml.namespace.QName; /** * A collection class that provides read-only helpers for XmlSchemaObject objects. This class is used to @@ -31,13 +33,13 @@ public class XmlSchemaObjectTable { - HashMap collection; + Map<QName, XmlSchemaObject> collection; /** * Creates new XmlSchemaObjectTable */ public XmlSchemaObjectTable() { - this.collection = new HashMap(); + this.collection = new HashMap<QName, XmlSchemaObject>(); } public int getCount() { Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaParticle.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaParticle.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaParticle.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaParticle.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java?rev=727246&r1=727245&r2=727246&view=diff ============================================================================== --- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java (original) +++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaRedefine.java Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -27,6 +27,12 @@ public class XmlSchemaRedefine extends XmlSchemaExternal { + XmlSchemaObjectTable attributeGroups; + XmlSchemaObjectTable groups; + XmlSchemaObjectTable schemaTypes; + + XmlSchemaObjectCollection items; + /** * Creates new XmlSchemaRedefine */ @@ -37,8 +43,6 @@ attributeGroups = new XmlSchemaObjectTable(); } - XmlSchemaObjectTable attributeGroups, groups, schemaTypes; - public XmlSchemaObjectTable getAttributeGroup() { return attributeGroups; } @@ -47,8 +51,6 @@ return groups; } - XmlSchemaObjectCollection items; - public XmlSchemaObjectCollection getItems() { return items; } 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=727246&r1=727245&r2=727246&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 Tue Dec 16 18:39:50 2008 @@ -1,4 +1,4 @@ -/* +/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -45,13 +45,13 @@ for (int i = 0; i < tab; i++) { xml += "\t"; } - if (!prefix.equals("") && prefix.indexOf(":") == -1) { + 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)); + xml += items.getItem(i).toString(prefix, tab + 1); } for (int i = 0; i < tab; i++) {