public class BinaryTuple
extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BinaryTuple.TupleComparator |
Modifier and Type | Field and Description |
---|---|
Concept |
concept1
The actual first ("left hand") concept associated with this tuple.
|
String |
concept1_label
Complete text (including referent, etc.) of first ("left-hand") concept.
|
Concept |
concept2
The actual second ("right hand") concept associated with this tuple.
|
String |
concept2_label
Complete text (including referent, etc.) of second ("right-hand") concept.
|
GNode |
relation
The actual relation (or actor) associated with this tuple.
|
String |
relation_label
Text label of the relation.
|
String |
sentence
Crude representation of tuple as an English sentence.
|
Constructor and Description |
---|
BinaryTuple() |
BinaryTuple(ArrayList v)
Create the tuple from a makeTableEntry ArrayList form (the one used for DefaultTableModel):
element 0 - phrase,
element 1 - concept label,
element 2 - relation label,
element 3 - concept label,
element 4 - actual 1st (CharGer) concept
element 5 - actual (CharGer) relation
element 6 - actual 2nd (CharGer) concept
|
BinaryTuple(Concept c1,
GNode r,
Concept c2) |
Modifier and Type | Method and Description |
---|---|
Concept |
getFromConcept() |
GNode |
getRelation() |
Concept |
getToConcept() |
static ArrayList<String> |
getTupleColumnLabels()
Returns the colum header labels when gathering tuples from subgraphs.
|
void |
setFromConcept(Concept concept1) |
void |
setRelation(GNode relation) |
void |
setToConcept(Concept concept2) |
ArrayList |
toArrayList()
For compatibility with the old ConceptManager routines, as well as provide
easy interface to DefaultTableModel which likes its model in ArrayList form.
|
String |
toHTML()
Converts this binary tuple to an HTML-compatible TABLE row; TABLE and TR tags must be
provided external to this routine.
|
String |
toString() |
public String sentence
public String concept1_label
public String relation_label
public String concept2_label
public Concept concept1
public GNode relation
public Concept concept2
public BinaryTuple()
public BinaryTuple(ArrayList v)
public static ArrayList<String> getTupleColumnLabels()
ConceptManager.getBinaryRelationTuples(charger.obj.Graph, kb.ConceptManager.ConceptsToInclude)
,
ConceptManager.getAllRelationTuples(kb.ConceptManager.ConceptsToInclude)
public ArrayList toArrayList()
ConceptManager.makeTableEntryArrayList(charger.obj.Concept, charger.obj.GNode, charger.obj.Concept, kb.ConceptManager.ConceptsToInclude)
public String toHTML()
public String toString()
toString
in class Object
public Concept getFromConcept()
public void setFromConcept(Concept concept1)
public GNode getRelation()
public void setRelation(GNode relation)
public Concept getToConcept()
public void setToConcept(Concept concept2)