org.eclipse.palamedes.kif.core.knowledgebase
Class KBEntry

java.lang.Object
  extended by org.eclipse.palamedes.kif.core.knowledgebase.KBEntry

public class KBEntry
extends java.lang.Object

Base class for the knowledge base entries.


Field Summary
static java.lang.String P_ARITY
          Property name for arity
static java.lang.String P_IMP_BODY
          Property name for <
static java.lang.String P_IMP_HEAD
          Property name for <
static java.lang.String P_NAME
          Property name for name
static java.lang.String P_NODES
          Property name for <
static java.lang.String P_TOP_LEVEL_NODES
          Property name for <
static java.lang.String P_TYPE
          Property name for type
static java.lang.String V_FUN
          Property value function
static java.lang.String V_REL
          Property value relation
 
Constructor Summary
KBEntry(java.lang.String name)
           
 
Method Summary
 java.lang.Object get(java.lang.String propteryName)
          Returns the value of a property given by propertyName.
 java.util.ArrayList<KIFImplication> getImplicationBody()
          Returns all implications where the symbol appears in the body.
 java.util.ArrayList<KIFImplication> getImplicationHead()
          Returns all implications where the symbol appears in the head.
 java.lang.String getName()
          Returns the name of the entry.
 java.util.ArrayList<ASTNode> getNodeList()
          Returns all ASTNodes that correspond to the symbol directly.
 java.lang.String[] getPropertyNames()
          Returns the property names.
 java.lang.String[] getPropertyNames(java.lang.String[] toBeFiltered)
          Returns the property names but only thus which are not in toBeFiltered.
 java.util.ArrayList<KIFSent> getTopLevelNodes()
          Returns all Top Level ASTNodes corresponding to the symbol.
 boolean has(java.lang.String propertyName)
          This is a convenience method which returns true if the propertyName exists; otherwise false.
 java.lang.Object put(java.lang.String propteryName, java.lang.Object propertyValue)
          Sets the property propertyName to the value propertyValue.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

P_NAME

public static final java.lang.String P_NAME
Property name for name

See Also:
Constant Field Values

P_TYPE

public static final java.lang.String P_TYPE
Property name for type

See Also:
Constant Field Values

P_ARITY

public static final java.lang.String P_ARITY
Property name for arity

See Also:
Constant Field Values

P_TOP_LEVEL_NODES

public static final java.lang.String P_TOP_LEVEL_NODES
Property name for <...>

See Also:
Constant Field Values

P_IMP_HEAD

public static final java.lang.String P_IMP_HEAD
Property name for <...>

See Also:
Constant Field Values

P_IMP_BODY

public static final java.lang.String P_IMP_BODY
Property name for <...>

See Also:
Constant Field Values

P_NODES

public static final java.lang.String P_NODES
Property name for <...>

See Also:
Constant Field Values

V_REL

public static final java.lang.String V_REL
Property value relation

See Also:
Constant Field Values

V_FUN

public static final java.lang.String V_FUN
Property value function

See Also:
Constant Field Values
Constructor Detail

KBEntry

public KBEntry(java.lang.String name)
Method Detail

has

public boolean has(java.lang.String propertyName)
This is a convenience method which returns true if the propertyName exists; otherwise false.


get

public java.lang.Object get(java.lang.String propteryName)
Returns the value of a property given by propertyName.


put

public java.lang.Object put(java.lang.String propteryName,
                            java.lang.Object propertyValue)
Sets the property propertyName to the value propertyValue. If the map previously contained a mapping for the key, the old value is replaced.

Returns:
the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key.)

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns the property names.


getPropertyNames

public java.lang.String[] getPropertyNames(java.lang.String[] toBeFiltered)
Returns the property names but only thus which are not in toBeFiltered.


getName

public java.lang.String getName()
Returns the name of the entry.


getNodeList

public java.util.ArrayList<ASTNode> getNodeList()
Returns all ASTNodes that correspond to the symbol directly.


getTopLevelNodes

public java.util.ArrayList<KIFSent> getTopLevelNodes()
Returns all Top Level ASTNodes corresponding to the symbol.


getImplicationHead

public java.util.ArrayList<KIFImplication> getImplicationHead()
Returns all implications where the symbol appears in the head.


getImplicationBody

public java.util.ArrayList<KIFImplication> getImplicationBody()
Returns all implications where the symbol appears in the body.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object