|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDLV.OutputDescriptor
This class describes how to build the output of DLV. An OutputDescriptor associates an OutputDescriptorItem for each predicate name (deafult is @link{ODIPredicate}). Each OutputDescriptorItem instance allows to correctly build a specified Predicate object during DLV output handling process, note that if you specify a FilePredicate or a JDBCPredicate data will be stored in the correspondig storage device (text files or relational databases respectively).
Example. Call DLV and store DLV output in several storage devices. .... // suppose stm is a java.sql.Statement instance Program p=new Program(); //build a Program object p.addProgramFile("a.dl"); //add a text file containing a program DlvHandler dlv=new DlvHandler("dl.exe"); //build a Dlvhandler object OutputDescriptor oDes=dlv.getOutputDescriptor(); // get the OutputDescriptor ossociated to dlv obejct dlv.addDescriptor("pred1",new ODIFilePredicate("file.dl")); //export in file "file.dl" literals named "pred1" dlv.addDescriptor("pred2",new ODIJDBCPredicate("tableName",stm); //export in database table "tableName" literals named "pred2" dlv.run(); // run dlv
OutputDescriptorItem
,
Predicate
,
DlvHandler
Constructor Summary | |
OutputDescriptor()
Builds a new (empty) OutputDescriptor. |
|
OutputDescriptor(OutputDescriptorItem defaultDescriptor)
Builds a new OutputDescriptor specifying the default descriptor to be used. |
Method Summary | |
void |
addDescriptor(java.lang.String predicateName,
OutputDescriptorItem o)
Associates a predicate name with an OutputDescriptorItem. |
void |
clear()
Removes all associations. |
OutputDescriptorItem |
getDescriptor(java.lang.String predicateName)
Returns the OutputDescriptorItem associated with predicate name "predicateName". |
boolean |
multipleModelAllowed()
Returns true if this OutputDescriptor supports multiple model generation, false otherwise. |
void |
removeDescriptor(java.lang.String predicateName)
Removes (if exists) the OutputDescriptorItem associated with Predicate "predicateName". |
void |
reset()
Resets this OutputDescriptor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OutputDescriptor()
public OutputDescriptor(OutputDescriptorItem defaultDescriptor)
Method Detail |
public void addDescriptor(java.lang.String predicateName, OutputDescriptorItem o)
predicateName
- A predicate name.o
- an OutputDescriptorItem.public OutputDescriptorItem getDescriptor(java.lang.String predicateName)
predicateName
- A predicate name.
public void removeDescriptor(java.lang.String predicateName)
predicateName
- A predicate name.public void reset()
public void clear()
public boolean multipleModelAllowed()
OutputDescriptorItem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |