|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.core.ProperObject
proper.imp.PostProcessor
public class PostProcessor
This class performs post processing of the stored predicates, like finding
inconsistent ones, trying to fix inconsistencies. It also widens predicates
if there are for the same argument position different functors, e.g.
p(f(1)). p(g(2)).then becomes
p(f(1),NULL). p(NULL,g(2)).where the table "p" then has two instead of one columns, with the correct references to the other tables "f" and "g".
process()
method.
process()
,
Import
,
Importer
Field Summary | |
---|---|
static int |
ORDER_DIGITS
the number of digits of the number preceding the name of the predicate, used for ordering the arguments |
static boolean |
USE_FIXMULTIPLEOCCURENCE
whether to fix multiple occurences of a predicate in others -> we loose all but one relationship! |
static boolean |
USE_SPLITTING
whether to use splitting of predicates if they have more than one index |
static boolean |
USE_WIDENING
whether to use widening of predicates or not |
Fields inherited from interface proper.core.ProperInterface |
---|
VERSION |
Constructor Summary | |
---|---|
PostProcessor(Traverser traverser,
Indexer indexer)
initializes the object |
Method Summary | |
---|---|
java.lang.String |
getAsymmetric()
returns the list of predicates that have an asymmetric relationship |
java.lang.String |
getForeignKeys()
returns the foreign key relations |
boolean |
getUseReducing()
returns the current state, whether lists are reduced to "regular" arguments if they all have the same size |
Traverser |
process()
performs the postprocessing, i.e. |
void |
setAsymmetric(java.lang.String asymmetric)
sets the list of predicates that have more than one index, but are asymmetric. |
void |
setForeignKeys(java.lang.String foreignKeys)
sets the foreign key relations (comma separated list). They're of the format <predicate1>=<predicate2>
E.g. |
void |
setUseReducing(boolean useReducing)
sets whether lists with the same size are reduced to "regular" arguments of a predicate |
java.lang.String |
toString()
the stored predicates in string representation |
Methods inherited from class proper.core.ProperObject |
---|
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean USE_WIDENING
process()
,
Constant Field Valuespublic static final boolean USE_SPLITTING
process()
,
Constant Field Valuespublic static final boolean USE_FIXMULTIPLEOCCURENCE
process()
,
Constant Field Valuespublic static final int ORDER_DIGITS
Constructor Detail |
---|
public PostProcessor(Traverser traverser, Indexer indexer)
Method Detail |
---|
public void setUseReducing(boolean useReducing)
public boolean getUseReducing()
public void setForeignKeys(java.lang.String foreignKeys)
<predicate1>=<predicate2>
E.g. the following two predicates where 'a' references 'b'
a(1,pos). and b(1,blabla).
public java.lang.String getForeignKeys()
setForeignKeys(String)
public void setAsymmetric(java.lang.String asymmetric)
public java.lang.String getAsymmetric()
public Traverser process()
a(b(1)).
and c(b(2)).
the
predicate "b"
occurs in both, the second relationship
will be lost, therefore it is changed to
a(b_a(1)).
and c(b_c(2)).
setUseReducing(boolean)
,
setForeignKeys(String)
,
USE_WIDENING
,
USE_FIXMULTIPLEOCCURENCE
,
Import
public java.lang.String toString()
toString
in class ProperObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |