You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by bi...@apache.org on 2008/12/17 03:39:54 UTC

svn commit: r727246 [6/8] - in /webservices/commons/trunk/modules/XmlSchema: ./ etc/ etc/eclipse/ src/main/java/org/apache/ws/commons/schema/ src/main/java/org/apache/ws/commons/schema/constants/ src/main/java/org/apache/ws/commons/schema/extensions/ s...

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=727246&r1=727245&r2=727246&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 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,8 @@
  */
 
 public class XmlSchemaSimpleContent extends XmlSchemaContentModel {
+    /* One of XmlSchemaSimpleContentRestriction or XmlSchemaSimpleContentExtension. */
+    XmlSchemaContent content;
 
     /**
      * Creates new XmlSchemaSimpleContent
@@ -32,8 +34,6 @@
     public XmlSchemaSimpleContent() {
     }
 
-    /* One of XmlSchemaSimpleContentRestriction or XmlSchemaSimpleContentExtension. */
-    XmlSchemaContent content;
 
     public XmlSchemaContent getContent() {
         return this.content;
@@ -46,7 +46,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 += ":";
         }
         return xml;

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentExtension.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentExtension.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentExtension.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentExtension.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,6 +28,18 @@
 
 public class XmlSchemaSimpleContentExtension extends XmlSchemaContent {
 
+    /* Allows an XmlSchemaAnyAttribute to be used for the attribute value. */
+    XmlSchemaAnyAttribute anyAttribute;
+
+    /*
+     * Contains XmlSchemaAttribute and XmlSchemaAttributeGroupRef. Collection of attributes for the simple
+     * type.
+     */
+    XmlSchemaObjectCollection attributes;
+
+    /* Name of the built-in data type, simple type, or complex type. */
+    QName baseTypeName;
+
     /**
      * Creates new XmlSchemaSimpleContentExtension
      */
@@ -36,36 +48,24 @@
 
     }
 
-    /* Allows an XmlSchemaAnyAttribute to be used for the attribute value. */
-    XmlSchemaAnyAttribute anyAttribute;
-
-    public void setAnyAttribute(XmlSchemaAnyAttribute anyAttribute) {
-        this.anyAttribute = anyAttribute;
-    }
-
     public XmlSchemaAnyAttribute getAnyAttribute() {
         return this.anyAttribute;
     }
 
-    /*
-     * Contains XmlSchemaAttribute and XmlSchemaAttributeGroupRef. Collection of attributes for the simple
-     * type.
-     */
-    XmlSchemaObjectCollection attributes;
-
     public XmlSchemaObjectCollection getAttributes() {
         return this.attributes;
     }
 
-    /* Name of the built-in data type, simple type, or complex type. */
-    QName baseTypeName;
+    public QName getBaseTypeName() {
+        return this.baseTypeName;
+    }
 
-    public void setBaseTypeName(QName baseTypeName) {
-        this.baseTypeName = baseTypeName;
+    public void setAnyAttribute(XmlSchemaAnyAttribute anyAttribute) {
+        this.anyAttribute = anyAttribute;
     }
 
-    public QName getBaseTypeName() {
-        return this.baseTypeName;
+    public void setBaseTypeName(QName baseTypeName) {
+        this.baseTypeName = baseTypeName;
     }
 
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentRestriction.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentRestriction.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentRestriction.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleContentRestriction.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,6 +28,23 @@
  */
 
 public class XmlSchemaSimpleContentRestriction extends XmlSchemaContent {
+    XmlSchemaAnyAttribute anyAttribute;
+    /*
+     * Contains XmlSchemaAttribute and XmlSchemaAttributeGroupRef. Collection of attributes for the simple
+     * type.
+     */
+    XmlSchemaObjectCollection attributes;
+
+    /* Derived from the type specified by the base value. */
+    XmlSchemaSimpleType baseType;
+
+    /* Name of the built-in data type, simple type, or complex type. */
+    QName baseTypeName;
+
+
+    /* One or more of the facet classes: */
+    XmlSchemaObjectCollection facets;
+
 
     /**
      * Creates new XmlSchemaSimpleContentRestriction
@@ -38,7 +55,6 @@
     }
 
     /* Allows an XmlSchemaAnyAttribute to be used for the attribute value. */
-    XmlSchemaAnyAttribute anyAttribute;
 
     public void setAnyAttribute(XmlSchemaAnyAttribute anyAttribute) {
         this.anyAttribute = anyAttribute;
@@ -48,19 +64,12 @@
         return this.anyAttribute;
     }
 
-    /*
-     * Contains XmlSchemaAttribute and XmlSchemaAttributeGroupRef. Collection of attributes for the simple
-     * type.
-     */
-    XmlSchemaObjectCollection attributes;
+
 
     public XmlSchemaObjectCollection getAttributes() {
         return this.attributes;
     }
 
-    /* Derived from the type specified by the base value. */
-    XmlSchemaSimpleType baseType;
-
     public void setBaseType(XmlSchemaSimpleType baseType) {
         this.baseType = baseType;
     }
@@ -68,10 +77,6 @@
     public XmlSchemaSimpleType getBaseType() {
         return this.baseType;
     }
-
-    /* Name of the built-in data type, simple type, or complex type. */
-    QName baseTypeName;
-
     public void setBaseTypeName(QName baseTypeName) {
         this.baseTypeName = baseTypeName;
     }
@@ -80,9 +85,6 @@
         return this.baseTypeName;
     }
 
-    /* One or more of the facet classes: */
-    XmlSchemaObjectCollection facets;
-
     public XmlSchemaObjectCollection getFacets() {
         return this.facets;
     }

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=727246&r1=727245&r2=727246&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 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
@@ -50,14 +50,14 @@
             xml += "\t";
         }
 
-        if (!prefix.equals("") && prefix.indexOf(":") == -1) {
+        if (!"".equals(prefix) && prefix.indexOf(":") == -1) {
             prefix += ":";
         }
 
         xml += "<" + prefix + "simpleType>\n";
 
         if (content != null) {
-            xml += content.toString(prefix, (tab + 1));
+            xml += content.toString(prefix, tab + 1);
         }
 
         for (int i = 0; i < tab; i++) {

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeContent.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeContent.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeContent.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeContent.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/XmlSchemaSimpleTypeList.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeList.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeList.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeList.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,9 @@
  * data type. Represents the World Wide Web Consortium (W3C) list element.
  */
 public class XmlSchemaSimpleTypeList extends XmlSchemaSimpleTypeContent {
+    XmlSchemaSimpleType itemType;
+    QName itemTypeName;
+
 
     /**
      * Creates new XmlSchemaSimpleTypeList
@@ -33,7 +36,6 @@
     public XmlSchemaSimpleTypeList() {
     }
 
-    XmlSchemaSimpleType itemType;
 
     public XmlSchemaSimpleType getItemType() {
         return this.itemType;
@@ -43,8 +45,6 @@
         this.itemType = itemType;
     }
 
-    QName itemTypeName;
-
     public QName getItemTypeName() {
         return this.itemTypeName;
     }

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=727246&r1=727245&r2=727246&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 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,9 @@
  */
 
 public class XmlSchemaSimpleTypeRestriction extends XmlSchemaSimpleTypeContent {
+    XmlSchemaSimpleType baseType;
+    QName baseTypeName;
+    XmlSchemaObjectCollection facets;
 
     /**
      * Creates new XmlSchemaSimpleTypeRestriction
@@ -35,7 +38,6 @@
         facets = new XmlSchemaObjectCollection();
     }
 
-    XmlSchemaSimpleType baseType;
 
     public XmlSchemaSimpleType getBaseType() {
         return this.baseType;
@@ -45,8 +47,6 @@
         this.baseType = baseType;
     }
 
-    QName baseTypeName;
-
     public QName getBaseTypeName() {
         return this.baseTypeName;
     }
@@ -55,8 +55,6 @@
         this.baseTypeName = baseTypeName;
     }
 
-    XmlSchemaObjectCollection facets;// = new XmlSchemaObjectCollection();
-
     public XmlSchemaObjectCollection getFacets() {
         return this.facets;
     }
@@ -64,7 +62,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 += ":";
         }
 
@@ -79,10 +77,10 @@
         } else {
             xml += ">\n";
             // inline def
-            xml += baseType.toString(prefix, (tab + 1));
+            xml += baseType.toString(prefix, tab + 1);
         }
 
-        xml += facets.toString(prefix, (tab + 1));
+        xml += facets.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/XmlSchemaSimpleTypeUnion.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeUnion.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeUnion.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaSimpleTypeUnion.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/XmlSchemaTotalDigitsFacet.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaTotalDigitsFacet.java?rev=727246&r1=727245&r2=727246&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 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/XmlSchemaType.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaType.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaType.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaType.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,9 @@
 
 package org.apache.ws.commons.schema;
 
+import javax.xml.namespace.QName;
 import org.apache.ws.commons.schema.constants.Constants;
 
-import javax.xml.namespace.QName;
 
 /**
  * The base class for all simple types and complex types.
@@ -31,7 +31,9 @@
 
     Object baseSchemaType;
     XmlSchemaDatatype dataType;
-    XmlSchemaDerivationMethod deriveBy, finalDerivation, finalResolved;
+    XmlSchemaDerivationMethod deriveBy;
+    XmlSchemaDerivationMethod finalDerivation;
+    XmlSchemaDerivationMethod finalResolved;
     boolean isMixed;
 
     // name of the type
@@ -79,8 +81,8 @@
         return finalDerivation;
     }
 
-    public void setFinal(XmlSchemaDerivationMethod finalDerivation) {
-        this.finalDerivation = finalDerivation;
+    public void setFinal(XmlSchemaDerivationMethod finalDerivationValue) {
+        this.finalDerivation = finalDerivationValue;
     }
 
     public XmlSchemaDerivationMethod getFinalResolved() {
@@ -91,8 +93,8 @@
         return isMixed;
     }
 
-    public void setMixed(boolean isMixed) {
-        this.isMixed = isMixed;
+    public void setMixed(boolean isMixedValue) {
+        this.isMixed = isMixedValue;
     }
 
     public String getName() {

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaUnique.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaUnique.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaUnique.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaUnique.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/XmlSchemaUse.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaUse.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaUse.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaUse.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/XmlSchemaWhiteSpaceFacet.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaWhiteSpaceFacet.java?rev=727246&r1=727245&r2=727246&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 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/XmlSchemaXPath.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaXPath.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaXPath.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaXPath.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,7 @@
  */
 
 public class XmlSchemaXPath extends XmlSchemaAnnotated {
+    String xpath;
 
     /**
      * Creates new XmlSchemaXPath
@@ -32,13 +33,12 @@
     public XmlSchemaXPath() {
     }
 
-    String xpath;
 
     public String getXPath() {
         return xpath;
     }
 
-    public void setXPath(String xpath) {
-        this.xpath = xpath;
+    public void setXPath(String xpathString) {
+        this.xpath = xpathString;
     }
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSeverityType.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSeverityType.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSeverityType.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSeverityType.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/XmlTokenizedType.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlTokenizedType.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlTokenizedType.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlTokenizedType.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/constants/Constants.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/constants/Constants.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/constants/Constants.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/constants/Constants.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
@@ -24,121 +24,133 @@
 /**
  * Constants
  */
-public class Constants {
-    public static final String XMLNS_URI = "http://www.w3.org/XML/1998/namespace";
-
-    public static final String XMLNS_PREFIX = "xml";
-
-    //
-    // Schema Namespaces
-    //
-    public static final String URI_2001_SCHEMA_XSD = "http://www.w3.org/2001/XMLSchema";
-    public static final String URI_2001_SCHEMA_XSI = "http://www.w3.org/2001/XMLSchema-instance";
-
-    // Define qnames for the all of the XSD and SOAP-ENC encodings
-    public static final QName XSD_STRING = new QName(URI_2001_SCHEMA_XSD, "string");
-    public static final QName XSD_BOOLEAN = new QName(URI_2001_SCHEMA_XSD, "boolean");
-    public static final QName XSD_DOUBLE = new QName(URI_2001_SCHEMA_XSD, "double");
-    public static final QName XSD_FLOAT = new QName(URI_2001_SCHEMA_XSD, "float");
-    public static final QName XSD_INT = new QName(URI_2001_SCHEMA_XSD, "int");
-    public static final QName XSD_INTEGER = new QName(URI_2001_SCHEMA_XSD, "integer");
-    public static final QName XSD_LONG = new QName(URI_2001_SCHEMA_XSD, "long");
-    public static final QName XSD_SHORT = new QName(URI_2001_SCHEMA_XSD, "short");
-    public static final QName XSD_BYTE = new QName(URI_2001_SCHEMA_XSD, "byte");
-    public static final QName XSD_DECIMAL = new QName(URI_2001_SCHEMA_XSD, "decimal");
-    public static final QName XSD_BASE64 = new QName(URI_2001_SCHEMA_XSD, "base64Binary");
-    public static final QName XSD_HEXBIN = new QName(URI_2001_SCHEMA_XSD, "hexBinary");
-    public static final QName XSD_ANYSIMPLETYPE = new QName(URI_2001_SCHEMA_XSD, "anySimpleType");
-    public static final QName XSD_ANYTYPE = new QName(URI_2001_SCHEMA_XSD, "anyType");
-    public static final QName XSD_ANY = new QName(URI_2001_SCHEMA_XSD, "any");
-    public static final QName XSD_QNAME = new QName(URI_2001_SCHEMA_XSD, "QName");
-    public static final QName XSD_DATETIME = new QName(URI_2001_SCHEMA_XSD, "dateTime");
-    public static final QName XSD_DATE = new QName(URI_2001_SCHEMA_XSD, "date");
-    public static final QName XSD_TIME = new QName(URI_2001_SCHEMA_XSD, "time");
-
-    public static final QName XSD_NORMALIZEDSTRING = new QName(URI_2001_SCHEMA_XSD, "normalizedString");
-    public static final QName XSD_TOKEN = new QName(URI_2001_SCHEMA_XSD, "token");
-
-    public static final QName XSD_UNSIGNEDLONG = new QName(URI_2001_SCHEMA_XSD, "unsignedLong");
-    public static final QName XSD_UNSIGNEDINT = new QName(URI_2001_SCHEMA_XSD, "unsignedInt");
-    public static final QName XSD_UNSIGNEDSHORT = new QName(URI_2001_SCHEMA_XSD, "unsignedShort");
-    public static final QName XSD_UNSIGNEDBYTE = new QName(URI_2001_SCHEMA_XSD, "unsignedByte");
-    public static final QName XSD_POSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "positiveInteger");
-    public static final QName XSD_NEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "negativeInteger");
-    public static final QName XSD_NONNEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonNegativeInteger");
-    public static final QName XSD_NONPOSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonPositiveInteger");
-
-    public static final QName XSD_YEARMONTH = new QName(URI_2001_SCHEMA_XSD, "gYearMonth");
-    public static final QName XSD_MONTHDAY = new QName(URI_2001_SCHEMA_XSD, "gMonthDay");
-    public static final QName XSD_YEAR = new QName(URI_2001_SCHEMA_XSD, "gYear");
-    public static final QName XSD_MONTH = new QName(URI_2001_SCHEMA_XSD, "gMonth");
-    public static final QName XSD_DAY = new QName(URI_2001_SCHEMA_XSD, "gDay");
-    public static final QName XSD_DURATION = new QName(URI_2001_SCHEMA_XSD, "duration");
-
-    public static final QName XSD_NAME = new QName(URI_2001_SCHEMA_XSD, "Name");
-    public static final QName XSD_NCNAME = new QName(URI_2001_SCHEMA_XSD, "NCName");
-    public static final QName XSD_NMTOKEN = new QName(URI_2001_SCHEMA_XSD, "NMTOKEN");
-    public static final QName XSD_NMTOKENS = new QName(URI_2001_SCHEMA_XSD, "NMTOKENS");
-    public static final QName XSD_NOTATION = new QName(URI_2001_SCHEMA_XSD, "NOTATION");
-    public static final QName XSD_ENTITY = new QName(URI_2001_SCHEMA_XSD, "ENTITY");
-    public static final QName XSD_ENTITIES = new QName(URI_2001_SCHEMA_XSD, "ENTITIES");
-    public static final QName XSD_IDREF = new QName(URI_2001_SCHEMA_XSD, "IDREF");
-    public static final QName XSD_IDREFS = new QName(URI_2001_SCHEMA_XSD, "IDREFS");
-    public static final QName XSD_ANYURI = new QName(URI_2001_SCHEMA_XSD, "anyURI");
-    public static final QName XSD_LANGUAGE = new QName(URI_2001_SCHEMA_XSD, "language");
-    public static final QName XSD_ID = new QName(URI_2001_SCHEMA_XSD, "ID");
-    public static final QName XSD_SCHEMA = new QName(URI_2001_SCHEMA_XSD, "schema");
-
+public final class Constants {
+    
     /**
      * All constants that are relevant to the names of the schema elements
      */
-    public static class BlockConstants {
-
+    public static final class BlockConstants {
         public static final String ALL = "all";
-        public static final String NONE = "none";
+        public static final String ELEMENT_ONLY = "elementOnly";
+        public static final String EMPTY = "empty";
+        public static final String ERROR = "error";
         public static final String EXTENSION = "extension";
+        public static final String LAX = "lax";
         public static final String LIST = "list";
-        public static final String RESTRICTION = "restriction";
-        public static final String SUBSITUTION = "substitution";
-        public static final String UNION = "union";
-        public static final String EMPTY = "empty";
-        public static final String ELEMENT_ONLY = "elementOnly";
         public static final String MIXED = "mixed";
-        public static final String TEXT_ONLY = "textOnly";
-        public static final String LAX = "lax";
-        public static final String SKIP = "skip";
-        public static final String STRICT = "strict";
+        public static final String NONE = "none";
         public static final String OPTIONAL = "optional";
         public static final String PROHIBITED = "prohibited";
         public static final String REQUIRED = "required";
-        public static final String ERROR = "error";
+        public static final String RESTRICTION = "restriction";
+        public static final String SKIP = "skip";
+        public static final String STRICT = "strict";
+        public static final String SUBSITUTION = "substitution";
+        public static final String TEXT_ONLY = "textOnly";
+        public static final String UNION = "union";
         public static final String WARNING = "warning";
+        
+        private BlockConstants() {
+        }
     }
-
+    
     /**
      * class holding the the constants for meta data storage
      */
-    public static class MetaDataConstants {
+    public static final class MetaDataConstants {
         public static final String EXTERNAL_ATTRIBUTES = "EXTERNAL_ATTRIBUTES";
         public static final String EXTERNAL_ELEMENTS = "EXTERNAL_ELEMENTS";
+        private MetaDataConstants() {
+        }
     }
 
     /**
      * class holding the the constants for meta data storage
      */
-    public static class SystemConstants {
-        public static final String EXTENSION_REGISTRY_KEY = "org.apache.ws.commons.extensions.ExtensionRegistry";
+    public static final class SystemConstants {
+        public static final String 
+        EXTENSION_REGISTRY_KEY = "org.apache.ws.commons.extensions.ExtensionRegistry";
+        private SystemConstants() {
+        }
     }
 
-    public static final String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/";
+    public static final String DEFAULT_NS_PREFIX = "";
+    public static final String NULL_NS_URI = "";
 
+    //
+    // Schema Namespaces
+    //
+    public static final String URI_2001_SCHEMA_XSD = "http://www.w3.org/2001/XMLSchema";
+    public static final String URI_2001_SCHEMA_XSI = "http://www.w3.org/2001/XMLSchema-instance";
+    public static final String XML_NS_PREFIX = "xml";
+    public static final String XML_NS_URI = "http://www.w3.org/XML/1998/namespace";
     public static final String XMLNS_ATTRIBUTE = "xmlns";
+    public static final String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/";
+    public static final String XMLNS_PREFIX = "xml";
+    public static final String XMLNS_URI = "http://www.w3.org/XML/1998/namespace";
+    public static final QName XSD_ANY = new QName(URI_2001_SCHEMA_XSD, "any");
+    public static final QName XSD_ANYSIMPLETYPE = new QName(URI_2001_SCHEMA_XSD, "anySimpleType");
+    public static final QName XSD_ANYTYPE = new QName(URI_2001_SCHEMA_XSD, "anyType");
+    public static final QName XSD_ANYURI = new QName(URI_2001_SCHEMA_XSD, "anyURI");
+    public static final QName XSD_BASE64 = new QName(URI_2001_SCHEMA_XSD, "base64Binary");
+    public static final QName XSD_BOOLEAN = new QName(URI_2001_SCHEMA_XSD, "boolean");
+    public static final QName XSD_BYTE = new QName(URI_2001_SCHEMA_XSD, "byte");
+    public static final QName XSD_DATE = new QName(URI_2001_SCHEMA_XSD, "date");
+    public static final QName XSD_DATETIME = new QName(URI_2001_SCHEMA_XSD, "dateTime");
+    public static final QName XSD_DAY = new QName(URI_2001_SCHEMA_XSD, "gDay");
+    public static final QName XSD_DECIMAL = new QName(URI_2001_SCHEMA_XSD, "decimal");
 
-    public static final String DEFAULT_NS_PREFIX = "";
+    public static final QName XSD_DOUBLE = new QName(URI_2001_SCHEMA_XSD, "double");
+    public static final QName XSD_DURATION = new QName(URI_2001_SCHEMA_XSD, "duration");
 
-    public static final String XML_NS_URI = "http://www.w3.org/XML/1998/namespace";
+    public static final QName XSD_ENTITIES = new QName(URI_2001_SCHEMA_XSD, "ENTITIES");
+    public static final QName XSD_ENTITY = new QName(URI_2001_SCHEMA_XSD, "ENTITY");
+    public static final QName XSD_FLOAT = new QName(URI_2001_SCHEMA_XSD, "float");
+    public static final QName XSD_HEXBIN = new QName(URI_2001_SCHEMA_XSD, "hexBinary");
+    public static final QName XSD_ID = new QName(URI_2001_SCHEMA_XSD, "ID");
+    public static final QName XSD_IDREF = new QName(URI_2001_SCHEMA_XSD, "IDREF");
+    public static final QName XSD_IDREFS = new QName(URI_2001_SCHEMA_XSD, "IDREFS");
+    public static final QName XSD_INT = new QName(URI_2001_SCHEMA_XSD, "int");
 
-    public static final String XML_NS_PREFIX = "xml";
+    public static final QName XSD_INTEGER = new QName(URI_2001_SCHEMA_XSD, "integer");
+    public static final QName XSD_LANGUAGE = new QName(URI_2001_SCHEMA_XSD, "language");
+    public static final QName XSD_LONG = new QName(URI_2001_SCHEMA_XSD, "long");
+    public static final QName XSD_MONTH = new QName(URI_2001_SCHEMA_XSD, "gMonth");
+    public static final QName XSD_MONTHDAY = new QName(URI_2001_SCHEMA_XSD, "gMonthDay");
+    public static final QName XSD_NAME = new QName(URI_2001_SCHEMA_XSD, "Name");
 
-    public static final String NULL_NS_URI = "";
+    public static final QName XSD_NCNAME = new QName(URI_2001_SCHEMA_XSD, "NCName");
+    public static final QName XSD_NEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "negativeInteger");
+    public static final QName XSD_NMTOKEN = new QName(URI_2001_SCHEMA_XSD, "NMTOKEN");
+    public static final QName XSD_NMTOKENS = new QName(URI_2001_SCHEMA_XSD, "NMTOKENS");
+    public static final QName XSD_NONNEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonNegativeInteger");
+    public static final QName XSD_NONPOSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonPositiveInteger");
+    public static final QName XSD_NORMALIZEDSTRING = new QName(URI_2001_SCHEMA_XSD, "normalizedString");
+    public static final QName XSD_NOTATION = new QName(URI_2001_SCHEMA_XSD, "NOTATION");
+    public static final QName XSD_POSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "positiveInteger");
+    public static final QName XSD_QNAME = new QName(URI_2001_SCHEMA_XSD, "QName");
+    public static final QName XSD_SCHEMA = new QName(URI_2001_SCHEMA_XSD, "schema");
+    public static final QName XSD_SHORT = new QName(URI_2001_SCHEMA_XSD, "short");
+    // Define qnames for the all of the XSD and SOAP-ENC encodings
+    public static final QName XSD_STRING = new QName(URI_2001_SCHEMA_XSD, "string");
+
+    public static final QName XSD_TIME = new QName(URI_2001_SCHEMA_XSD, "time");
+
+    public static final QName XSD_TOKEN = new QName(URI_2001_SCHEMA_XSD, "token");
+
+    public static final QName XSD_UNSIGNEDBYTE = new QName(URI_2001_SCHEMA_XSD, "unsignedByte");
+
+    public static final QName XSD_UNSIGNEDINT = new QName(URI_2001_SCHEMA_XSD, "unsignedInt");
+
+    public static final QName XSD_UNSIGNEDLONG = new QName(URI_2001_SCHEMA_XSD, "unsignedLong");
+
+    public static final QName XSD_UNSIGNEDSHORT = new QName(URI_2001_SCHEMA_XSD, "unsignedShort");
+
+    public static final QName XSD_YEAR = new QName(URI_2001_SCHEMA_XSD, "gYear");
+
+    public static final QName XSD_YEARMONTH = new QName(URI_2001_SCHEMA_XSD, "gYearMonth");
+
+    private Constants() {
+        
+    }
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/constants/Enum.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/constants/Enum.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/constants/Enum.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/constants/Enum.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
@@ -21,21 +21,53 @@
 
 public abstract class Enum {
 
-    public static String NULL = "NULL";
+    public static class EnumValueException extends RuntimeException {
+        /**
+         *
+         */
+        private static final long serialVersionUID = 1L;
 
-    protected Enum(String value) {
-        setValue(value);
+        public EnumValueException(String mesg) {
+            super(mesg);
+        }
     }
 
+    public static final String NULL = "NULL";
+
+    protected String value = NULL;
+
     protected Enum() {
         this(NULL);
     }
 
-    protected abstract String[] getValues();
+    protected Enum(String value) {
+        setValue(value);
+    }
 
-    protected String value = NULL;
+    protected static final int index(String value, String values[]) {
+        for (int i = 0; i < values.length; i++) {
+            if (value.equals(values[i])) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    @Override
+    public boolean equals(Object what) {
+        return what.getClass().equals(this.getClass()) && ((Enum)what).getValue().equals(this.getValue());
+    }
+    
+    @Override
+    public int hashCode() {
+        return super.hashCode();
+    }
 
-    public void setValue(String value) {
+    public String getValue() {
+        return value;
+    }
+
+    public final void setValue(String value) {
         if (value.equals(Enum.NULL)) {
             this.value = Enum.NULL;
         } else {
@@ -59,35 +91,9 @@
         }
     }
 
-    public String getValue() {
-        return value;
-    }
-
     public String toString() {
         return value;
     }
 
-    public boolean equals(Object what) {
-        return what.getClass().equals(this.getClass()) && ((Enum)what).getValue().equals(this.getValue());
-    }
-
-    public static class EnumValueException extends RuntimeException {
-        /**
-         *
-         */
-        private static final long serialVersionUID = 1L;
-
-        public EnumValueException(String mesg) {
-            super(mesg);
-        }
-    }
-
-    protected static final int index(String value, String values[]) {
-        for (int i = 0; i < values.length; i++) {
-            if (value.equals(values[i])) {
-                return i;
-            }
-        }
-        return -1;
-    }
+    protected abstract String[] getValues();
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionDeserializer.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionDeserializer.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionDeserializer.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionDeserializer.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
@@ -18,14 +18,16 @@
  */
 package org.apache.ws.commons.schema.extensions;
 
-import org.apache.ws.commons.schema.XmlSchemaObject;
-import org.apache.ws.commons.schema.constants.Constants;
-import org.w3c.dom.Node;
-
-import javax.xml.namespace.QName;
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Node;
+
+import org.apache.ws.commons.schema.XmlSchemaObject;
+import org.apache.ws.commons.schema.constants.Constants;
+
 /**
  * Default deserializer. The action taken when there is nothing specific to be done would be to attach the raw
  * element object as it is to the meta information map for an element or the raw attribute object
@@ -42,33 +44,35 @@
      * @param node - the raw DOM Node read from the source. This will be the extension element itself if for
      *            an element or the extension attribute object if it is an attribute
      */
+    @SuppressWarnings("unchecked")
     public void deserialize(XmlSchemaObject schemaObject, QName name, Node node) {
 
         // we just attach the raw node either to the meta map of
         // elements or the attributes
 
-        Map metaInfoMap = schemaObject.getMetaInfoMap();
+        Map<Object, Object> metaInfoMap = schemaObject.getMetaInfoMap();
         if (metaInfoMap == null) {
-            metaInfoMap = new HashMap();
+            metaInfoMap = new HashMap<Object, Object>();
         }
 
         if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
 
-            Map attribMap;
+            Map<QName, Node> attribMap;
             if (metaInfoMap.containsKey(Constants.MetaDataConstants.EXTERNAL_ATTRIBUTES)) {
-                attribMap = (Map)metaInfoMap.get(Constants.MetaDataConstants.EXTERNAL_ATTRIBUTES);
+                attribMap = (Map<QName, Node>)
+                    metaInfoMap.get(Constants.MetaDataConstants.EXTERNAL_ATTRIBUTES);
             } else {
-                attribMap = new HashMap();
+                attribMap = new HashMap<QName, Node>();
                 metaInfoMap.put(Constants.MetaDataConstants.EXTERNAL_ATTRIBUTES, attribMap);
             }
             attribMap.put(name, node);
 
         } else if (node.getNodeType() == Node.ELEMENT_NODE) {
-            Map elementMap;
+            Map<QName, Node> elementMap;
             if (metaInfoMap.containsKey(Constants.MetaDataConstants.EXTERNAL_ELEMENTS)) {
-                elementMap = (Map)metaInfoMap.get(Constants.MetaDataConstants.EXTERNAL_ELEMENTS);
+                elementMap = (Map<QName, Node>)metaInfoMap.get(Constants.MetaDataConstants.EXTERNAL_ELEMENTS);
             } else {
-                elementMap = new HashMap();
+                elementMap = new HashMap<QName, Node>();
                 metaInfoMap.put(Constants.MetaDataConstants.EXTERNAL_ELEMENTS, elementMap);
             }
             elementMap.put(name, node);
@@ -76,7 +80,7 @@
 
         // subsequent processing takes place only if this map is not empty
         if (!metaInfoMap.isEmpty()) {
-            Map metaInfoMapFromSchemaElement = schemaObject.getMetaInfoMap();
+            Map<Object, Object> metaInfoMapFromSchemaElement = schemaObject.getMetaInfoMap();
             if (metaInfoMapFromSchemaElement == null) {
                 schemaObject.setMetaInfoMap(metaInfoMap);
             } else {

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionSerializer.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionSerializer.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionSerializer.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionSerializer.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
@@ -18,15 +18,16 @@
  */
 package org.apache.ws.commons.schema.extensions;
 
-import org.apache.ws.commons.schema.XmlSchemaObject;
-import org.apache.ws.commons.schema.constants.Constants;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
-import org.w3c.dom.Node;
 import org.w3c.dom.Element;
-import org.w3c.dom.Attr;
+import org.w3c.dom.Node;
 
-import java.util.Iterator;
-import java.util.Map;
+import org.apache.ws.commons.schema.XmlSchemaObject;
+import org.apache.ws.commons.schema.constants.Constants;
 
 /**
 

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionDeserializer.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionDeserializer.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionDeserializer.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionDeserializer.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
@@ -18,10 +18,11 @@
  */
 package org.apache.ws.commons.schema.extensions;
 
-import org.apache.ws.commons.schema.XmlSchemaObject;
+import javax.xml.namespace.QName;
+
 import org.w3c.dom.Node;
 
-import javax.xml.namespace.QName;
+import org.apache.ws.commons.schema.XmlSchemaObject;
 
 /**
  * Interface for the extension deserializer. The purpose of an instance of this is to deserialize the relevant
@@ -41,6 +42,6 @@
      * @param domNode - the raw DOM Node read from the source. This will be the extension element itself if
      *            for an element or the extension attribute object if it is an attribute
      */
-    public void deserialize(XmlSchemaObject schemaObject, QName name, Node domNode);
+    void deserialize(XmlSchemaObject schemaObject, QName name, Node domNode);
 
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionRegistry.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
@@ -18,13 +18,15 @@
  */
 package org.apache.ws.commons.schema.extensions;
 
-import org.apache.ws.commons.schema.XmlSchemaObject;
-import org.w3c.dom.Node;
-
-import javax.xml.namespace.QName;
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Node;
+
+import org.apache.ws.commons.schema.XmlSchemaObject;
+
 /**
  * The task of the extension serializer is to delegate the serilization of the extensions. The extension
  * serializers/deserializers are retained in seperate maps and there are also two seperate references to
@@ -36,8 +38,9 @@
     /**
      * Maps for the storage of extension serializers /deserializers
      */
-    private Map extensionSerializers = new HashMap();
-    private Map extensionDeserializers = new HashMap();
+    private Map<Class, ExtensionSerializer> extensionSerializers = new HashMap<Class, ExtensionSerializer>();
+    private Map<QName, ExtensionDeserializer> extensionDeserializers = 
+        new HashMap<QName, ExtensionDeserializer>();
 
     /**
      * Default serializer and serializer

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionSerializer.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionSerializer.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionSerializer.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/extensions/ExtensionSerializer.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
@@ -18,9 +18,10 @@
  */
 package org.apache.ws.commons.schema.extensions;
 
-import org.apache.ws.commons.schema.XmlSchemaObject;
 import org.w3c.dom.Node;
 
+import org.apache.ws.commons.schema.XmlSchemaObject;
+
 /**
  * Interface for the extension serializer. The purpose of an instance of this is to serialize the relevant
  * custom object and generate attribute/elementa desired . This custom object may be stored in the metadata
@@ -37,5 +38,5 @@
      * @param domNode - the parent DOM Node that will ultimately be serialized. The XMLSchema serialization
      *            mechanism is to create a DOM tree first and serialize it
      */
-    public void serialize(XmlSchemaObject schemaObject, Class classOfType, Node domNode);
+    void serialize(XmlSchemaObject schemaObject, Class classOfType, Node domNode);
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/CollectionURIResolver.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/resolver/DefaultURIResolver.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/DefaultURIResolver.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/resolver/URIResolver.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/URIResolver.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/URIResolver.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/resolver/URIResolver.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/utils/DOMUtil.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/DOMUtil.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/DOMUtil.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/DOMUtil.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,14 @@
 
 package org.apache.ws.commons.schema.utils;
 
-import org.w3c.dom.*;
-
 import java.lang.reflect.Method;
 
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
 /**
  * Some useful utility methods. This class was modified in Xerces2 with a view to abstracting as much as
  * possible away from the representation of the underlying parsed structure (i.e., the DOM). This was done so
@@ -114,10 +118,8 @@
         // search for node
         Node child = parent.getFirstChild();
         while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                if (child.getNodeName().equals(elemName)) {
-                    return (Element)child;
-                }
+            if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equals(elemName)) {
+                return (Element)child;
             }
             child = child.getNextSibling();
         }
@@ -135,10 +137,8 @@
         // search for node
         Node child = parent.getLastChild();
         while (child != null) {
-            if (child.getNodeType() == Node.ELEMENT_NODE) {
-                if (child.getNodeName().equals(elemName)) {
-                    return (Element)child;
-                }
+            if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equals(elemName)) {
+                return (Element)child;
             }
             child = child.getPreviousSibling();
         }
@@ -156,10 +156,8 @@
         // search for node
         Node sibling = node.getNextSibling();
         while (sibling != null) {
-            if (sibling.getNodeType() == Node.ELEMENT_NODE) {
-                if (sibling.getNodeName().equals(elemName)) {
-                    return (Element)sibling;
-                }
+            if (sibling.getNodeType() == Node.ELEMENT_NODE && sibling.getNodeName().equals(elemName)) {
+                return (Element)sibling;
             }
             sibling = sibling.getNextSibling();
         }
@@ -223,7 +221,8 @@
         while (sibling != null) {
             if (sibling.getNodeType() == Node.ELEMENT_NODE) {
                 String siblingURI = sibling.getNamespaceURI();
-                if (siblingURI != null && siblingURI.equals(uri) && sibling.getLocalName().equals(localpart)) {
+                if (siblingURI != null && siblingURI.equals(uri) 
+                    && sibling.getLocalName().equals(localpart)) {
                     return (Element)sibling;
                 }
             }
@@ -363,7 +362,8 @@
             if (sibling.getNodeType() == Node.ELEMENT_NODE) {
                 for (String[] elemName : elemNames) {
                     String uri = sibling.getNamespaceURI();
-                    if (uri != null && uri.equals(elemName[0]) && sibling.getLocalName().equals(elemName[1])) {
+                    if (uri != null && uri.equals(elemName[0]) 
+                        && sibling.getLocalName().equals(elemName[1])) {
                         return (Element)sibling;
                     }
                 }
@@ -379,7 +379,8 @@
     /**
      * Finds and returns the first child node with the given name and attribute name, value pair.
      */
-    public static Element getFirstChildElement(Node parent, String elemName, String attrName, String attrValue) {
+    public static Element getFirstChildElement(Node parent, String elemName, 
+                                               String attrName, String attrValue) {
 
         // search for node
         Node child = parent.getFirstChild();
@@ -402,7 +403,8 @@
     /**
      * Finds and returns the last child node with the given name and attribute name, value pair.
      */
-    public static Element getLastChildElement(Node parent, String elemName, String attrName, String attrValue) {
+    public static Element getLastChildElement(Node parent, String elemName, 
+                                              String attrName, String attrValue) {
 
         // search for node
         Node child = parent.getLastChild();
@@ -426,7 +428,8 @@
      * Finds and returns the next sibling node with the given name and attribute name, value pair. Since only
      * elements have attributes, the node returned will be of type Node.ELEMENT_NODE.
      */
-    public static Element getNextSiblingElement(Node node, String elemName, String attrName, String attrValue) {
+    public static Element getNextSiblingElement(Node node, String elemName, 
+                                                String attrName, String attrValue) {
 
         // search for node
         Node sibling = node.getNextSibling();

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespaceContextOwner.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespaceContextOwner.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespaceContextOwner.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespaceContextOwner.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/utils/NamespaceMap.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespaceMap.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespaceMap.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespaceMap.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
@@ -18,19 +18,26 @@
  */
 package org.apache.ws.commons.schema.utils;
 
-import java.util.*;
-
-public class NamespaceMap extends HashMap implements NamespacePrefixList {
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * This class maps from a prefix to an object that is either a String or a URI.
+ * In fact, it will work with anything with a toString result that is useful
+ * as a namespace URI.
+ */
+public class NamespaceMap extends HashMap<String, Object> implements NamespacePrefixList {
 
-    /**
-	 * 
-	 */
     private static final long serialVersionUID = 1L;
 
     public NamespaceMap() {
     }
 
-    public NamespaceMap(Map map) {
+    public NamespaceMap(Map<String, Object> map) {
         super(map);
     }
 
@@ -39,7 +46,7 @@
     }
 
     public String[] getDeclaredPrefixes() {
-        Set keys = keySet();
+        Set<String> keys = keySet();
         return (String[])keys.toArray(new String[keys.size()]);
     }
 
@@ -48,9 +55,7 @@
     }
 
     public String getPrefix(String namespaceURI) {
-        Iterator iterator = entrySet().iterator();
-        while (iterator.hasNext()) {
-            Map.Entry entry = (Map.Entry)iterator.next();
+        for (Map.Entry<String, Object> entry : entrySet()) {
             if (entry.getValue().toString().equals(namespaceURI)) {
                 return (String)entry.getKey();
             }
@@ -59,10 +64,8 @@
     }
 
     public Iterator getPrefixes(String namespaceURI) {
-        ArrayList list = new ArrayList();
-        Iterator iterator = entrySet().iterator();
-        while (iterator.hasNext()) {
-            Map.Entry entry = (Map.Entry)iterator.next();
+        List<String> list = new ArrayList<String>();
+        for (Map.Entry<String, Object> entry : entrySet()) {
             if (entry.getValue().toString().equals(namespaceURI)) {
                 list.add(entry.getKey());
             }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespacePrefixList.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespacePrefixList.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespacePrefixList.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NamespacePrefixList.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,5 +28,5 @@
     /**
      * Returns the list of currently defined namespace prefixes.
      */
-    public String[] getDeclaredPrefixes();
+    String[] getDeclaredPrefixes();
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NodeNamespaceContext.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NodeNamespaceContext.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NodeNamespaceContext.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/NodeNamespaceContext.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,28 +19,35 @@
 
 package org.apache.ws.commons.schema.utils;
 
-import org.apache.ws.commons.schema.constants.Constants;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
-import javax.xml.namespace.NamespaceContext;
-
-import java.lang.reflect.Method;
-import java.util.*;
+import org.apache.ws.commons.schema.constants.Constants;
 
 /**
  * Implementation of {@link NamespaceContext}, which is based on a DOM node.
  */
-public class NodeNamespaceContext implements NamespacePrefixList {
+public final class NodeNamespaceContext implements NamespacePrefixList {
+    static Method getUserData;
+    static Method setUserData;
     private static final String NODE_NAMSPACE_CONTEXT = NamespacePrefixList.class.getName();
-    private static final Collection XML_NS_PREFIX_COLLECTION = Collections
+
+    private static final Collection<String> XML_NS_PREFIX_COLLECTION = Collections
         .singletonList(Constants.XML_NS_PREFIX);
-    private static final Collection XMLNS_ATTRIBUTE_COLLECTION = Collections
+    private static final Collection<String> XMLNS_ATTRIBUTE_COLLECTION = Collections
         .singletonList(Constants.XMLNS_ATTRIBUTE);
+    private final Map<String, String> declarations;
 
-    static Method getUserData;
-    static Method setUserData;
+    private String[] prefixes;
     static {
         try {
             Class cls = Class.forName("org.w3c.dom.UserDataHandler", false, Node.class.getClassLoader());
@@ -56,13 +63,10 @@
         }
     }
 
-    private final Map declarations;
-    private String[] prefixes;
-
     /**
      * Creates a new instance with the given nodes context.
      */
-    private NodeNamespaceContext(Map decls) {
+    private NodeNamespaceContext(Map<String, String> decls) {
         declarations = decls;
     }
 
@@ -73,14 +77,13 @@
                     NODE_NAMSPACE_CONTEXT
                 });
                 if (ctx == null) {
-                    Map declarations = new HashMap();
+                    Map<String, String> declarations = new HashMap<String, String>();
 
                     Node parentNode = pNode.getParentNode();
                     if (parentNode != null) {
-                        NodeNamespaceContext parent = (NodeNamespaceContext)getUserData.invoke(parentNode,
-                                                                                               new Object[] {
-                                                                                                   NODE_NAMSPACE_CONTEXT
-                                                                                               });
+                        NodeNamespaceContext parent = (NodeNamespaceContext)
+                            getUserData.invoke(parentNode,
+                                               new Object[] {NODE_NAMSPACE_CONTEXT });
                         if (parent == null) {
                             parent = getNamespaceContext(parentNode);
                         }
@@ -112,15 +115,23 @@
             }
         }
 
-        final Map declarations = new HashMap();
+        final Map<String, String> declarations = new HashMap<String, String>();
         new PrefixCollector() {
             protected void declare(String pPrefix, String pNamespaceURI) {
                 declarations.put(pPrefix, pNamespaceURI);
             }
-        }.searchAllPrefixDeclarations(pNode);
+        } .searchAllPrefixDeclarations(pNode);
         return new NodeNamespaceContext(declarations);
     }
 
+    public String[] getDeclaredPrefixes() {
+        if (prefixes == null) {
+            Collection<String> keys = declarations.keySet();
+            prefixes = keys.toArray(new String[keys.size()]);
+        }
+        return prefixes;
+    }
+
     public String getNamespaceURI(String pPrefix) {
         if (pPrefix == null) {
             throw new IllegalArgumentException("The prefix must not be null.");
@@ -131,7 +142,7 @@
         if (Constants.XMLNS_ATTRIBUTE.equals(pPrefix)) {
             return Constants.XMLNS_ATTRIBUTE_NS_URI;
         }
-        final String uri = (String)declarations.get(pPrefix);
+        final String uri = declarations.get(pPrefix);
         return uri == null ? Constants.NULL_NS_URI : uri;
     }
 
@@ -154,7 +165,7 @@
         return null;
     }
 
-    public Iterator getPrefixes(String pNamespaceURI) {
+    public Iterator<String> getPrefixes(String pNamespaceURI) {
         if (pNamespaceURI == null) {
             throw new IllegalArgumentException("The namespace URI must not be null.");
         }
@@ -164,21 +175,12 @@
         if (Constants.XMLNS_ATTRIBUTE_NS_URI.equals(pNamespaceURI)) {
             return XMLNS_ATTRIBUTE_COLLECTION.iterator();
         }
-        final List list = new ArrayList();
-        for (Iterator iter = declarations.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry entry = (Map.Entry)iter.next();
+        final List<String> list = new ArrayList<String>();
+        for (Map.Entry<String, String> entry : declarations.entrySet()) {
             if (pNamespaceURI.equals(entry.getValue())) {
                 list.add(entry.getKey());
             }
         }
         return list.iterator();
     }
-
-    public String[] getDeclaredPrefixes() {
-        if (prefixes == null) {
-            Collection keys = declarations.keySet();
-            prefixes = (String[])keys.toArray(new String[keys.size()]);
-        }
-        return prefixes;
-    }
 }

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/PrefixCollector.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/PrefixCollector.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/PrefixCollector.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/PrefixCollector.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,11 @@
 
 package org.apache.ws.commons.schema.utils;
 
-import org.apache.ws.commons.schema.constants.Constants;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 
+import org.apache.ws.commons.schema.constants.Constants;
+
 /**
  * Searches for namespace prefix declarations.
  */

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/TargetNamespaceValidator.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/TargetNamespaceValidator.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/TargetNamespaceValidator.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/TargetNamespaceValidator.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/utils/XDOMUtil.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XDOMUtil.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XDOMUtil.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/utils/XDOMUtil.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
@@ -22,7 +22,7 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
-public class XDOMUtil extends DOMUtil {
+public final class XDOMUtil extends DOMUtil {
 
     /**
      * Creates a new instance of XDOMUtil

Modified: webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AllSimpleTypeTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AllSimpleTypeTest.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AllSimpleTypeTest.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AllSimpleTypeTest.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,18 +19,24 @@
 
 package tests;
 
-import junit.framework.TestCase;
+import java.util.Iterator;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaType;
-import org.w3c.dom.Document;
 
-import javax.xml.parsers.DocumentBuilderFactory;
-import java.util.Iterator;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
 
-public class AllSimpleTypeTest extends TestCase {
+public class AllSimpleTypeTest {
 
+    @Test
     public void testSimpleTypeSchemaGeneration() throws Exception {
         // create a DOM document
         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

Modified: webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnnotationTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnnotationTest.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnnotationTest.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnnotationTest.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
@@ -18,19 +18,30 @@
  */
 package tests;
 
-import junit.framework.TestCase;
-import org.apache.ws.commons.schema.*;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.namespace.QName;
-import javax.xml.transform.stream.StreamSource;
 import java.io.FileInputStream;
 import java.io.InputStream;
 import java.util.HashSet;
 import java.util.Set;
 
-public class AnnotationTest extends TestCase {
+import javax.xml.namespace.QName;
+import javax.xml.transform.stream.StreamSource;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaAnnotation;
+import org.apache.ws.commons.schema.XmlSchemaAppInfo;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaDocumentation;
+import org.apache.ws.commons.schema.XmlSchemaObject;
+import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
+import org.apache.ws.commons.schema.XmlSchemaSimpleType;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class AnnotationTest extends Assert {
 
     /**
      * This method will test for when the appinfo element of an annotation doesn't include a source attribute
@@ -38,6 +49,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testEmptyAppInfo() throws Exception {
 
         /*
@@ -46,12 +58,12 @@
          * <length value="1"/> </restriction> </simpleType>
          */
 
-        QName TYPE_QNAME = new QName("http://soapinterop.org/types", "emptyAppinfo");
+        QName typeQName = new QName("http://soapinterop.org/types", "emptyAppinfo");
         InputStream is = new FileInputStream(Resources.asURI("annotation.xsd"));
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
         schemaCol.read(new StreamSource(is), null);
 
-        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(TYPE_QNAME);
+        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(typeQName);
         assertNotNull(simpleType);
 
         XmlSchemaAnnotation xsa = simpleType.getAnnotation();
@@ -60,7 +72,7 @@
         XmlSchemaObjectCollection col = xsa.getItems();
         assertEquals(1, col.getCount());
 
-        Set s = new HashSet();
+        Set<String> s = new HashSet<String>();
         s.add(XmlSchemaDocumentation.class.getName());
         for (int i = 0; i < col.getCount(); i++) {
             XmlSchemaObject o = col.getItem(i);
@@ -89,6 +101,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testEmptyDocumentation() throws Exception {
 
         /*
@@ -97,12 +110,12 @@
          * <length value="2"/> </restriction> </simpleType>
          */
 
-        QName TYPE_QNAME = new QName("http://soapinterop.org/types", "emptyDocumentation");
+        QName typeQName = new QName("http://soapinterop.org/types", "emptyDocumentation");
         InputStream is = new FileInputStream(Resources.asURI("annotation.xsd"));
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
         schemaCol.read(new StreamSource(is), null);
 
-        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(TYPE_QNAME);
+        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(typeQName);
         assertNotNull(simpleType);
 
         XmlSchemaAnnotation xsa = simpleType.getAnnotation();
@@ -111,7 +124,7 @@
         XmlSchemaObjectCollection col = xsa.getItems();
         assertEquals(1, col.getCount());
 
-        Set s = new HashSet();
+        Set<String> s = new HashSet<String>();
         s.add(XmlSchemaAppInfo.class.getName());
         for (int i = 0; i < col.getCount(); i++) {
             XmlSchemaObject o = col.getItem(i);
@@ -139,6 +152,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testEmptyAppinfoDocumentation() throws Exception {
 
         /*
@@ -146,12 +160,12 @@
          * </annotation> <restriction base="string"> <length value="1"/> </restriction> </simpleType>
          */
 
-        QName TYPE_QNAME = new QName("http://soapinterop.org/types", "emptyAppinfoDocumentation");
+        QName typeQName = new QName("http://soapinterop.org/types", "emptyAppinfoDocumentation");
         InputStream is = new FileInputStream(Resources.asURI("annotation.xsd"));
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
         schemaCol.read(new StreamSource(is), null);
 
-        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(TYPE_QNAME);
+        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(typeQName);
         assertNotNull(simpleType);
 
         XmlSchemaAnnotation xsa = simpleType.getAnnotation();
@@ -167,6 +181,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testFullDocumentationAppinfo() throws Exception {
 
         /*
@@ -176,12 +191,12 @@
          * <length value="1"/> </restriction> </simpleType>
          */
 
-        QName TYPE_QNAME = new QName("http://soapinterop.org/types", "annotationTest");
+        QName typeQName = new QName("http://soapinterop.org/types", "annotationTest");
         InputStream is = new FileInputStream(Resources.asURI("annotation.xsd"));
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
         schemaCol.read(new StreamSource(is), null);
 
-        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(TYPE_QNAME);
+        XmlSchemaSimpleType simpleType = (XmlSchemaSimpleType)schemaCol.getTypeByQName(typeQName);
         assertNotNull(simpleType);
 
         XmlSchemaAnnotation xsa = simpleType.getAnnotation();
@@ -190,7 +205,7 @@
         XmlSchemaObjectCollection col = xsa.getItems();
         assertEquals(2, col.getCount());
 
-        Set s = new HashSet();
+        Set<String> s = new HashSet<String>();
         s.add(XmlSchemaAppInfo.class.getName());
         s.add(XmlSchemaDocumentation.class.getName());
         for (int i = 0; i < col.getCount(); i++) {
@@ -225,6 +240,7 @@
      * 
      * @throws Exception Any exception encountered
      */
+    @Test
     public void testXmlSchemaElementAnnotation() throws Exception {
 
         /*
@@ -241,7 +257,7 @@
         XmlSchemaObjectCollection col = xsa.getItems();
         assertEquals(2, col.getCount());
 
-        Set s = new HashSet();
+        Set<String> s = new HashSet<String>();
         s.add(XmlSchemaAppInfo.class.getName());
         s.add(XmlSchemaDocumentation.class.getName());
         for (int i = 0; i < col.getCount(); i++) {

Modified: webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnyAttTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnyAttTest.java?rev=727246&r1=727245&r2=727246&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnyAttTest.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AnyAttTest.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
@@ -18,19 +18,24 @@
  */
 package tests;
 
-import junit.framework.TestCase;
-import org.apache.ws.commons.schema.*;
-import org.w3c.dom.Document;
-
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-public class AnyAttTest extends TestCase {
+import org.w3c.dom.Document;
 
-    protected void setUp() throws Exception {
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaAnyAttribute;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaComplexType;
+import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaParticle;
+import org.apache.ws.commons.schema.XmlSchemaType;
 
-    }
+import org.junit.Assert;
+import org.junit.Test;
 
+public class AnyAttTest extends Assert {
+    @Test
     public void testAnyAtt() throws Exception {
         // create a DOM document
         DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();