You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2005/09/09 18:25:22 UTC

svn commit: r279809 - in /incubator/woden/java/src/org/apache/woden: internal/schema/SchemaImpl.java schema/Schema.java

Author: jkaputin
Date: Fri Sep  9 09:25:14 2005
New Revision: 279809

URL: http://svn.apache.org/viewcvs?rev=279809&view=rev
Log:
Added the id attribute to Schema as this may be needed
to distinguish multiple schema elements with the same 
target namespace.

Modified:
    incubator/woden/java/src/org/apache/woden/internal/schema/SchemaImpl.java
    incubator/woden/java/src/org/apache/woden/schema/Schema.java

Modified: incubator/woden/java/src/org/apache/woden/internal/schema/SchemaImpl.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/schema/SchemaImpl.java?rev=279809&r1=279808&r2=279809&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/schema/SchemaImpl.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/schema/SchemaImpl.java Fri Sep  9 09:25:14 2005
@@ -13,6 +13,7 @@
 public class SchemaImpl implements Schema {
     
     private String fTargetNamespace;
+    private String fId;
     private String fContentModel;
     private Object fContent;
 
@@ -21,7 +22,7 @@
      */
     public void setTargetNamespace(String namespace) 
     {
-        fTargetNamespace = namespace;
+        this.fTargetNamespace = namespace;
     }
 
     /* (non-Javadoc)
@@ -29,27 +30,37 @@
      */
     public String getTargetNamespace() 
     {
-        return fTargetNamespace;
+        return this.fTargetNamespace;
+    }
+    
+    public void setId(String id)
+    {
+        this.fId = id;
+    }
+  
+    public String getId()
+    {
+        return this.fId;
     }
   
     public void setContentModel(String contentModel)
     {
-        fContentModel = contentModel;
+        this.fContentModel = contentModel;
     }
     
     public String getContentModel()
     {
-        return fContentModel;
+        return this.fContentModel;
     }
     
     public void setContent(Object schemaContent)
     {
-        fContent = schemaContent;
+        this.fContent = schemaContent;
     }
     
     public Object getContent()
     {
-        return fContent;
+        return this.fContent;
     }
 
 }

Modified: incubator/woden/java/src/org/apache/woden/schema/Schema.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/schema/Schema.java?rev=279809&r1=279808&r2=279809&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/schema/Schema.java (original)
+++ incubator/woden/java/src/org/apache/woden/schema/Schema.java Fri Sep  9 09:25:14 2005
@@ -9,14 +9,20 @@
  * schema importing. For example, in the W3C XML Schema type system 
  * is represents the <xs:schema> element. For Relax NG, it
  * represents the <rng:grammar> element.
- * 
- * It exposes the targetNamespace, but otherwise just returns the entire schema 
- * as a java.lang.Object. It also indicates type of object model (i.e. the API)
+ * <p>
+ * A schema element may be parsed with various APIs and represent with 
+ * different schema object models. This interface acts as a wrapper for
+ * the schema element. It exposes just the required targetNamespace attribute
+ * and the id attribute, which is optional. The id attribute may be used to
+ * distinguish multiple schemas with the same targetNamespace. 
+ * The actual schema element is returned as a java.lang.Object and  
+ * a content model indicator is used to identify the object model or API
  * used to represent the schema. A client application needing to process the 
  * underlying schema components can use this indicator to cast the schema Object 
- * to the appropriate type. For example, if it indicates the DOM API then the 
- * schema Object should be cast to an org.w3c.dom.Element.
- * 
+ * to the appropriate type. For example, if it indicates that the schema element 
+ * is represented by the DOM API then the schema Object should be cast to an 
+ * org.w3c.dom.Element.
+ * <p>
  * NOTE: non-XML type systems like DTD are not handled by this interface. They must be
  * handled by WSDL 2.0 extension mechanisms.
  * 
@@ -31,6 +37,10 @@
     public void setTargetNamespace(String namespace);
     
     public String getTargetNamespace();
+    
+    public void setId(String id);
+    
+    public String getId();
     
     public String getContentModel();
     



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