Class Partitioner

java.lang.Object
edu.fiu.jtlex.data.Partitioner
All Implemented Interfaces:
IPartitioner

public class Partitioner
extends java.lang.Object
implements IPartitioner
Class used to partition an input TimeML temporal graph into main subgraph and subordinating subgraphs. TimeML graphs are split by trimming all instances of ILinks that are of type SLinkType and then reassembling the graphs using edges.
Author:
Emmanuel Garcia
  • Constructor Summary

    Constructors 
    Constructor Description
    Partitioner()  
  • Method Summary

    Modifier and Type Method Description
    java.util.ArrayList<IGraph> classifyGraphs​(java.util.ArrayList<IGraph> graphs)
    Finds the graph with the most nodes and classifies it as a MainGraph and set the others to a subordination graph.
    java.util.ArrayList<IGraph> partitionGraph​(IGraph timeMLGraph)
    Returns a list of partitioned subgraphs.
    java.util.Set<ILink> partitionLinks()
    This method returns the set of partition links (solo subordination timelinks).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • partitionGraph

      public java.util.ArrayList<IGraph> partitionGraph​(IGraph timeMLGraph)
      Returns a list of partitioned subgraphs.

      This method takes a TimeML graph, removes all the Subordination type links, then reassembles the graph, and finally returns an array of the partitioned subgraphs.

      Specified by:
      partitionGraph in interface IPartitioner
      Parameters:
      timeMLGraph - the main TimeML graph to be partitioned.
      Returns:
      an ArrayList<IGraph> of partitioned subgraphs
    • classifyGraphs

      public java.util.ArrayList<IGraph> classifyGraphs​(java.util.ArrayList<IGraph> graphs)
      Finds the graph with the most nodes and classifies it as a MainGraph and set the others to a subordination graph.
      Specified by:
      classifyGraphs in interface IPartitioner
      Parameters:
      graphs - the list of graphs to be classified.
      Returns:
      the classified graphs.
    • partitionLinks

      public java.util.Set<ILink> partitionLinks()
      This method returns the set of partition links (solo subordination timelinks).

      These links are obtained from partitioning a TimeML graph. This method can only be used AFTER partitionGraph(IGraph) has been used to partition a graph.

      Specified by:
      partitionLinks in interface IPartitioner
      Returns:
      set of partition links (solo subordination timelinks).