proper.imp
Class Predicate

java.lang.Object
  extended by proper.imp.Data
      extended by proper.imp.Predicate
All Implemented Interfaces:
java.lang.Cloneable

public class Predicate
extends Data

This class is container for data read from the parser. It can store hierarchichal data, too. Used for storing Prolog ground clauses. It can only handle strings without quotes, and only predicates with the same amount of arguments.

Version:
$Revision: 1.2 $
Author:
FracPete

Constructor Summary
Predicate(java.lang.String name, int id)
          initializes the object
 
Method Summary
 boolean getClassLabelAdded()
          returns whether the class label was added manually
 java.lang.String getName()
          returns the name of the container
 Predicate getParentPredicate()
          returns (if available) the predicate that is the parent of this element (sometimes an element can be part of a list and therefore the list is the parent and not a predicate!)
static void main(java.lang.String[] args)
          for testing only
 void setClassLabelAdded(boolean classLabelAdded)
          sets whether the class label was added manually or not
 java.lang.String toString()
          returns the data in a string
 
Methods inherited from class proper.imp.Data
add, add, clone, get, getData, getID, getIndex, getParent, getParentIndex, hasParent, isNull, isNull, remove, setID, setParent, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Predicate

public Predicate(java.lang.String name,
                 int id)
initializes the object

Method Detail

getName

public java.lang.String getName()
returns the name of the container

Specified by:
getName in class Data

setClassLabelAdded

public void setClassLabelAdded(boolean classLabelAdded)
sets whether the class label was added manually or not


getClassLabelAdded

public boolean getClassLabelAdded()
returns whether the class label was added manually


getParentPredicate

public Predicate getParentPredicate()
returns (if available) the predicate that is the parent of this element (sometimes an element can be part of a list and therefore the list is the parent and not a predicate!)


toString

public java.lang.String toString()
returns the data in a string

Specified by:
toString in class Data

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
for testing only

Throws:
java.lang.Exception