Package edu.fiu.jtlex.algorithms
Class DisconnectivityProcessor
java.lang.Object
edu.fiu.jtlex.algorithms.DisconnectivityProcessor
- All Implemented Interfaces:
IDisconnectivityProcessor
Default implementation of
IDisconnectivityProcessor
- Since:
- jTLEX 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertMonthToHalf
(int month) Gets the half the month is bounded to out of the 12 months.convertMonthToQuarter
(int month) Gets the quarter the month is bounded to out of the 12 months.getDct
(ITimeMLGraph partition) Gets the document creation timegetTimeExpressions
(ITimeMLGraph partition) Gets a list of time expressionsboolean
hasDct
(ITimeMLGraph partition) Flags if a partition contains a document creation time.boolean
hasTimeExpressions
(ITimeMLGraph partition) Flags if the partition contains time expressions.suggestLinks
(List<ITimeMLGraph> partitions, int linksCount) Suggests a list of possible links that might connect the partition with date creation time with the other partitions.
-
Constructor Details
-
DisconnectivityProcessor
public DisconnectivityProcessor()Creates a new instance- Since:
- jTLEX 1.0
-
-
Method Details
-
getDct
Gets the document creation time- Specified by:
getDct
in interfaceIDisconnectivityProcessor
- Parameters:
partition
- The graph partition- Returns:
- The document creation time
- Throws:
NullPointerException
- If the partition is null- Since:
- jTLEX 1.0
-
hasDct
Flags if a partition contains a document creation time.- Specified by:
hasDct
in interfaceIDisconnectivityProcessor
- Parameters:
partition
- The graph partition.- Returns:
- True if the partition contains a document creation time, false if it doesn't.
- Throws:
NullPointerException
- If partition is null- Since:
- jTLEX 1.0
-
hasTimeExpressions
Flags if the partition contains time expressions.- Specified by:
hasTimeExpressions
in interfaceIDisconnectivityProcessor
- Parameters:
partition
- the nodes are processed from the grab the time expressions.- Returns:
- True if the partition contains time expressions, false if it doesn't.
- Throws:
NullPointerException
- If partition is null- Since:
- jTLEX 1.0
-
getTimeExpressions
Gets a list of time expressions- Specified by:
getTimeExpressions
in interfaceIDisconnectivityProcessor
- Parameters:
partition
- the nodes are processed from the grab the time expressions- Returns:
- A List of timexes
- Throws:
NullPointerException
- If partition is null- Since:
- jTLEX 1.0
-
suggestLinks
Suggests a list of possible links that might connect the partition with date creation time with the other partitions. Only one link per partitions pair is suggested.TODO: Is it possible to keep track of which partitions the link is connecting?
- Specified by:
suggestLinks
in interfaceIDisconnectivityProcessor
- Parameters:
partitions
- A List of partitionslinksCount
- The number of links in the graph- Returns:
- A List with the suggested links to increase connectivity
- Throws:
IllegalArgumentException
- If the graph does not have a date creation time tag.- Since:
- jTLEX 1.0
-
convertMonthToQuarter
Gets the quarter the month is bounded to out of the 12 months.- Specified by:
convertMonthToQuarter
in interfaceIDisconnectivityProcessor
- Parameters:
month
- Month ranging from1-12
- Returns:
- The quarter the month is bounded to: Q1-Q2-Q3-Q4
- Throws:
IllegalArgumentException
- If the month is out of range- Since:
- jTLEX 1.0
-
convertMonthToHalf
Gets the half the month is bounded to out of the 12 months.- Specified by:
convertMonthToHalf
in interfaceIDisconnectivityProcessor
- Parameters:
month
- Month ranging from1-12
- Returns:
- The half the month is bounded to: H1-H2.
- Throws:
IllegalArgumentException
- If the month is out of range- Since:
- jTLEX 1.0
-