SemanticNetwork
Class AttributeInstance

java.lang.Object
  |
  +--SemanticNetwork.AttributeInstance

public class AttributeInstance
extends java.lang.Object

Defines an attribute to be associated with a concept instance to specify spatial properties.

Version:
Created 25 August 2003
Author:
Dan Tappan

Field Summary
private  java.lang.String m_attribute_name
           
private  java.lang.String m_frame_name
           
private  boolean m_is_inferred
           
private  SemanticNetwork m_semantic_network
           
private  java.lang.String m_source_label
           
 
Constructor Summary
AttributeInstance(java.lang.String source_label, java.lang.String attribute_name)
          Creates a new, non-inferred instance of an attribute instance to be added to a semantic network, thereby associating it with a concept instance.
AttributeInstance(java.lang.String attribute_name, java.lang.String source_label, boolean is_inferred)
          Creates a new instance of an attribute instance to be added to a semantic network, thereby associating it with a concept instance.
AttributeInstance(java.lang.String attribute_name, java.lang.String source_label, java.lang.String frame_name, boolean is_inferred)
          Creates a new instance of an attribute instance to be added to a semantic network, thereby associating it with a concept instance.
 
Method Summary
 java.lang.String getAttributeName()
          Returns the attribute name of this attribute instance.
 AttributeInstance getClone()
          Returns a deep clone of this attribute instance.
 java.lang.String getFrameName()
          Returns the frame name of this attribute instance.
 java.lang.String getSourceLabel()
          Returns the unique label of the concept instance that roots this attribute instance.
 boolean isInferred()
          Returns whether this attribute instance is inferred.
 java.lang.String serialize()
          Returns a serialized representation of this attribute instance.
protected  void setSemanticNetwork(SemanticNetwork semantic_network)
          Sets the semantic network this attribute instance was added to.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_attribute_name

private java.lang.String m_attribute_name

m_source_label

private java.lang.String m_source_label

m_frame_name

private java.lang.String m_frame_name

m_is_inferred

private boolean m_is_inferred

m_semantic_network

private SemanticNetwork m_semantic_network
Constructor Detail

AttributeInstance

public AttributeInstance(java.lang.String attribute_name,
                         java.lang.String source_label,
                         boolean is_inferred)
Creates a new instance of an attribute instance to be added to a semantic network, thereby associating it with a concept instance.

Parameters:
attribute_name - - the attribute name
source_label - - the source label
is_inferred - - whether this attribute instance is inferred
See Also:
ConceptInstance, SemanticNetwork.addAttributeInstance(SemanticNetwork.AttributeInstance)

AttributeInstance

public AttributeInstance(java.lang.String source_label,
                         java.lang.String attribute_name)
Creates a new, non-inferred instance of an attribute instance to be added to a semantic network, thereby associating it with a concept instance.

Parameters:
source_label - - the source label
attribute_name - - the attribute name
See Also:
ConceptInstance, SemanticNetwork.addAttributeInstance(SemanticNetwork.AttributeInstance)

AttributeInstance

public AttributeInstance(java.lang.String attribute_name,
                         java.lang.String source_label,
                         java.lang.String frame_name,
                         boolean is_inferred)
Creates a new instance of an attribute instance to be added to a semantic network, thereby associating it with a concept instance.

Parameters:
attribute_name - - the attribute name
source_label - - the source label
frame_name - - the frame this attribute is associated with
is_inferred - - whether this attribute instance is inferred
See Also:
getFrameName(), ConceptInstance, SemanticNetwork.addAttributeInstance(SemanticNetwork.AttributeInstance)
Method Detail

getAttributeName

public java.lang.String getAttributeName()
Returns the attribute name of this attribute instance.

Returns:
the attribute name

getClone

public AttributeInstance getClone()
Returns a deep clone of this attribute instance. All fields are copied by value.

Returns:
the clone

getFrameName

public java.lang.String getFrameName()
Returns the frame name of this attribute instance. A frame is an arbitrary collection of attributes sharing the same frame name. It is intended to improve clarity in the rendering of a semantic network by grouping related attributes into a single graphical node, thereby reducing the number of nodes and arcs.

Returns:
the frame name, or an empty string if none was set in the constructor

getSourceLabel

public java.lang.String getSourceLabel()
Returns the unique label of the concept instance that roots this attribute instance.

Returns:
the source label

isInferred

public boolean isInferred()
Returns whether this attribute instance is inferred.

Returns:
the infer state

serialize

public java.lang.String serialize()
Returns a serialized representation of this attribute instance.

Returns:
the serialization

setSemanticNetwork

protected void setSemanticNetwork(SemanticNetwork semantic_network)
Sets the semantic network this attribute instance was added to.

Parameters:
semantic_network - - the semantic network

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the String representation
See Also:
Support.toPrettyString(java.lang.String)