public class ConcRel extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
void |
constructRel(List<ConcRel> db)
reconstruct the relationships to other ConcRel objects
|
static List<String> |
crListToString(List<ConcRel> crList) |
int |
depthMax() |
boolean |
equals(Object obj) |
Set<ConcRel> |
getChildren() |
int[] |
getChildrenArray() |
String |
getConceptID() |
short |
getDepth() |
double |
getIntrinsicInfoContent() |
static ObjPair<ConcRel,Integer> |
getLeastCommonConcept(ConcRel c1,
ConcRel c2)
Deprecated.
|
static int |
getLeastCommonConcept(ConcRel c1,
ConcRel c2,
Set<ConcRel> lcses,
Map<ConcRel,LCSPath> paths) |
int |
getNodeIndex() |
Set<ConcRel> |
getParents() |
int[] |
getParentsArray() |
void |
getPath(List<ConcRel> lpath,
List<List<ConcRel>> allPaths,
int depth,
int depthMax)
recursively build all paths to root from a concept - add elements from
set of parents.
|
boolean |
hasAncestor(String cui)
is the specified concept an ancestor of this concept?
|
int |
hashCode() |
boolean |
isLeaf() |
boolean |
isRoot() |
void |
setChildrenArray(int[] childrenArray) |
void |
setConceptID(String nodeCUI) |
void |
setDepth(short depth) |
void |
setIntrinsicInfoContent(double intrinsicInfoContent) |
void |
setNodeIndex(int nodeIndex) |
void |
setParentsArray(int[] parentsArray) |
String |
toString() |
public ConcRel(String cui, int nodeIndex)
public static ObjPair<ConcRel,Integer> getLeastCommonConcept(ConcRel c1, ConcRel c2)
c1
- c2
- public static int getLeastCommonConcept(ConcRel c1, ConcRel c2, Set<ConcRel> lcses, Map<ConcRel,LCSPath> paths)
c1
- concept1c2
- concept2lcses
- least common subsumers, requiredpaths
- paths between concepts via lcses, optional. Key - lcs. Value -
2 element list corresponding to paths to lcs from c1 and c2public void constructRel(List<ConcRel> db)
db
- public int depthMax()
public int[] getChildrenArray()
public String getConceptID()
public short getDepth()
public double getIntrinsicInfoContent()
public int getNodeIndex()
public int[] getParentsArray()
public void getPath(List<ConcRel> lpath, List<List<ConcRel>> allPaths, int depth, int depthMax)
lpath
- current path from children to this conceptallPaths
- list of all pathsdepth
- current depthdepthMax
- public boolean hasAncestor(String cui)
cui
- public boolean isLeaf()
public boolean isRoot()
public void setChildrenArray(int[] childrenArray)
public void setConceptID(String nodeCUI)
public void setDepth(short depth)
public void setIntrinsicInfoContent(double intrinsicInfoContent)
public void setNodeIndex(int nodeIndex)
public void setParentsArray(int[] parentsArray)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.