gov.nist.nlpir.irf.query
Class QueryRep
java.lang.Object
|
+--gov.nist.nlpir.irf.query.QueryRep
- public class QueryRep
- extends java.lang.Object
This class manipulates the representation of a query. The query can
either be structured or not. If it is, the queryCollection vector
inside of the QueryRep object starts with a DeString naming the
functor of the query, and contains then the two members of the query.
If it is not, this vector is only a collection of QueryModalityUnits.
- Version:
- $Revision: 1.3 $
- Author:
- This software was produced by NIST, an agency of the U.S. government,
and by statute is not subject to copyright in the United States.
Recipients of this software assume all responsibilities associated
with its operation, modification and maintenance.
Field Summary |
private java.util.Vector |
queryCollection
A vector of QueryModalityUnits and/or vectors of QueryModalityUnits
from the query, representing the relationships between the parts of the
query. |
Constructor Summary |
QueryRep(java.util.Vector IMs,
Combinator Q)
Creates a vector of QueryModalityUnits and/or vectors of
QueryModalityUnits from the Query. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
queryCollection
private java.util.Vector queryCollection
- A vector of QueryModalityUnits and/or vectors of QueryModalityUnits
from the query, representing the relationships between the parts of the
query.
QueryRep
public QueryRep(java.util.Vector IMs,
Combinator Q)
- Creates a vector of QueryModalityUnits and/or vectors of
QueryModalityUnits from the Query.
This structure represents the relationships between the parts of the
query.
- Parameters:
IMs
- Indexing modalities of query documentQ
- An ordered collection for specifying the query structure.
Description of the collection if the query is structured:
0 1 2 3 4
| | | | `DeDouble: the weight of the second feature if it exists
| | | `--DeInteger: the number of the second feature in the IMs Vector
| | | OR a Vector like this one, and then 4 is null.
| | `----DeDouble: the weight of the first feature if it exists
| `------DeInteger: the number of the second feature in the IMs Vector
| OR a Vector like this one, and then 2 is null.
`--------DeString: Functor name.
If the query is unstructured:
0 1 2 3 ad lib
| | | `-DeDouble: Weight of the 2nd Indexing Modality
| | `---DeInteger: Number of the Modality
| `-----DeDouble: Weight of the 1st Indexing Modality
`-------DeInteger: Number of the Modality
isStructuredQuery
public boolean isStructuredQuery()
- Identifies a structured query.
- Returns:
- True/False
isUnstructuredQuery
public boolean isUnstructuredQuery()
- Identifies a unstructured query.
- Returns:
- True/False
getQueryModalityUnit
public QueryModalityUnit getQueryModalityUnit(int n)
- Gets QueryModalityUnit number n.
- Parameters:
n
- Subscript of desired QueryModalityUnit.- Returns:
- The requested QueryModalityUnit or null if not found.
getQueryCollection
public java.util.Vector getQueryCollection()
- Returns a structured Vector of QueryRep and QueryModalityUnits.
See the description of the class for more information.
- Returns:
- a structured vector of QueryRep and QueryModalityUnits.