edu.udo.cs.ie.cowbots.elpParser.dlp
Class Vocabulary

Package class diagram package Vocabulary
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.elpParser.dlp.Vocabulary

public class Vocabulary
extends java.lang.Object

this class memories the vocabulary of constants and different predicate its function like a dictionary.


Field Summary
private  java.util.HashSet<DLPConstant> constants
           
private  java.util.HashSet<Predicate> ps
           
 
Constructor Summary
Vocabulary()
          Default constructor
 
Method Summary
 void addConstant(DLPConstant constant)
           
 void addPredicate(Predicate p)
           
 DLPConstant getConstant(java.lang.String constantName)
          product from a string token to a constant, if this token do exist in the char set.
 Predicate getPredicate(java.lang.String pName)
          product from a string to a predicate, if this string do exist in the predicate set.
 void resolve()
          this method is only used by DLP parsing and present the stand of constants.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constants

private java.util.HashSet<DLPConstant> constants

ps

private java.util.HashSet<Predicate> ps
Constructor Detail

Vocabulary

public Vocabulary()
Default constructor

Method Detail

addPredicate

public void addPredicate(Predicate p)

getConstant

public DLPConstant getConstant(java.lang.String constantName)
product from a string token to a constant, if this token do exist in the char set.

Returns:
DLPConstant actual constant from dictionary

getPredicate

public Predicate getPredicate(java.lang.String pName)
product from a string to a predicate, if this string do exist in the predicate set.

Returns:

addConstant

public void addConstant(DLPConstant constant)

resolve

public void resolve()
this method is only used by DLP parsing and present the stand of constants.