Author: bimargulies
Date: Wed Oct 13 23:14:19 2010
New Revision: 1022320
URL: http://svn.apache.org/viewvc?rev=1022320&view=rev
Log:
Eliminate the obsolete top-level addType method.
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
Modified:
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java?rev=1022320&r1=1022319&r2=1022320&view=diff
==============================================================================
---
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
(original)
+++
webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchema.java
Wed Oct 13 23:14:19 2010
@@ -141,26 +141,6 @@ public class XmlSchema extends XmlSchema
}
/**
- * Add a new type to the schema. The type must have a name, and there must
not already be a type of this
- * name in the schema. The type must have been created as a top-level type.
- *
- * @param type the new type.
- */
- public void addType(XmlSchemaType type) {
- QName qname = type.getQName();
- if (schemaTypes.containsKey(qname)) {
- throw new XmlSchemaException("Schema for namespace '" +
syntacticalTargetNamespace
- + "' already contains type '" +
qname.getLocalPart() + "'");
- }
- if (!type.isTopLevel()) {
- throw new XmlSchemaException(
- "Attempt to add a non-top-level type "
- + "to the global items in a schema");
- }
- schemaTypes.put(qname, type);
- }
-
- /**
* Return an array of DOM documents consisting of this schema and any
schemas that it references.
* Referenced schemas are only returned if the {...@link
XmlSchemaExternal} objects corresponding to them
* have their 'schema' fields filled in.