edu.upenn.cis.pdtb.xpath
Class CompareSpanListFunction

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

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

Generic SpanList comparisons. This function has the signature:

  boolean comp-splist(string comparisonMethod, node-set setOfL2s, string flags?)
 
The following are valid comparison methods: Any subset of the following flags may be used separated by hyphens: The flags emp, emcp and emnsp exclude cases only if the parent is a relation. While checking if a parent or parents match: the flags ei, ec, eo, eri, ero and erx are negated, i.e., the parent matches if there is identity, overlap, range-identity, ranging-over or range-crossing.

The flag uc works as follows: if the context node is a relation, then the corresponding spanlist is the union of the spanlists of the connective(if any) and it's arguments. If the context node is Arg2 of a relation, then the spanlist is the union of the connective(if any) and Arg2.

The following query selects relations which share an argument exactly with another relation:

 Shared Argument:

 >::*[>::*[is-arg() and 
      comp-splist('identity',/>>::*[is-arg()])]]
 
A detailed discussion of this and other examples can be found off the API Page

Since:
0.2.5
Version:
3 Added several flags, comparison methods and changed range-over to range-contains., 2
Author:
nikhild

Nested Class Summary
 class CompareSpanListFunction.Flags
           
 
Constructor Summary
CompareSpanListFunction()
          Creates a new instance of CompareSpanListFunction
 
Method Summary
 java.lang.Object call(org.jaxen.Context context, java.util.List args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompareSpanListFunction

public CompareSpanListFunction()
Creates a new instance of CompareSpanListFunction

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