public class PathFinder
extends Object
Modifier and Type | Field and Description |
---|---|
(package private) ArrayList<BinaryTuple> |
binaries |
(package private) String |
cxtContent |
(package private) String |
filename |
(package private) RepertoryGrid |
grid |
(package private) String |
reportContent |
(package private) boolean |
reportOnlyInputOutputPaths |
(package private) ArrayList<Concept> |
targetConcepts |
Constructor and Description |
---|
PathFinder(RepertoryGrid grid,
ArrayList<BinaryTuple> binaries,
ArrayList<Concept> targetConcepts) |
Modifier and Type | Method and Description |
---|---|
boolean |
addToCurrentPaths(Path path,
BinaryTuple bt,
Concept con)
Add the given path to the list of current paths, if it is not already there.
|
boolean |
belongsInInputOutputReport(Path path)
Whether a path belongs in an input-output report.
|
void |
buildAllPaths()
The main method of this class, which starts the process of building and storing paths.
|
void |
buildPaths(BinaryTuple bt,
Concept con)
Build all possible paths from the binary tuple to the concept.
|
void |
buildPaths(Path possiblePath,
BinaryTuple startingTuple,
Concept con)
Find a path from the concept-relation binary to the given concept.
|
ArrayList<BinaryTuple> |
findConceptInBinaries(Concept con)
Get the list of all binaries with the concept in them.
|
ArrayList<Path> |
getCurrentPaths(BinaryTuple bt,
Concept con)
Accesses the current paths (if any) between a binary tuple and the given
concept.
|
String |
getCxtContent() |
String |
getFilename()
The filename of the graph being analyzed.
|
String |
getReportContent() |
static boolean |
isInput(Concept c)
Is the given concept an "input" concept as defined in the CGFCA world.
|
static boolean |
isOutput(Concept c)
Is the given concept an "output" concept as defined in the CGFCA world.
|
boolean |
isPathAlreadyInList(Path path,
ArrayList<Path> paths)
Test whether a path list already contains the given path.
|
boolean |
isReportOnlyInputOutputPaths()
Should reporting of paths only include ones with "input" and "output" concepts as terminals (also cycles).
|
void |
pruneCycles()
Look for cycles in every cell, and if one is found, remove its equivalent
cycle in any other cell in which it appears.
|
void |
setFilename(String filename) |
void |
setReportOnlyInputOutputPaths(boolean reportOnlyInputOutputPaths) |
RepertoryGrid grid
ArrayList<BinaryTuple> binaries
ArrayList<Concept> targetConcepts
String cxtContent
String reportContent
String filename
boolean reportOnlyInputOutputPaths
public PathFinder(RepertoryGrid grid, ArrayList<BinaryTuple> binaries, ArrayList<Concept> targetConcepts)
public boolean isReportOnlyInputOutputPaths()
public void setReportOnlyInputOutputPaths(boolean reportOnlyInputOutputPaths)
public String getFilename()
public void setFilename(String filename)
public ArrayList<Path> getCurrentPaths(BinaryTuple bt, Concept con)
bt
- con
- public boolean addToCurrentPaths(Path path, BinaryTuple bt, Concept con)
path
- the path to addbt
- con
- Path.equals(cgfca.Path)
public boolean belongsInInputOutputReport(Path path)
path
- public String getReportContent()
public String getCxtContent()
public void buildAllPaths()
grid
- binaries
- targetConcepts
- public void buildPaths(BinaryTuple bt, Concept con)
bt
- con
- public void buildPaths(Path possiblePath, BinaryTuple startingTuple, Concept con)
possiblePath
- contains a path ending in the binary tuple that's the
argumentstartingTuple
- The original tuple that started this path. It is used
for determining which column the path belongs in.c2
- public static boolean isOutput(Concept c)
c
- public static boolean isInput(Concept c)
c
- public ArrayList<BinaryTuple> findConceptInBinaries(Concept con)
con
- public boolean isPathAlreadyInList(Path path, ArrayList<Path> paths)
path
- The path to testpaths
- A list of pathsObject.equals(java.lang.Object)
public void pruneCycles()