You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2001/09/20 23:49:51 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl/validation/models CMAny.java CMBinOp.java CMLeaf.java CMNode.java CMStateSet.java CMUniOp.java

neilg       01/09/20 14:49:51

  Modified:    java/src/org/apache/xerces/impl/validation/models CMAny.java
                        CMBinOp.java CMLeaf.java CMNode.java
                        CMStateSet.java CMUniOp.java
  Log:
  had to loosen access restrictions in various places so that separation between schema and DTD content models could be maintained and yet some reuse of common code--like the CMNode and CMSTateSet classes--could be maintained.
  
  Revision  Changes    Path
  1.3       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMAny.java
  
  Index: CMAny.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMAny.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CMAny.java	2001/08/23 00:35:30	1.2
  +++ CMAny.java	2001/09/20 21:49:51	1.3
  @@ -63,7 +63,7 @@
   /**
    * Content model any node.
    *
  - * @version $Id: CMAny.java,v 1.2 2001/08/23 00:35:30 lehors Exp $
  + * @version $Id: CMAny.java,v 1.3 2001/09/20 21:49:51 neilg Exp $
    */
   public class CMAny
       extends CMNode {
  @@ -137,7 +137,7 @@
   
       // package
   
  -    boolean isNullable() 
  +    public boolean isNullable() 
       {
           // Leaf nodes are never nullable unless its an epsilon node
           return (fPosition == -1);
  
  
  
  1.3       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMBinOp.java
  
  Index: CMBinOp.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMBinOp.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CMBinOp.java	2001/08/23 00:35:30	1.2
  +++ CMBinOp.java	2001/09/20 21:49:51	1.3
  @@ -63,7 +63,7 @@
    *
    * Content model Bin-Op node.
    *
  - * @version $Id: CMBinOp.java,v 1.2 2001/08/23 00:35:30 lehors Exp $
  + * @version $Id: CMBinOp.java,v 1.3 2001/09/20 21:49:51 neilg Exp $
    */
   public class CMBinOp extends CMNode
   {
  @@ -104,7 +104,7 @@
       // -------------------------------------------------------------------
       //  Package, inherited methods
       // -------------------------------------------------------------------
  -    boolean isNullable() 
  +    public boolean isNullable() 
       {
           //
           //  If its an alternation, then if either child is nullable then
  
  
  
  1.3       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMLeaf.java
  
  Index: CMLeaf.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMLeaf.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CMLeaf.java	2001/08/23 00:35:30	1.2
  +++ CMLeaf.java	2001/09/20 21:49:51	1.3
  @@ -63,7 +63,7 @@
   /**
    * Content model leaf node.
    *
  - * @version $Id: CMLeaf.java,v 1.2 2001/08/23 00:35:30 lehors Exp $
  + * @version $Id: CMLeaf.java,v 1.3 2001/09/20 21:49:51 neilg Exp $
    */
   public class CMLeaf 
       extends CMNode {
  @@ -128,7 +128,7 @@
   
       // package
   
  -    boolean isNullable() 
  +    public boolean isNullable() 
       {
           // Leaf nodes are never nullable unless its an epsilon node
           return (fPosition == -1);
  
  
  
  1.3       +9 -6      xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMNode.java
  
  Index: CMNode.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CMNode.java	2001/08/23 00:35:30	1.2
  +++ CMNode.java	2001/09/20 21:49:51	1.3
  @@ -60,14 +60,14 @@
   /**
    * A content model node.
    *
  - * @version $Id: CMNode.java,v 1.2 2001/08/23 00:35:30 lehors Exp $
  + * @version $Id: CMNode.java,v 1.3 2001/09/20 21:49:51 neilg Exp $
    */
   public abstract class CMNode
   {
       // -------------------------------------------------------------------
       //  Constructors
       // -------------------------------------------------------------------
  -    CMNode(int type) 
  +    protected CMNode(int type) 
       {
           fType = type;
       }
  @@ -76,18 +76,20 @@
       // -------------------------------------------------------------------
       //  Package, abstract methods
       // -------------------------------------------------------------------
  -    abstract boolean isNullable() ;
  +    // made this public so it could be implemented and used outside this package -neilg.
  +    public abstract boolean isNullable() ;
   
   
       // -------------------------------------------------------------------
       //  Package final methods
       // -------------------------------------------------------------------
  -    final int type()
  +    protected final int type()
       {
           return fType;
       }
   
  -    final CMStateSet firstPos() 
  +    // made this public so it could be implemented and used outside this package -neilg.
  +    public final CMStateSet firstPos() 
       {
           if (fFirstPos == null)
           {
  @@ -97,7 +99,8 @@
           return fFirstPos;
       }
   
  -    final CMStateSet lastPos() 
  +    // made this public so it could be implemented and used outside this package -neilg.
  +    public final CMStateSet lastPos() 
       {
           if (fLastPos == null)
           {
  
  
  
  1.3       +13 -6     xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMStateSet.java
  
  Index: CMStateSet.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMStateSet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CMStateSet.java	2001/08/23 00:35:30	1.2
  +++ CMStateSet.java	2001/09/20 21:49:51	1.3
  @@ -74,7 +74,9 @@
    *
    * @version
    */
  -class CMStateSet
  +// made this class public so it can be accessed by
  +// the XS content models from the schema package -neilg.
  +public class CMStateSet
   {
       // -------------------------------------------------------------------
       //  Constructors
  @@ -134,7 +136,8 @@
       // -------------------------------------------------------------------
       //  Package final methods
       // -------------------------------------------------------------------
  -    final void intersection(CMStateSet setToAnd)
  +// the XS content models from the schema package -neilg.
  +    public final void intersection(CMStateSet setToAnd)
       {
           if (fBitCount < 65)
           {
  @@ -208,7 +211,8 @@
           return true;
       }
   
  -    final void union(CMStateSet setToOr)
  +// the XS content models from the schema package -neilg.
  +    public final void union(CMStateSet setToOr)
       {
           if (fBitCount < 65)
           {
  @@ -222,7 +226,7 @@
           }
       }
   
  -    final void setBit(int bitToSet) 
  +    public final void setBit(int bitToSet) 
       {
           if (bitToSet >= fBitCount)
               throw new RuntimeException("ImplementationMessages.VAL_CMSI");
  @@ -253,7 +257,8 @@
           }
       }
   
  -    final void setTo(CMStateSet srcSet) 
  +// the XS content models from the schema package -neilg.
  +    public final void setTo(CMStateSet srcSet) 
       {
           // They have to be the same size
           if (fBitCount != srcSet.fBitCount)
  @@ -271,7 +276,9 @@
           }
       }
   
  -    final void zeroBits()
  +    // had to make this method public so it could be accessed from
  +    // schema package - neilg.
  +    public final void zeroBits()
       {
           if (fBitCount < 65)
           {
  
  
  
  1.3       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMUniOp.java
  
  Index: CMUniOp.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/validation/models/CMUniOp.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CMUniOp.java	2001/08/23 00:35:30	1.2
  +++ CMUniOp.java	2001/09/20 21:49:51	1.3
  @@ -63,7 +63,7 @@
    *
    * Content model Uni-Op node.
    *
  - * @version $Id: CMUniOp.java,v 1.2 2001/08/23 00:35:30 lehors Exp $
  + * @version $Id: CMUniOp.java,v 1.3 2001/09/20 21:49:51 neilg Exp $
    */
   public class CMUniOp extends CMNode
   {
  @@ -99,7 +99,7 @@
       // -------------------------------------------------------------------
       //  Package, inherited methods
       // -------------------------------------------------------------------
  -    boolean isNullable() 
  +    public boolean isNullable() 
       {
           //
           //  For debugging purposes, make sure we got rid of all non '*'
  
  
  

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