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 aj...@apache.org on 2007/10/22 18:14:03 UTC

svn commit: r587136 [3/3] - in /webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema: SchemaBuilder.java XmlSchemaCollection.java

Modified: webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java?rev=587136&r1=587135&r2=587136&view=diff
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java Mon Oct 22 09:14:03 2007
@@ -61,7 +61,31 @@
         this.extReg = extReg;
     }
 
+    /**
+     * This map contains a list of Schema objects keyed in by their namespaces
+     * When resolving schemas, this map will be checked for the presence of the schema
+     * first
+     */
+    private Map knownNamespaceMap = new HashMap();
 
+    /**
+     * get the namespace map
+     * @return a map of previously known XMLSchema objects keyed by their namespace (String)
+     */
+    public Map getKnownNamespaceMap() {
+		return knownNamespaceMap;
+	}
+
+    /**
+     * sets the known namespace map
+     * @param knownNamespaceMap a map of previously known XMLSchema objects keyed by their namespace (String)
+     */
+	public void setKnownNamespaceMap(Map knownNamespaceMap) {
+		this.knownNamespaceMap = knownNamespaceMap;
+	}
+	
+	
+	
     static class SchemaKey {
         private final String namespace;
         private final String systemId;
@@ -271,6 +295,21 @@
         return schemas.containsKey(pKey);
     }
 
+    
+    /**
+     * gets a schema from the external namespace map
+     * @param namespace
+     * @return
+     */
+    XmlSchema getKnownSchema(String namespace) {
+        return (XmlSchema) knownNamespaceMap.get(namespace);
+    }
+    
+    /**
+     * Get a schema given a SchemaKey
+     * @param pKey
+     * @return
+     */
     XmlSchema getSchema(SchemaKey pKey) {
         return (XmlSchema) schemas.get(pKey);
     }
@@ -475,4 +514,6 @@
     public boolean check(SchemaKey pKey){
         return (stack.indexOf(pKey)==-1);
     }
+
+	
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org