You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2004/08/19 21:43:20 UTC

cvs commit: ws-jaxme/src/xs/org/apache/ws/jaxme/xs/impl XSSchemaImpl.java

jochen      2004/08/19 12:43:20

  Modified:    src/xs/org/apache/ws/jaxme/xs XSSchema.java
               src/xs/org/apache/ws/jaxme/xs/impl XSSchemaImpl.java
  Log:
  Added XSSchema.getTargetNamespace()
  PR: JAXME-25
  Submitted by: Mik Lernout (mik at futurestreet.org)
  Reviewed by: Jochen Wiedmann (jochen at apache.org)
  
  Revision  Changes    Path
  1.6       +12 -0     ws-jaxme/src/xs/org/apache/ws/jaxme/xs/XSSchema.java
  
  Index: XSSchema.java
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/xs/org/apache/ws/jaxme/xs/XSSchema.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSSchema.java	16 Feb 2004 23:39:48 -0000	1.5
  +++ XSSchema.java	19 Aug 2004 19:43:20 -0000	1.6
  @@ -19,6 +19,7 @@
   import java.util.Map;
   
   import org.apache.ws.jaxme.xs.parser.XSContext;
  +import org.apache.ws.jaxme.xs.xml.XsAnyURI;
   import org.apache.ws.jaxme.xs.xml.XsQName;
   import org.xml.sax.SAXException;
   
  @@ -35,6 +36,17 @@
     /** <p>Returns the schemas context.</p>
      */
     public XSContext getContext();
  +
  +  /** <p>Returns the schemas target namespace. Note, that a
  +   * {@link XSSchema logical schema} can combine elements,
  +   * attributes, groups, and types of various namespaces by
  +   * importing other {@link org.apache.ws.jaxme.xs.xml.XsESchema
  +   * syntactical schemas} with different namespaces. Thus
  +   * the logical schemas target namespace is in fact the
  +   * target namespace of the outermost syntactical schema.</p>
  +   * @return Target namespace or null for null (default namespace)
  +   */
  +  public XsAnyURI getTargetNamespace();
   
     /** <p>Returns the array of annotations.</p>
      */
  
  
  
  1.8       +14 -3     ws-jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSSchemaImpl.java
  
  Index: XSSchemaImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSSchemaImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSSchemaImpl.java	16 Feb 2004 23:39:43 -0000	1.7
  +++ XSSchemaImpl.java	19 Aug 2004 19:43:20 -0000	1.8
  @@ -40,6 +40,7 @@
   import org.apache.ws.jaxme.xs.parser.XSContext;
   import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
   import org.apache.ws.jaxme.xs.types.*;
  +import org.apache.ws.jaxme.xs.xml.XsAnyURI;
   import org.apache.ws.jaxme.xs.xml.XsESchema;
   import org.apache.ws.jaxme.xs.xml.XsQName;
   import org.xml.sax.Attributes;
  @@ -124,6 +125,12 @@
   
     private boolean isValidated;
   
  +  /** <p>Creates a new logical schema by loading data,
  +   * which represents the given syntactical schema
  +   * <code>pSchema</code> and uses the given context
  +   * <code>pContext</code> for acquiring additional
  +   * information.</p>
  +   */
     public XSSchemaImpl(XSContext pContext, XsESchema pSchema) {
       context = pContext;
       syntaxSchema = pSchema;
  @@ -446,7 +453,11 @@
       }
     }
   
  -  public Attributes getOpenAttributes() {
  -    return openAttrs;
  -  }
  +    public Attributes getOpenAttributes() {
  +    	return openAttrs;
  +    }
  +
  +    public XsAnyURI getTargetNamespace() {
  +		return syntaxSchema.getTargetNamespace();
  +	}
   }
  
  
  

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