public class FlatsyCommandLine extends Object
| Modifier and Type | Field and Description |
|---|---|
OutputStream |
defaultOut |
| Constructor and Description |
|---|
FlatsyCommandLine()
Create a new FlatsyCommandLine
|
FlatsyCommandLine(InputStream stream)
Create a new FlatsyCommandLine and run a script of commands
|
FlatsyCommandLine(List<String> commands)
Create a new FlatsyCommandLine and run a list of commands
|
FlatsyCommandLine(Path script)
Create a new FlatsyCommandLine and run a script of commands
|
FlatsyCommandLine(String command)
Create a new FlatsyCommandLine and run a command
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
applyOperation(String command)
Apply an operation to the cursor currently defined by queryCommands
|
FlatsyCursor |
cursor()
Create cursor based on currently saved query commands
|
FlatsyCursor |
cursor(List<String> commands)
Create a cursor based on a command list
|
FlatsyCursor |
cursor(Path scriptPath)
Create a cursor from a saved script
|
static void |
main(String[] args) |
boolean |
runCommand(String command)
Build a command using flatsy command line syntax
|
boolean |
runScript(InputStream stream)
Run a sequence of script commands from stream
|
boolean |
runScript(List<String> commands)
Run a sequence of script commands
|
boolean |
runScript(Path path)
Run a sequence of script commands from file
|
public OutputStream defaultOut
public FlatsyCommandLine()
public FlatsyCommandLine(String command)
command - the commandpublic FlatsyCommandLine(List<String> commands)
commands - a list of commandspublic FlatsyCommandLine(Path script) throws IOException
script - a path to a scriptIOException - if script cannot be openedpublic FlatsyCommandLine(InputStream stream)
stream - a stream for script commandspublic boolean runCommand(String command)
command - a Flatsy commandpublic boolean runScript(List<String> commands)
commands - a list of Flatsy query language commandspublic boolean runScript(Path path) throws IOException
path - the file to runIOException - if script cannot be readpublic boolean runScript(InputStream stream)
stream - the input streampublic FlatsyCursor cursor(Path scriptPath) throws IOException
scriptPath - the path of the scriptIOException - if the script cannot be readpublic FlatsyCursor cursor(List<String> commands)
commands - an array of commands to runpublic FlatsyCursor cursor()
protected boolean applyOperation(String command)
command - an operation in Flatsy syntaxpublic static void main(String[] args)
Copyright © 2015. All rights reserved.