Package org.basex.core.cmd
Class Add
java.lang.Object
org.basex.core.jobs.Job
org.basex.core.Command
org.basex.core.cmd.ACreate
org.basex.core.cmd.Add
Evaluates the 'add' command and adds a document to a collection.
Note that the constructors of this class have changed with Version 7.0:
the target path and file name have been merged and are now specified
as first argument.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(CmdBuilder cb) Builds a string representation from the command.doubleReturns a progress value (0 - 1).protected booleanrun()Executes the command and serializes the result (internal call).Returns short progress information.Methods inherited from class org.basex.core.cmd.ACreate
addLocks, newData, stoppable, supportsProgMethods inherited from class org.basex.core.Command
addLocks, baseURI, baseURI, close, error, exception, execute, execute, getOption, getOption, info, info, init, maxResults, result, run, run, setInput, setInput, toString, toString, updated, updating
-
Constructor Details
-
Add
Constructor, specifying a target path. The input needs to be set viaCommand.setInput(InputStream).- Parameters:
path- target path, optionally terminated by a new file name
-
Add
Constructor, specifying a target path and an input.- Parameters:
path- target path, optionally terminated by a new file name Ifnull, the name of the input will be set as path.input- input file or XML string
-
-
Method Details
-
run
protected boolean run()Description copied from class:CommandExecutes the command and serializes the result (internal call). -
build
Description copied from class:CommandBuilds a string representation from the command. This string must be correctly built, as commands are sent to the server as strings. -
shortInfo
Description copied from class:JobReturns short progress information. Can be overwritten to give more specific feedback. -
progressInfo
public double progressInfo()Description copied from class:JobReturns a progress value (0 - 1). Can be overwritten to give more specific feedback.- Overrides:
progressInfoin classJob- Returns:
- header information
-