org.galagosearch.core.retrieval.query
Class NodeType

java.lang.Object
  extended by org.galagosearch.core.retrieval.query.NodeType

public class NodeType
extends java.lang.Object

A NodeType describes the class type and input types of an iterator.

Traversals that modify a tree may want to know what type of iterator will be generated when a Node is converted into a StructuredIterator. For instance, a Node with a "counts" operator will turn into a ExtentListIterator. This is important to know because a ScoreCombinationIterator can't take an ExtentListIterator as an argument; it needs an iterator between them to convert extents into scores. A Traversal can check the types of "counts" and "combine", notice the type mismatch, and add a "#feature" node between them so that the types match.

Author:
trevor

Constructor Summary
NodeType(java.lang.Class<? extends StructuredIterator> nodeClass)
           
 
Method Summary
 java.lang.reflect.Constructor getConstructor()
           
 java.lang.Class[] getInputs()
           
 java.lang.Class<? extends StructuredIterator> getIteratorClass()
           
 java.lang.Class[] getParameterTypes(int length)
           
 boolean isStructuredIteratorOrArray(java.lang.Class c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeType

public NodeType(java.lang.Class<? extends StructuredIterator> nodeClass)
Method Detail

getIteratorClass

public java.lang.Class<? extends StructuredIterator> getIteratorClass()

getInputs

public java.lang.Class[] getInputs()
                            throws java.lang.Exception
Throws:
java.lang.Exception

getParameterTypes

public java.lang.Class[] getParameterTypes(int length)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

isStructuredIteratorOrArray

public boolean isStructuredIteratorOrArray(java.lang.Class c)

getConstructor

public java.lang.reflect.Constructor getConstructor()
                                             throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2009. All Rights Reserved.