filter.java

来自「CmisJavaApi」· Java 代码 · 共 99 行

JAVA
99
字号
/* * The contents of this file are subject to the Dyade Public License,  * as defined by the file DYADE_PUBLIC_LICENSE.TXT * * You may not use this file except in compliance with the License. You may * obtain a copy of the License on the Dyade web site (www.dyade.fr). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific terms governing rights and limitations under the License. * * The Original Code is CmisJava API, including the java package  * fr.dyade.cmis, released September 5, 2000. * * The Initial Developer of the Original Code is Dyade. The Original Code and * portions created by Dyade are Copyright Bull and Copyright INRIA.  * All Rights Reserved. *//*      Copyright 1996-2000 by Institut National de Recherche en Informatique  *                             et en Automatique (INRIA) *          All rights reserved.  See COPYRIGHT in top-level directory. * *      Authors: Laurent Andrey, Eric Dillon, Olivier Festor *///---------------------------------------------------------------------------////  CVS Info//---------------------------------------------------------------------------//////  $Id: Filter.java,v 1.2 2000/09/05 13:30:40 festor Exp $//  $Source: /local/resedas/CVS-Repository/CmisJavaApi/src/fr/dyade/cmis/api/types/Filter.java,v $//---------------------------------------------------------------------------////  Todo//---------------------------------------------------------------------------////package fr.dyade.cmis.api.types;import java.util.Enumeration;import java.util.Vector;/**   * Java representation for an ASN.1 Filter datatype.  * <p>  * The implementation provides 4 static constructors to build a CMIS Filter:  * <menu>  *    <li> <a href="#FILTER_ITEM">FILTER_ITEM</a>, to build the basic component of a <code>Filter</code>  *    <li> <a href="#FILTER_AND">FILTER_AND</a>, to build a "AND" Filter out of a Java <code>Vector</code> of Filters,  *    <li> <a href="#FILTER_AND">FILTER_OR</a>, to build a "OR" Filter out of a Java <code>Vector</code> of Filters,  *    <li> <a href="#FILTER_AND">FILTER_NOT</a>, to build a "NOT" Filter out of a <code>Filter</code>.  * </menu>  *  * As a consequence, to build a <code>Filter</code> the user may use the following kind of code:<br>  *<code>Filter myFilter = Filter.FILTER_NOT(otherFilter);</code><br>  *  * @see fr.dyade.cmis.api.types.FilterItem  * TODO: Is derived classes business is a good idea ? Would we keep some static object factory methods ?  * as in FilterItem ? For now we provide the  both !!  * @version cvs $Id: Filter.java,v 1.2 2000/09/05 13:30:40 festor Exp $  */abstract public class Filter extends CMISType {      // the different values of the discriminant. Remark: those are NOT X711 asn1 choice cases (see X711 pg 21)      public static final short FILTER_ITEM_CODE = 1; // 8  (X711)      public static final short FILTER_AND_CODE  = 2; // 9  (X711)      public static final short FILTER_OR_CODE   = 3; // 10 (X711)      public static final short FILTER_NOT_CODE  = 4; // 11 (X711)            protected Filter() {	 super();      }      /** Get tag for actual class.	* @return one of the Filter.FILTER_XXXX_CODE accordingly to	* the actual class of this object.	*/      public abstract short getCode();      public final static Filter FILTER_ITEM( FilterItem pFilterItem ) {	 return new Filter_ITEM(pFilterItem);      }      public final static Filter FILTER_AND( Filter p1, Filter p2 ) {	 return new Filter_AND(p1, p2);      }      public final static Filter FILTER_AND( Filter p1, Filter p2, Filter p3 ) {	 return new Filter_AND(p1, p2, p3);      }      public final static Filter FILTER_OR( Filter p1, Filter p2 ) {	 return new Filter_OR(p1, p2);      }      public final static Filter FILTER_OR( Filter p1, Filter p2, Filter p3 ) {	 return new Filter_OR(p1, p2, p3);      }      public final static Filter FILTER_NOT( Filter pNotFilter ) {	 return new Filter_NOT(pNotFilter);      }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?