|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.di.mg4j.scratch.GraphFromQuery
public class GraphFromQuery
Solves a given query (in a boolean way), takes the resulting set of document pointers, and then produces a subgraph (of a given graph whose nodes represent document pointers) made of only the arcs stemming from a document in the result set.
| Constructor Summary | |
|---|---|
GraphFromQuery(SimpleParser parser,
Object2ReferenceLinkedOpenHashMap<String,Index> indexMap,
ImmutableGraph graph,
ImmutableGraph grapht,
int maxIn,
int maxOut,
Random random)
Creates an object ready for solving queries. |
|
| Method Summary | |
|---|---|
static SimpleParser |
getParser(Object2ReferenceLinkedOpenHashMap<String,Index> indexMap)
Given an index map, creates and returns a parser. |
static Object2ReferenceLinkedOpenHashMap<String,Index> |
loadIndices(String[] indexBasename)
Loads a set of indices of given basenames, and returns a map from index aliases to indices. |
static void |
main(String[] args)
|
ImmutableGraph |
resolve(Query query)
Solves a query and returns the corresponding graph. |
ImmutableGraph |
resolve(String queryString)
Solves a query and returns the corresponding graph. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphFromQuery(SimpleParser parser,
Object2ReferenceLinkedOpenHashMap<String,Index> indexMap,
ImmutableGraph graph,
ImmutableGraph grapht,
int maxIn,
int maxOut,
Random random)
parser - the parser to be used when solving queries.indexMap - the map from index alias to indices.graph - the graph whence we are going to extract subgraphs.grapht - the transpose graph, only needed if maxIn or maxOut are positive and finite.maxIn - how many nodes should be taken (at most) from the in-neighborhood.maxOut - how many nodes should be taken (at most) from the out-neighborhood.random - the random number generator to be used for selecting neighbors.| Method Detail |
|---|
public ImmutableGraph resolve(Query query)
throws QueryBuilderVisitorException,
IOException
query - the query to be resolved.
QueryBuilderVisitorException
IOException
public ImmutableGraph resolve(String queryString)
throws QueryParserException,
QueryBuilderVisitorException,
IOException
queryString - the query to be resolved.
QueryParserException
QueryBuilderVisitorException
IOException
public static Object2ReferenceLinkedOpenHashMap<String,Index> loadIndices(String[] indexBasename)
throws ConfigurationException,
SecurityException,
IOException,
URISyntaxException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchMethodException
indexBasename - the index basenames.
ConfigurationException
SecurityException
IOException
URISyntaxException
ClassNotFoundException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodExceptionpublic static SimpleParser getParser(Object2ReferenceLinkedOpenHashMap<String,Index> indexMap)
indexMap - the map from index alias to indices.
public static void main(String[] args)
throws com.martiansoftware.jsap.JSAPException,
ConfigurationException,
SecurityException,
IOException,
URISyntaxException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
NoSuchMethodException,
QueryBuilderVisitorException
com.martiansoftware.jsap.JSAPException
ConfigurationException
SecurityException
IOException
URISyntaxException
ClassNotFoundException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
QueryBuilderVisitorException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||