MarkLogic Connector for Hadoop 1.1-3

com.marklogic.mapreduce.functions
Class LexiconFunction

java.lang.Object
  extended by com.marklogic.mapreduce.functions.LexiconFunction
Direct Known Subclasses:
CooccurrencesFunction, ValueOrWordMatchFunction, ValuesOrWordsFunction

public abstract class LexiconFunction
extends Object

Super class for all supported lexicon functions. MarkLogicInputFormat and MarkLogicRecordReader get the input query and split query from these classes when a lexicon function is specified in the config by setting input.lexiconfunctionclass.


Constructor Summary
LexiconFunction()
           
 
Method Summary
abstract  String getInputQuery(Collection<String> nsCol, long start, long count)
          Get the input query used by a record reader.
 String getLexiconQuery()
          Get the cts:query specified by the user as part of the lexicon function to filter fragments used to retrieve the lexicons.
 String[] getUserDefinedOptions()
          Get user-defined options for the lexicon function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LexiconFunction

public LexiconFunction()
Method Detail

getLexiconQuery

public String getLexiconQuery()
Get the cts:query specified by the user as part of the lexicon function to filter fragments used to retrieve the lexicons.

This corresponds to the $query parameter of a lexicon function. Users may override this method if the default is not suitable.

Returns:
cts:query.

getInputQuery

public abstract String getInputQuery(Collection<String> nsCol,
                                     long start,
                                     long count)
Get the input query used by a record reader. Users must not override this method.

Parameters:
nsCol - alias-URI pairs of namespace specs
start - start of the split
count - count of the split
Returns:
input query.

getUserDefinedOptions

public String[] getUserDefinedOptions()
Get user-defined options for the lexicon function.

This method corresponds to the $options parameter of a lexicon function. Override this method to pass options to the lexicon function. The options skip and truncate are reserved for internal use by the connector.


MarkLogic Connector for Hadoop 1.1-3

Copyright © 2013 MarkLogic Corporation. All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com