MarkLogic Connector for Hadoop 1.1-3

com.marklogic.mapreduce.functions
Class ElemValueCooccurrences

java.lang.Object
  extended by com.marklogic.mapreduce.functions.LexiconFunction
      extended by com.marklogic.mapreduce.functions.CooccurrencesFunction
          extended by com.marklogic.mapreduce.functions.ElemValueCooccurrences

public abstract class ElemValueCooccurrences
extends CooccurrencesFunction

Wrapper class for the cts:element-value-co-occurrences lexicon function. Subclass this class to generate map input based on a lexicon.

Use this class with KeyValueInputFormat or ValueInputFormat.

To generate map input from the lexicon function, create a subclass of this class and provide implementations of the methods that correspond to the function parameters you want to include in the call.

For details, see "Using a Lexicon to Generate Key-Value Pairs" in the MarkLogic Connector for Hadoop Developer's Guide. For an example, see LinkCountCooccurrences.

All co-occurrences functions using this API do NOT preserve frequency order even if "frequency-order" option is specified.


Constructor Summary
ElemValueCooccurrences()
           
 
Method Summary
abstract  String getElementName1()
          Get the value for the $element-name-1 parameter to the lexicon function call, as a string.
abstract  String getElementName2()
          Get the value for the $element-name-2 parameter to the lexicon function call, as a string.
 
Methods inherited from class com.marklogic.mapreduce.functions.CooccurrencesFunction
getInputQuery
 
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

ElemValueCooccurrences

public ElemValueCooccurrences()
Method Detail

getElementName1

public abstract String getElementName1()
Get the value for the $element-name-1 parameter to the lexicon function call, as a string. The returned string must evaluate to an xs:QName when evaluated as XQuery. For example: "xs:QName(\"wp:a\")".

Returns:
first element QName.

getElementName2

public abstract String getElementName2()
Get the value for the $element-name-2 parameter to the lexicon function call, as a string. The returned string must evaluate to an xs:QName when evaluated as XQuery. For example: "xs:QName(\"wp:a\")".

Returns:
first element QName.

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