public final class Store
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
HASH_DEFAULT |
static long |
STAMP_DEFAULT |
Constructor and Description |
---|
Store(java.io.File directory)
Create instance of store for denoted directory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
existsProof(FormulaSymbol symbol)
Check whether store holds proof of formula.
|
boolean |
existsProof(java.lang.String name)
Check whether store holds proof of formula.
|
boolean |
hasChanged(Declaration decl)
Signal whether declaration has changed compared to that in store.
|
static Declaration |
readDeclaration(java.io.File file)
Read declaration from file.
|
Proof |
readProof(FormulaSymbol symbol)
Read proof for formula from store.
|
static void |
removeWhitespace(org.w3c.dom.Node node)
Removes all text nodes that only contain whitespace from DOM tree.
|
static Declaration |
toDeclaration(org.w3c.dom.Node node)
Convert DOM node to declaration.
|
static Expression |
toExpression(org.w3c.dom.Node node)
Convert DOM node to expression.
|
static Identifier |
toIdentifier(org.w3c.dom.Node node)
Convert DOM node to identifier.
|
static Type |
toType(org.w3c.dom.Node node)
Convert DOM node to type.
|
boolean |
write(Declaration decl,
java.util.Collection<Symbol> referenced)
Write declaration to store.
|
boolean |
write(Proof proof)
Write proof to store updating the dependencies file.
|
public static final long HASH_DEFAULT
public static final long STAMP_DEFAULT
public Store(java.io.File directory)
directory
- for storing the declared objectspublic boolean write(Proof proof)
proof
- the proofpublic boolean existsProof(java.lang.String name)
name
- the name of a formula.public boolean existsProof(FormulaSymbol symbol)
symbol
- a formula symbol.public Proof readProof(FormulaSymbol symbol)
symbol
- a formula symbol.public boolean write(Declaration decl, java.util.Collection<Symbol> referenced)
decl
- the declarationreferenced
- the symbols referenced in the definition of the symbolpublic boolean hasChanged(Declaration decl)
decl
- a declarationpublic static Declaration readDeclaration(java.io.File file)
file
- path to a file holding the declaration.public static Expression toExpression(org.w3c.dom.Node node)
node
- the DOM representation of the expression.public static Type toType(org.w3c.dom.Node node)
node
- the DOM representation of the type.public static Identifier toIdentifier(org.w3c.dom.Node node)
node
- the DOM representation of the identifier.public static Declaration toDeclaration(org.w3c.dom.Node node)
node
- the DOM representation of the declaration.public static void removeWhitespace(org.w3c.dom.Node node)
node
- the root of the tree that is to be cleaned from whitespace.