org.biojava.bibliography
Class BiblioCriterion

java.lang.Object
  extended byorg.biojava.bibliography.BiblioCriterion

public class BiblioCriterion
extends java.lang.Object

The criteria define how the matching or ordering should be done during queries.

Version:
$Id: BiblioCriterion.java,v 1.2 2002/02/14 16:27:54 mrp Exp $
Author:
Martin Senger

Field Summary
 java.lang.String forSubset
          A name of a repository subset which this criterion is valid/used for.
 java.lang.String[] mutuallyExclusiveWith
           A list of other criteria names that this criterion is mutually exclusive with.
 java.lang.String name
           Each Criterion is identified by its name.
static int QUERY_CRITERION
           
static int SORT_CRITERION
           
 int type
          The criteria can be used for defining rules for matching (type QUERY_CRITERION), or for ordering (type SORT_CRITERION).
 
Constructor Summary
BiblioCriterion()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY_CRITERION

public static final int QUERY_CRITERION
See Also:
Constant Field Values

SORT_CRITERION

public static final int SORT_CRITERION
See Also:
Constant Field Values

name

public java.lang.String name

Each Criterion is identified by its name. A list of criteria names is used in methods for querying and sorting (see BibRefQuery interface).

The implementations are advised to use descriptive names. For example, the names for matching can be:

     match all words
     match any word
     case insensitive
     case sensitive
     partial word match
     full word match
 
and the names for ordering can be:
      ascending
      descending
 
Another example of how to use Criteria is to allow regular expressions in queries. Not every implementation is supposed to have the capability of matching by regular expressions but those who have can specify (and document), for example, criterion with name regular expression.


type

public int type
The criteria can be used for defining rules for matching (type QUERY_CRITERION), or for ordering (type SORT_CRITERION).


mutuallyExclusiveWith

public java.lang.String[] mutuallyExclusiveWith

A list of other criteria names that this criterion is mutually exclusive with.

For example, a sort criterion ascending will probably have descending in this list.


forSubset

public java.lang.String forSubset
A name of a repository subset which this criterion is valid/used for.

See Also:
BiblioEntryStatus.repositorySubset
Constructor Detail

BiblioCriterion

public BiblioCriterion()