|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectua.gradsoft.termware.DefaultFacts
public class DefaultFacts
this is Facts database, which accept next types of terms:
class MyFacts extends DefaultFacts
{
...
public String nearestKnownLocation(int x, int y){
...
}
}
then setting/checking nearestKnownLocation will be evaluated to
call of this method.
Usially, all custom facts databases are inheried from DefaultFacts.
| Nested Class Summary | |
|---|---|
static class |
DefaultFacts.MethodTransformer
Transformer, wrapped arround method. |
| Constructor Summary | |
|---|---|
DefaultFacts()
|
|
DefaultFacts(String domainName)
|
|
| Method Summary | |
|---|---|
boolean |
check(Term t,
TransformationContext ctx)
Check term t. |
void |
clearLoggedEntities()
clear entities to log |
String |
getDomainName()
|
IEnv |
getEnv()
|
boolean |
isLoggingMode()
get logging mode |
void |
print(TransformationContext ctx,
Term t)
print term to standard output of transformation context. |
boolean |
println(TransformationContext ctx)
println CR/LF |
boolean |
println(TransformationContext ctx,
Term t)
println term to standard output of transformation context |
void |
set(Term t,
TransformationContext ctx)
set fact (called from actions in right part of rules) |
void |
setCurrentStopFlag(TransformationContext ctx,
boolean value)
set stop flag of current transformation. |
void |
setEnv(IEnv env)
|
void |
setLoggedEntities(Collection<String> s)
set collection of entities to log |
void |
setLoggedEntity(String s)
set entity to log. |
void |
setLoggingMode(boolean mode)
enable/disable logging |
void |
unsetLoggedEntity(String s)
unset entity to log. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFacts()
throws TermWareException
TermWareException
public DefaultFacts(String domainName)
throws TermWareException
TermWareException| Method Detail |
|---|
public String getDomainName()
public boolean check(Term t,
TransformationContext ctx)
throws TermWareException
t or subterm of t is a name of method of this
class - try to evaluate appropriative method.
check in interface IFactst - - term to checkctx - - transformation context
TermWareException
public void set(Term t,
TransformationContext ctx)
throws TermWareException
IFacts
set in interface IFactsTermWareExceptionpublic IEnv getEnv()
public void setEnv(IEnv env)
public void print(TransformationContext ctx,
Term t)
throws TermWareException
TermWareException
public boolean println(TransformationContext ctx,
Term t)
throws TermWareException
TermWareException
public boolean println(TransformationContext ctx)
throws TermWareException
TermWareException
public void setCurrentStopFlag(TransformationContext ctx,
boolean value)
public boolean isLoggingMode()
IFacts
isLoggingMode in interface IFactspublic void setLoggingMode(boolean mode)
IFacts
setLoggingMode in interface IFactspublic void setLoggedEntity(String s)
IFacts
setLoggedEntity in interface IFactspublic void unsetLoggedEntity(String s)
IFacts
unsetLoggedEntity in interface IFactspublic void setLoggedEntities(Collection<String> s)
IFacts
setLoggedEntities in interface IFactspublic void clearLoggedEntities()
IFacts
clearLoggedEntities in interface IFacts
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||