|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--prolog.implementation.Fact
this is the base implementation for a relation with a name.
prolog: myFact(dan,joe).
in this example, "myFact" is the name and the parameters "dan" and "joe" are the atoms in the relation.
| Field Summary | |
protected int |
name
the name of this fact |
protected Relation |
relation
the relation contained in this fact |
| Constructor Summary | |
Fact(IFact f)
copy constructor |
|
Fact(int name)
constructor |
|
Fact(int name,
IRelation r)
constructor |
|
| Method Summary | |
void |
addAttribute(java.lang.Object value)
adds a IAtom to this fact's relation |
void |
genXml(java.io.Writer out,
ISymbolTable table)
generates xml representing this object |
int |
getName()
returns the name of this fact |
IRelation |
getRelation()
returns the relalation this fact owns |
java.lang.String |
toString()
|
java.lang.String |
toString(ISymbolTable table)
returns a string representation of this oject, if the parameter ISymbolTable is specified, the symbols are decoded |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected Relation relation
protected int name
| Constructor Detail |
public Fact(int name)
name - public Fact(IFact f)
f -
public Fact(int name,
IRelation r)
name - r - | Method Detail |
public void addAttribute(java.lang.Object value)
value - - a IAtompublic int getName()
IFactgetName in interface IFactpublic IRelation getRelation()
IFactgetRelation in interface IFactpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(ISymbolTable table)
IFacttoString in interface IFacttable - the symboltable used to decode the symbols
public void genXml(java.io.Writer out,
ISymbolTable table)
throws java.io.IOException
genXml in interface IFactout - table - java.io.IOException -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||