Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]

    1   /*   Copyright 2004 The Apache Software Foundation
    2    *
    3    *   Licensed under the Apache License, Version 2.0 (the "License");
    4    *   you may not use this file except in compliance with the License.
    5    *   You may obtain a copy of the License at
    6    *
    7    *       http://www.apache.org/licenses/LICENSE-2.0
    8    *
    9    *   Unless required by applicable law or agreed to in writing, software
   10    *   distributed under the License is distributed on an "AS IS" BASIS,
   11    *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   12    *   See the License for the specific language governing permissions and
   13    *  limitations under the License.
   14    */
   15   
   16   package org.apache.xmlbeans;
   17   
   18   import javax.xml.namespace.QName;
   19   
   20   import java.util.Set;
   21   
   22   /**
   23    * Represents a lattice of finite and infinite sets of QNames.
   24    * 
   25    * @see QNameSet
   26    */
   27   public interface QNameSetSpecification
   28   {
   29       /**
   30        * True if the set contains the given QName.
   31        *
   32        * Roughly equivalent to:
   33        *    (includedURIs() == null ?
   34        *           excludedURIs().contains(namespace) :
   35        *           includedURIs().contains(namespace)
   36        *    ) ?
   37        *        !excludedQNamesInIncludedURIs().contains(name) :
   38        *         includedQNamesInExcludedURIs().contains(name)
   39        */
   40       boolean contains(QName name);
   41   
   42       /**
   43        * True if the set is the set of all QNames.
   44        */
   45       boolean isAll();
   46   
   47       /**
   48        * True if the set is empty.
   49        */
   50       boolean isEmpty();
   51   
   52       /**
   53        * True if the parameter is a subset of this set.
   54        */ 
   55       boolean containsAll(QNameSetSpecification set);
   56       
   57       /**
   58        * True if is disjoint from the specified set.
   59        */
   60       boolean isDisjoint(QNameSetSpecification set);
   61   
   62       /**
   63        * Returns the intersection with another QNameSet.
   64        */
   65       QNameSet intersect(QNameSetSpecification set);
   66   
   67       /**
   68        * Returns the union with another QNameSet.
   69        */
   70       QNameSet union(QNameSetSpecification set);
   71   
   72       /**
   73        * Return the inverse of this QNameSet. That is the QNameSet which
   74        * contains all the QNames not contained in this set. In other words
   75        * for which set.contains(name) != set.inverse().contains(name) for
   76        * all names.
   77        */
   78       QNameSet inverse();
   79   
   80       /**
   81        * The finite set of namespace URIs that are almost completely excluded from
   82        * the set (that is, each namespace URI that included in the set with with
   83        * a finite number of QName exceptions). Null if the set of namespaceURIs
   84        * that are almost completely included is infinite.
   85        * <p>
   86        * Null (meaning almost all URIs excluded) if includedURIs() is non-null;
   87        * non-null otherwise.
   88        * <p>
   89        * The same set as inverse().includedURIs().
   90        */
   91       Set excludedURIs();
   92   
   93       /**
   94        * The finite set of namespace URIs that are almost completely included in
   95        * the set (that is, each namespace URI that included in the set with with
   96        * a finite number of QName exceptions). Null if the set of namespaceURIs
   97        * that are almost completely included is infinite.
   98        * <p>
   99        * Null (meaning almost all URIs included) if excludedURIs() is non-null;
  100        * non-null otherwise.
  101        * <p>
  102        * The same as inverse.excludedURIs().
  103        */
  104       Set includedURIs();
  105   
  106       /**
  107        * The finite set of QNames that are excluded from the set within namespaces
  108        * that are otherwise included. Should only contain QNames within namespace
  109        * that are within the set includedURIs() (or any URI, if includedURIs()
  110        * is null, which means that all URIs are almost completely included).
  111        * <p>
  112        * Never null.
  113        * <p>
  114        * The same set as inverse().includedQNames().
  115        */
  116       Set excludedQNamesInIncludedURIs();
  117   
  118       /**
  119        * The finite set of QNames that are included in the set within namespaces
  120        * that are otherwise excluded. Should only contain QNames within namespace
  121        * that are within the set excludedURIs() (or any URI, if excludedURIs()
  122        * is null, which means that all URIs are almost completely excluded).
  123        * <p>
  124        * Never null.
  125        * <p>
  126        * The same as inverse().excludedQNames().
  127        */
  128       Set includedQNamesInExcludedURIs();
  129   }

Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]