Package org.basex.core.cmd
Class Open
java.lang.Object
org.basex.core.jobs.Job
org.basex.core.Command
org.basex.core.cmd.Open
Evaluates the 'open' command and opens a database.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocks()Adds the strings (databases, special identifiers) for which locks need to be acquired.booleanCloses an open data reference and returnstrueif this command will change theContext.data()reference.static Dataopen(String name, Context context, MainOptions options) Opens the specified database.protected booleanrun()Executes the command and serializes the result (internal call).Methods inherited from class org.basex.core.Command
addLocks, baseURI, baseURI, build, close, error, exception, execute, execute, getOption, getOption, info, info, init, maxResults, result, run, run, setInput, setInput, stoppable, supportsProg, toString, toString, updated, updating
-
Constructor Details
-
Open
Default constructor.- Parameters:
name- name of database
-
Open
Default constructor.- Parameters:
name- name of databasepath- database path (can benull)
-
-
Method Details
-
run
protected boolean run()Description copied from class:CommandExecutes the command and serializes the result (internal call). -
addLocks
public void addLocks()Description copied from class:JobAdds the strings (databases, special identifiers) for which locks need to be acquired. -
newData
Description copied from class:CommandCloses an open data reference and returnstrueif this command will change theContext.data()reference. This method is only required by the GUI. -
open
Opens the specified database.- Parameters:
name- name of databasecontext- database contextoptions- main options- Returns:
- data reference
- Throws:
IOException- I/O exception
-