MarkLogic Connector for Hadoop 1.1-3

com.marklogic.mapreduce.functions
Class ValuesOrWordsFunction

java.lang.Object
  extended by com.marklogic.mapreduce.functions.LexiconFunction
      extended by com.marklogic.mapreduce.functions.ValuesOrWordsFunction
Direct Known Subclasses:
Collections, ElementAttributeValues, ElementAttributeWords, ElementValues, ElementWords, FieldValues, FieldWords, Uris, Values, Words

public abstract class ValuesOrWordsFunction
extends LexiconFunction

Super class for wrapper classes for supported values and words lexicon functions, such as cts:element-values.


Constructor Summary
ValuesOrWordsFunction()
           
 
Method Summary
 String getInputQuery(Collection<String> nsCol, long start, long count)
          Get the input query used by a record reader.
 String getStart()
          Get the starting value for the function.
 
Methods inherited from class com.marklogic.mapreduce.functions.LexiconFunction
getLexiconQuery, getUserDefinedOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValuesOrWordsFunction

public ValuesOrWordsFunction()
Method Detail

getStart

public String getStart()
Get the starting value for the function.

This method corresponds to the $start parameter value of a lexicon function. Override the method to specify a lexicon starting position other than the default.

The returned value must have the expected type when evaluated as XQuery. Therefore, if the data type of the start value is xs:string, the returned string must include escaped double quotes. For example, if the start value should be the string "foo" in XQuery, return "\"foo\"".

Returns:
the starting value for the function.

getInputQuery

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

Specified by:
getInputQuery in class LexiconFunction
Parameters:
nsCol - alias-URI pairs of namespace specs
start - start of the split
count - count of the split
Returns:
input query.

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