edu.upenn.cis.pdtb.xpath
Class DelimTextFunction

java.lang.Object
  extended byedu.upenn.cis.pdtb.xpath.DelimTextFunction
All Implemented Interfaces:
org.jaxen.Function

public class DelimTextFunction
extends java.lang.Object
implements org.jaxen.Function

Transforms the raw text into delimited blocks, one for each span. This function has the signature:

   string delim-text()
 
If the context node has multiple spans, then the spans are concatenated with #### as delimiter. This is perhaps useful in conjunction with the regexp function to search for text patterns within a span.

Author:
nikhild

Constructor Summary
DelimTextFunction()
          Creates a new instance of DelimTextFunction
 
Method Summary
 java.lang.Object call(org.jaxen.Context context, java.util.List args)
           
 java.lang.String getRawText(java.lang.String rawText, SpanList spans)
           
 java.lang.String getTextForNode(PDTBNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelimTextFunction

public DelimTextFunction()
Creates a new instance of DelimTextFunction

Method Detail

call

public java.lang.Object call(org.jaxen.Context context,
                             java.util.List args)
                      throws org.jaxen.FunctionCallException
Specified by:
call in interface org.jaxen.Function
Throws:
org.jaxen.FunctionCallException

getTextForNode

public java.lang.String getTextForNode(PDTBNode node)

getRawText

public java.lang.String getRawText(java.lang.String rawText,
                                   SpanList spans)