public final class CoolMapOntologyImpl extends java.lang.Object implements CoolMapOntology
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
COLUMN |
static java.lang.String |
NODE_IRI_STRING |
static java.lang.String |
NODE_LABEL_STRING |
static java.lang.String |
NODE_NAME_STRING |
static java.lang.Integer |
ROW |
Constructor and Description |
---|
CoolMapOntologyImpl(java.lang.String name,
java.lang.String description) |
CoolMapOntologyImpl(java.lang.String name,
java.lang.String description,
java.lang.String ID) |
Modifier and Type | Method and Description |
---|---|
void |
addPreset(COntologyPreset preset) |
void |
addRelationship(java.lang.String parentTermId,
java.lang.String childTermId)
Add the specified parent-child relationship in this Ontology if the relationship doesn't exist
|
void |
addRelationshipNoUpdateDepth(java.lang.String parentId,
java.lang.String childId) |
void |
addRelationshipUpdateDepth(com.google.common.collect.Multimap<java.lang.String,java.lang.String> parentToChild) |
void |
destroy() |
java.util.HashSet<java.lang.String> |
getAllNodesWithChildrenIds() |
java.util.HashSet<java.lang.String> |
getAllNodesWithParentsIds() |
java.util.ArrayList<java.lang.String> |
getAllNodesWithParentsOrderedIds() |
java.util.Set<java.lang.String> |
getAllTermIds()
Get all term IDs
|
java.lang.String |
getAttribute(java.lang.String nodeId,
java.lang.String attrName) |
java.util.List<java.lang.String> |
getAttributeNames() |
java.lang.Integer[] |
getBaseIndices(CoolMapMatrix matrix,
java.lang.Integer direction,
java.lang.String nodeId) |
java.lang.String |
getDescription()
Get the description of this Ontology
|
COntologyEdgeAttributeImpl |
getEdgeAttribute(java.lang.String parentId,
java.lang.String childId) |
int |
getFittingLevels(int maxNumber) |
java.lang.Float |
getHeightDifference(java.lang.String parentId,
java.lang.String childId) |
java.lang.String |
getID()
Get the ID of this Ontology
|
java.util.ArrayList<java.lang.String> |
getImmediateChildrenOrderedIds(java.lang.String parentId) |
java.util.ArrayList<java.lang.String> |
getImmediateChildTermIds(java.lang.String parentTermId)
Get all the immediate child terms of a specified parent term
|
java.util.ArrayList<java.lang.String> |
getImmediateParentsOrderedIds(java.lang.String childId) |
java.util.ArrayList<java.lang.String> |
getImmediateParentTermIds(java.lang.String childTermId)
Get all the immediate parent terms of a specified child term
|
java.util.HashSet<java.lang.String> |
getLeafTermIds()
Get all leaf term IDs
|
java.lang.Integer |
getMinimalDepthFromLeaves(java.lang.String nodeId) |
java.lang.String |
getName()
Get the name of this Ontology
|
java.util.Collection<COntologyPreset> |
getPresets() |
java.util.Set<java.lang.String> |
GetRootTermIds()
Get all root term IDs
|
java.util.Set<VNode> |
getRootVNodes() |
java.util.List<VNode> |
getRootVNodesOrdered() |
java.awt.Color |
getViewColor() |
VNode |
getVNodeById(java.lang.String nodeId) |
boolean |
hasChildTerms(java.lang.String nodeId)
Check if a specified term has at least one child term
|
boolean |
hasParentTerms(java.lang.String nodeId)
Check if a specified term has at least one parent term
|
boolean |
hasRelationship(java.lang.String parentTermId,
java.lang.String childTermId)
Check if a specified parent-child relationship exists in this Ontology
|
boolean |
hasTerm(java.lang.String termId)
Check if a term with specified ID exists
|
boolean |
isDestroyed() |
CoolMapOntologyImpl |
rawCopy(java.lang.String newName,
java.lang.String newDescription)
Copy an ontology with only the parent-child relationships and the attribute information without depth
|
void |
removeAll() |
void |
setAttribute(java.lang.String nodeId,
java.lang.String attrName,
java.lang.String attributeValue) |
void |
setDescription(java.lang.String description)
Set or change the description of this Ontology
|
void |
setEdgeAttribute(java.lang.String parentId,
java.lang.String childId,
COntologyEdgeAttributeImpl attr) |
void |
setID(java.lang.String ID) |
void |
setName(java.lang.String name)
Set or rename this Ontology
|
void |
setViewColor(java.awt.Color color) |
java.lang.String |
toString() |
void |
validate() |
public static final java.lang.String NODE_NAME_STRING
public static final java.lang.String NODE_LABEL_STRING
public static final java.lang.String NODE_IRI_STRING
public static final java.lang.Integer ROW
public static final java.lang.Integer COLUMN
public CoolMapOntologyImpl(java.lang.String name, java.lang.String description)
public CoolMapOntologyImpl(java.lang.String name, java.lang.String description, java.lang.String ID)
public void addPreset(COntologyPreset preset)
public java.util.Collection<COntologyPreset> getPresets()
public java.lang.String getAttribute(java.lang.String nodeId, java.lang.String attrName)
public java.util.List<java.lang.String> getAttributeNames()
public void setAttribute(java.lang.String nodeId, java.lang.String attrName, java.lang.String attributeValue)
public void destroy()
public boolean isDestroyed()
public void setViewColor(java.awt.Color color)
public java.awt.Color getViewColor()
public java.lang.String getName()
CoolMapOntology
getName
in interface CoolMapOntology
public void setName(java.lang.String name)
CoolMapOntology
setName
in interface CoolMapOntology
name
- the new name of the Otology to be usedpublic java.lang.String getDescription()
CoolMapOntology
getDescription
in interface CoolMapOntology
public void setDescription(java.lang.String description)
CoolMapOntology
setDescription
in interface CoolMapOntology
description
- the new description of the Ontologypublic java.util.HashSet<java.lang.String> getLeafTermIds()
CoolMapOntology
getLeafTermIds
in interface CoolMapOntology
public java.util.Set<java.lang.String> GetRootTermIds()
CoolMapOntology
GetRootTermIds
in interface CoolMapOntology
public VNode getVNodeById(java.lang.String nodeId)
public java.util.Set<VNode> getRootVNodes()
public int getFittingLevels(int maxNumber)
public java.util.List<VNode> getRootVNodesOrdered()
public java.util.HashSet<java.lang.String> getAllNodesWithChildrenIds()
public java.util.ArrayList<java.lang.String> getAllNodesWithParentsOrderedIds()
public java.util.HashSet<java.lang.String> getAllNodesWithParentsIds()
public java.util.Set<java.lang.String> getAllTermIds()
CoolMapOntology
getAllTermIds
in interface CoolMapOntology
public boolean hasTerm(java.lang.String termId)
CoolMapOntology
hasTerm
in interface CoolMapOntology
termId
- term IDpublic java.util.ArrayList<java.lang.String> getImmediateChildTermIds(java.lang.String parentTermId)
CoolMapOntology
getImmediateChildTermIds
in interface CoolMapOntology
parentTermId
- ID of the parent termpublic java.util.ArrayList<java.lang.String> getImmediateParentTermIds(java.lang.String childTermId)
CoolMapOntology
getImmediateParentTermIds
in interface CoolMapOntology
childTermId
- ID of the child termpublic java.util.ArrayList<java.lang.String> getImmediateChildrenOrderedIds(java.lang.String parentId)
public java.util.ArrayList<java.lang.String> getImmediateParentsOrderedIds(java.lang.String childId)
public java.lang.Integer[] getBaseIndices(CoolMapMatrix matrix, java.lang.Integer direction, java.lang.String nodeId)
public java.lang.Integer getMinimalDepthFromLeaves(java.lang.String nodeId)
public boolean hasChildTerms(java.lang.String nodeId)
CoolMapOntology
hasChildTerms
in interface CoolMapOntology
nodeId
- the ID of the term on which to checkpublic boolean hasParentTerms(java.lang.String nodeId)
CoolMapOntology
hasParentTerms
in interface CoolMapOntology
nodeId
- the ID of the term on which to checkpublic void addRelationship(java.lang.String parentTermId, java.lang.String childTermId)
CoolMapOntology
addRelationship
in interface CoolMapOntology
parentTermId
- ID of the parent termchildTermId
- ID of the child termpublic void addRelationshipNoUpdateDepth(java.lang.String parentId, java.lang.String childId)
public void addRelationshipUpdateDepth(com.google.common.collect.Multimap<java.lang.String,java.lang.String> parentToChild)
public void validate()
public void removeAll()
public final java.lang.String getID()
CoolMapOntology
getID
in interface CoolMapOntology
public final void setID(java.lang.String ID)
public java.lang.Float getHeightDifference(java.lang.String parentId, java.lang.String childId)
public void setEdgeAttribute(java.lang.String parentId, java.lang.String childId, COntologyEdgeAttributeImpl attr)
public COntologyEdgeAttributeImpl getEdgeAttribute(java.lang.String parentId, java.lang.String childId)
public boolean hasRelationship(java.lang.String parentTermId, java.lang.String childTermId)
CoolMapOntology
hasRelationship
in interface CoolMapOntology
parentTermId
- ID of the parent termchildTermId
- ID of the child termpublic java.lang.String toString()
toString
in class java.lang.Object
public CoolMapOntologyImpl rawCopy(java.lang.String newName, java.lang.String newDescription)
newName
- name for the new ontologynewDescription
- description of the new ontology