|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.udo.cs.ie.cowbots.logic.solver.ELPSource
public class ELPSource
this class models an input source for asp solvers. an input source is either a program, a collection of facts, or a file (program on hard drive).
Field Summary | |
---|---|
(package private) ELP |
resELP
|
(package private) java.util.Collection<? extends ELPLiteral> |
resFacts
|
(package private) java.lang.String |
resFile
|
(package private) int |
resType
|
static int |
SRC_ELP
|
static int |
SRC_FACT
|
static int |
SRC_FILE
|
Constructor Summary | |
---|---|
ELPSource(java.util.Collection<? extends ELPLiteral> factSrc)
this method constructs an elpsource based on a collection of facts. |
|
ELPSource(ELP elpSrc)
this method constructs an elpsource based on an elp instance. |
|
ELPSource(java.lang.String fileName)
this method constructs an elpsource based on a filename. |
Method Summary | |
---|---|
private void |
addFacts(java.io.BufferedWriter bw)
helper function to add facts to an output stream |
void |
addResource(java.io.BufferedWriter bw)
adds a source (either elp oder facts) to a buffered writer. |
java.lang.String |
getSrcFile()
returns the path string of a program, if that source refers to a hard drive resource. |
int |
getType()
returns the type (ELP,FACTS,FILE) of the elp source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SRC_FILE
public static final int SRC_ELP
public static final int SRC_FACT
java.lang.String resFile
ELP resELP
java.util.Collection<? extends ELPLiteral> resFacts
int resType
Constructor Detail |
---|
public ELPSource(java.lang.String fileName)
fileName
- path and file of programpublic ELPSource(ELP elpSrc)
elpSrc
- source programpublic ELPSource(java.util.Collection<? extends ELPLiteral> factSrc)
factSrc
- collection of factsMethod Detail |
---|
public int getType()
public java.lang.String getSrcFile()
public void addResource(java.io.BufferedWriter bw) throws java.io.IOException
bw
-
java.io.IOException
private void addFacts(java.io.BufferedWriter bw) throws java.io.IOException
bw
- buffered writer output target
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |