|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--SemanticNetwork.SemanticNetwork
Defines a semantic network of concept instances. Each contains an arbitrary number of attribute and relationship instances that describe it and relate it to other concept instances, respectively. It also contains a concept node that binds it to a knowledge base to provide implicit background details.
KnowledgeBase| Field Summary | |
private java.util.HashMap |
m_concept_instances
|
private java.lang.String |
m_description
|
private KnowledgeBase |
m_knowledge_base
|
private java.lang.String |
m_name
|
| Constructor Summary | |
SemanticNetwork(java.lang.String name,
java.lang.String description)
Creates a new empty semantic network. |
|
| Method Summary | |
void |
addAttributeInstance(AttributeInstance attribute_instance)
Adds an attribute instance to this semantic network and binds it to a concept instance. |
void |
addConceptInstance(ConceptInstance concept_instance)
Adds a concept instance to this semantic network and binds it to a concept instance. |
void |
addRelationshipInstance(RelationshipInstance relationship_instance)
Adds a relationship instance to this semantic network and binds it to a concept instance. |
void |
exportToVisioViewer(java.lang.String filename)
Exports the semantic network to a file that the Visio viewer can depict. |
SemanticNetwork |
getClone(java.lang.String name,
java.lang.String description)
Returns a mixed deep and shallow clone of this semantic network. |
ConceptInstance |
getConceptInstance(java.lang.String concept_label)
Returns a concept instance in this semantic network. |
java.util.Set |
getConceptInstanceNames()
Returns a list of concept instance names in this semantic network. |
java.util.Collection |
getConceptInstances()
Returns a list of concept instances in this semantic network. |
java.lang.String |
getDescription()
Returns the description of this semantic network. |
KnowledgeBase |
getKnowledgeBase()
Returns the knowledge base this semantic network is linked to. |
java.lang.String |
getName()
Returns the name of this semantic network. |
void |
linkKnowledgeBase(KnowledgeBase knowledge_base)
Links this semantic network to the knowledge base supporting it. |
java.lang.String |
serialize()
Returns a serialized representation of this semantic network. |
java.lang.String |
toHTMLString()
Returns an indented HTML string representation of this object to be displayed by the Representation Viewer. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
validate()
Verifies that all concept instances are connected to a concept node in the knowledge base and that all concept instances each relationship instance is directed to are present in this semantic network. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String m_name
private java.lang.String m_description
private java.util.HashMap m_concept_instances
private KnowledgeBase m_knowledge_base
| Constructor Detail |
public SemanticNetwork(java.lang.String name,
java.lang.String description)
name - - the name of the networkdescription - - an optional description| Method Detail |
public void addAttributeInstance(AttributeInstance attribute_instance)
throws java.lang.Exception
attribute_instance - - the attribute instance
java.lang.Exception - - if the attribute instance is already present in the concept instance or the concept instance is not
present in the semantic networkvalidate()
public void addConceptInstance(ConceptInstance concept_instance)
throws java.lang.Exception
concept_instance - - the concept instance
java.lang.Exception - - if the concept instance is already present in the semantic networkvalidate()
public void addRelationshipInstance(RelationshipInstance relationship_instance)
throws java.lang.Exception
relationship_instance - - the relationship instance
java.lang.Exception - - if the relation instance is already present in the concept instance or the concept instance is not
present in the semantic networkvalidate()
public void exportToVisioViewer(java.lang.String filename)
throws java.lang.Exception
filename - - the fully qualified output filename
java.lang.Exception - - if the export fails
public SemanticNetwork getClone(java.lang.String name,
java.lang.String description)
throws java.lang.Exception
To ensure a valid clone, validate() is called on this semantic network.
name - - the name of the cloned networkdescription - - an optional description
java.lang.Exception - - if validation failsvalidate(),
AttributeInstance.getClone(),
ConceptInstance.getClone(),
RelationshipInstance.getClone()public ConceptInstance getConceptInstance(java.lang.String concept_label)
public java.util.Collection getConceptInstances()
ConceptInstancepublic java.util.Set getConceptInstanceNames()
ConceptInstancepublic java.lang.String getDescription()
public java.lang.String getName()
public KnowledgeBase getKnowledgeBase()
linkKnowledgeBase(KnowledgeBase.KnowledgeBase)public void linkKnowledgeBase(KnowledgeBase knowledge_base)
knowledge_base - - the knowledge basegetKnowledgeBase()public java.lang.String serialize()
public java.lang.String toHTMLString()
RepresentationViewerpublic java.lang.String toString()
toString in class java.lang.ObjectSupport.toPrettyString(java.lang.String)
public void validate()
throws java.lang.Exception
It also builds or updates the links from the nodes in this semantic network to the knowledge base.
java.lang.Exception - - if any concept instance does not satisfy the requirements
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||