Class InconsistencyDetector

java.lang.Object
edu.fiu.jtlex.data.InconsistencyDetector
All Implemented Interfaces:
IInconsistency

public class InconsistencyDetector
extends java.lang.Object
implements IInconsistency
Default implementation of IInconsistency.
Author:
Luis Robaina, Emmanuel Garcia, Franklin Bello
  • Constructor Summary

    Constructors 
    Constructor Description
    InconsistencyDetector()  
  • Method Summary

    Modifier and Type Method Description
    java.util.Set<IGraph> generateInconsistentSubgraphs​(IGraph timeMLGraph)
    Given a TimeML graph generates a set of subgraphs that contain all the links and nodes involved in the inconsistencies.
    java.util.Set<IGraph> generateSelfLoopingSubGraphs​(java.util.Set<ILink> links)
    Given a set of links, identifies which are inconsistent self references, and produces a subgraph for each instance.
    boolean isConsistent​(IGraph timeMLGraph)
    A static method to verify the consistency of a graph.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • isConsistent

      public boolean isConsistent​(IGraph timeMLGraph)
      A static method to verify the consistency of a graph. This is done by trying to solve the TCSP presented by the graphs links and nodes. If there is a solution to the TCSP then the graph is consistent, otherwise is inconsistent.
      Specified by:
      isConsistent in interface IInconsistency
      Parameters:
      timeMLGraph - A timeML graph object with a non empty set of nodes.
      Returns:
      true if the graph is consistent, false if the graph is inconsistent.
    • generateSelfLoopingSubGraphs

      public java.util.Set<IGraph> generateSelfLoopingSubGraphs​(java.util.Set<ILink> links)
      Given a set of links, identifies which are inconsistent self references, and produces a subgraph for each instance.
      Parameters:
      links - A set of links.
      Returns:
      A set of IGraphs, each containing inconsistent self looping nodes.
      Throws:
      java.lang.NullPointerException - If links is null.
    • generateInconsistentSubgraphs

      public java.util.Set<IGraph> generateInconsistentSubgraphs​(IGraph timeMLGraph)
      Given a TimeML graph generates a set of subgraphs that contain all the links and nodes involved in the inconsistencies.
      Specified by:
      generateInconsistentSubgraphs in interface IInconsistency
      Parameters:
      timeMLGraph - TimeML graph to evaluate.
      Returns:
      A set containing the inconsistent subgraphs.