public class Dyad
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable
Dyad
is a pair of Individual
s who have a named
relationship; this class captures all the information we need about any
particular dyad in order to compare it with other dyads or with
library definitions.Modifier and Type | Field and Description |
---|---|
int |
addrOrRef
addrOrRef is either REF (0) or ADDR (1). |
Individual |
alter
ego and alter are the 2 people who are related; they are the end-points
in the graph of this dyad. |
boolean |
challenged
challenged = true means this dyad has been added to an Anomaly |
boolean |
confirmed
confirmed = true means User has confirmed this Dyad is reliable. |
Individual |
ego
ego and alter are the 2 people who are related; they are the end-points
in the graph of this dyad. |
java.lang.String |
kinTerm
kinTerm is the name of the relationship between Ego and Alter. |
int |
kinTermType
kinTermType is PRIMARY (0), or EXTENDED(1). |
int |
level
Level means the generation of Alter in Ego's family tree.
|
java.util.ArrayList<java.lang.Object> |
path
path is a list of all the individuals between Ego and Alter. |
java.lang.String |
pcString
pcString is a concatenation of all the link-types followed along the path between Ego and Alter. |
java.lang.String |
pcStringStructural
pcStringStructural is a concatenation of the gender-neutral link-types followed between Ego and Alter. |
Constructor and Description |
---|
Dyad()
The zero-arg constructor initializes the path ArrayList <Object > and leaves all other fields blank.
|
Dyad(Dyad model)
The cloning constructor replicates the input Dyad.
|
Dyad(Individual person)
The 1-arg constructor initializes the path ArrayList
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object obj)
Provide a method of comparing 2 Dyads for use in TreeMaps and TreeSets.
|
boolean |
equals(java.lang.Object o) |
static java.util.ArrayList<Dyad> |
makeDyads(Node nod,
Individual egoo) |
void |
makePath(java.util.ArrayList<java.lang.Object> predList,
Individual alter)
Construct a list of Individuals on the path from the serialNmbrs used
as arguments in the mini predicates.
|
java.lang.String |
toProblemString() |
java.lang.String |
toSILKString()
This method builds a string that represents a Dyad in a SILKin data (_.silk) file.
|
java.lang.String |
toString() |
java.lang.String |
toXML(java.lang.String bacer) |
public int level
treelevel
in Node
and Variable
, or as level
in ClauseBody
.public java.lang.String kinTerm
kinTerm
is the name of the relationship between Ego and Alter.public int kinTermType
kinTermType
is PRIMARY (0), or EXTENDED(1).
Code of 7 indicates a dyad created by special request of the Learner.public int addrOrRef
addrOrRef
is either REF (0) or ADDR (1).public Individual ego
ego
and alter
are the 2 people who are related; they are the end-points
in the graph of this dyad.public Individual alter
ego
and alter
are the 2 people who are related; they are the end-points
in the graph of this dyad.public java.util.ArrayList<java.lang.Object> path
path
is a list of all the individuals between Ego and Alter.public java.lang.String pcString
pcString
is a concatenation of all the link-types followed along the path between Ego and Alter.
For example: if Alter is Ego's paternal grandfather, the pcString would be "FaFa".public java.lang.String pcStringStructural
pcStringStructural
is a concatenation of the gender-neutral link-types followed between Ego and Alter.
For example: if Alter is Ego's paternal grandfather, the pcStringStructural would contain 2 "P" links.
Valid link-types are "P" (parent), "C" (child), "S" (spouse), and "*" (star-link).public boolean confirmed
confirmed
= true means User has confirmed this Dyad is reliable.
Ergo, it should not be treated as an Anomaly.public boolean challenged
challenged
= true means this dyad has been added to an Anomalypublic Dyad()
public Dyad(Individual person)
public Dyad(Dyad model)
public static java.util.ArrayList<Dyad> makeDyads(Node nod, Individual egoo)
public java.lang.String toSILKString()
public java.lang.String toXML(java.lang.String bacer)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toProblemString()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(java.lang.Object obj) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
java.lang.ClassCastException
public void makePath(java.util.ArrayList<java.lang.Object> predList, Individual alter)
predList
- a list of strings like 'Fa(#2,#5)'