The Meta-Environment API

nl.cwi.sen1.visbase.rstorecontainer.datatypes
Class FactInfo

java.lang.Object
  extended by nl.cwi.sen1.visbase.rstorecontainer.datatypes.FactInfo

public class FactInfo
extends java.lang.Object

This class represents the 'RStore Fact-identification data' being communicated over the ToolBus

Author:
Ricardo Lindooren, Arend van Beelen (reviewer)
See Also:
FactInfoList

Field Summary
private  int m_id
           
private  java.lang.String m_name
           
private  nl.cwi.sen1.relationstores.types.RType m_rType
           
 
Constructor Summary
FactInfo(aterm.ATermList aTermList)
          Contructor that can be used to retrieve RStore FactInfo data from an ATermList representing this data.
FactInfo(int factId, nl.cwi.sen1.relationstores.types.RTuple factRTuple)
          Contructor that can be used to retrieve RStore Fact data from an RTuple representing this data.
 
Method Summary
 int getId()
          Returns the numeric ID of the fact.
 java.lang.String getName()
          Gets the name of the fact.
 nl.cwi.sen1.relationstores.types.RType getRType()
          Gets the RType instance that represents the relation type of the fact.
 java.lang.String getType()
          Gets the relation type of the fact.
 aterm.ATermList toAtermList()
          Creates a new ATermList containing the values in this datatype.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_id

private int m_id

m_name

private java.lang.String m_name

m_rType

private nl.cwi.sen1.relationstores.types.RType m_rType
Constructor Detail

FactInfo

public FactInfo(aterm.ATermList aTermList)
         throws ATermParseException
Contructor that can be used to retrieve RStore FactInfo data from an ATermList representing this data.

Parameters:
aTermList - the ATermList containing the FactInfo Data (Format: (int,str,term) [1,"SIMPLE_GRAPH",relation([str,str])])
Throws:
ATermParseException - if parsing of ATermList fails.
java.lang.RuntimeException - if ATermList input is null.

FactInfo

public FactInfo(int factId,
                nl.cwi.sen1.relationstores.types.RTuple factRTuple)
Contructor that can be used to retrieve RStore Fact data from an RTuple representing this data.

Parameters:
factId - ID of the fact. This ID is used to identify facts between the visualisation tools.
factRTuple - RTuple containing the fact data.
Method Detail

getId

public int getId()
Returns the numeric ID of the fact.

Returns:
The ID.

getName

public java.lang.String getName()
Gets the name of the fact.

Returns:
Name of the fact.

getType

public java.lang.String getType()
Gets the relation type of the fact.

Returns:
A string representing the relation type, like "relation([str,str])".

getRType

public nl.cwi.sen1.relationstores.types.RType getRType()
Gets the RType instance that represents the relation type of the fact.

Returns:
The relation type of the fact.

toAtermList

public aterm.ATermList toAtermList()
Creates a new ATermList containing the values in this datatype.

Returns:
A new ATermList instance in the format (int,str,term), like @c [1,"SIMPLE_GRAPH",relation([str,str])].

The Meta-Environment API