public class Theory
extends java.lang.Object
implements java.io.Serializable
Prolog
,
Serialized FormConstructor and Description |
---|
Theory(java.io.InputStream is)
Creates a theory getting its source text from an input stream
|
Theory(java.lang.String theory)
Creates a theory from its source text
|
Theory(Struct clauseList)
Creates a theory from a clause list
|
Modifier and Type | Method and Description |
---|---|
void |
append(Theory th)
Adds (appends) a theory to this.
|
static Theory |
fromJSON(java.lang.String jsonString) |
java.util.Iterator<? extends Term> |
iterator(Prolog engine) |
java.lang.String |
toJSON() |
java.lang.String |
toString() |
public Theory(java.io.InputStream is) throws java.io.IOException
is
- the input stream acting as sourcejava.io.IOException
public Theory(java.lang.String theory) throws InvalidTheoryException
theory
- the source texts
- InvalidTheoryException if theory is nullInvalidTheoryException
public Theory(Struct clauseList) throws InvalidTheoryException
clauseList
- the source texts
- InvalidTheoryException if clauseList is null or is not a prolog listInvalidTheoryException
public void append(Theory th) throws InvalidTheoryException
th
- is the theory to be appendeds
- InvalidTheoryException if the theory object are not compatibles (they are
compatibles when both have been built from texts or both from clause lists)InvalidTheoryException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toJSON()
public static Theory fromJSON(java.lang.String jsonString)