Package edu.fiu.jtlex.data
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.booleanisConsistent(IGraph timeMLGraph)A static method to verify the consistency of a graph.
-
Constructor Details
-
InconsistencyDetector
public InconsistencyDetector()
-
-
Method Details
-
isConsistent
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:
isConsistentin interfaceIInconsistency- 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
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
Given a TimeML graph generates a set of subgraphs that contain all the links and nodes involved in the inconsistencies.- Specified by:
generateInconsistentSubgraphsin interfaceIInconsistency- Parameters:
timeMLGraph- TimeML graph to evaluate.- Returns:
- A set containing the inconsistent subgraphs.
-