xml-xmlbeans-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/compile Java2Schema.java JavaSourceSet.java
Date Sun, 14 Dec 2003 21:48:29 GMT
pcal        2003/12/14 13:48:29

  Modified:    v2/src/binding/org/apache/xmlbeans/impl/binding/compile
                        Java2Schema.java JavaSourceSet.java
  Log:
  deprecate JavaSourceset in Java2Schema
  
  Revision  Changes    Path
  1.21      +11 -6     xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/compile/Java2Schema.java
  
  Index: Java2Schema.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/compile/Java2Schema.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Java2Schema.java	13 Dec 2003 07:56:28 -0000	1.20
  +++ Java2Schema.java	14 Dec 2003 21:48:29 -0000	1.21
  @@ -108,18 +108,24 @@
     private BindingLoader mLoader;
     private SchemaDocument mSchemaDocument;
     private SchemaDocument.Schema mSchema;
  -  private JavaSourceSet mInput;
  +  private JClass[] mClasses;
   
     // =========================================================================
     // Constructors
   
  +  public Java2Schema(JClass[] classesToBind) {
  +    mClasses = classesToBind;
  +  }
  +
     /**
      * Initializes a Java2Schema instance to perform binding on the given
      * inputs, but does not actually do any binding work.
  +   *
  +   * @deprecated Trying to remove JavaSourceSet
      */
     public Java2Schema(JavaSourceSet jtsi) {
       if (jtsi == null) throw new IllegalArgumentException("null jtsi");
  -    mInput = jtsi;
  +    mClasses = jtsi.getJClasses();
     }
   
     // ========================================================================
  @@ -130,20 +136,19 @@
      * out the tylar.
      */
     protected void bind(TylarWriter writer) {
  -    JClass[] classes = mInput.getJClasses();
       mBindingFile = new BindingFile();
       mLoader = PathBindingLoader.forPath
               (new BindingLoader[] {mBindingFile,
                                     BuiltinBindingLoader.getInstance()});
       mSchemaDocument = SchemaDocument.Factory.newInstance();
       mSchema = mSchemaDocument.addNewSchema();
  -    if (classes.length > 0) {
  +    if (mClasses.length > 0) {
         //FIXME how should we determine the targetnamespace for the schema?
         //here we just derive it from the first class in the list
  -      mSchema.setTargetNamespace(getTargetNamespace(classes[0]));
  +      mSchema.setTargetNamespace(getTargetNamespace(mClasses[0]));
       }
       //This does the binding
  -    for(int i=0; i<classes.length; i++) getBindingTypeFor(classes[i]);
  +    for(int i=0; i<mClasses.length; i++) getBindingTypeFor(mClasses[i]);
       //
       try {
         writer.writeBindingFile(mBindingFile);
  
  
  
  1.2       +5 -0      xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/compile/JavaSourceSet.java
  
  Index: JavaSourceSet.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/binding/org/apache/xmlbeans/impl/binding/compile/JavaSourceSet.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JavaSourceSet.java	4 Dec 2003 21:14:55 -0000	1.1
  +++ JavaSourceSet.java	14 Dec 2003 21:48:29 -0000	1.2
  @@ -60,6 +60,11 @@
   
   import java.io.File;
   
  +/**
  + * @deprecated Trying to remove this interface - it's better to build
  + * up a BindingCompiler subclass by setting various properties on it
  + * such as classes, tylar loader.
  + */
   public interface JavaSourceSet
   {
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org


Mime
View raw message