public static class BoundScript.Builder extends Object
Constructor and Description |
---|
Builder(Script script) |
Builder(Script script,
JobResources resources) |
Modifier and Type | Method and Description |
---|---|
BoundScript |
build() |
BoundScript.Builder |
withInput(String port,
File source)
Put a single document on the specified input port.
|
BoundScript.Builder |
withInput(String port,
InputStream source)
Put a single document on the specified input port.
|
BoundScript.Builder |
withInput(String port,
Source source)
Put a single document on the specified input port.
|
BoundScript.Builder |
withInput(String port,
URI source)
Put a single document on the specified input port.
|
BoundScript.Builder |
withInput(String port,
URL source)
Put a single document on the specified input port.
|
BoundScript.Builder |
withOption(String name,
String value)
Set a single value for an option.
|
public Builder(Script script)
public Builder(Script script, JobResources resources)
public BoundScript.Builder withInput(String port, URI source) throws IllegalArgumentException, FileNotFoundException
IllegalArgumentException
- if the script does not have the specified port, or the
port does not accept a sequence of documents and multiple documents are supplied.FileNotFoundException
- if the URI can not be resolved to a document.public BoundScript.Builder withInput(String port, File source) throws IllegalArgumentException, FileNotFoundException
IllegalArgumentException
- if the script does not have the specified port, or the
port does not accept a sequence of documents and multiple documents are supplied.FileNotFoundException
- if source
does not exist.public BoundScript.Builder withInput(String port, URL source) throws FileNotFoundException
IllegalArgumentException
- if the script does not have the specified port, or the
port does not accept a sequence of documents and multiple documents are supplied.FileNotFoundException
- if the URL can not be resolved to a document.public BoundScript.Builder withInput(String port, InputStream source)
IllegalArgumentException
- if the script does not have the specified port, or the
port does not accept a sequence of documents and multiple documents are supplied.public BoundScript.Builder withInput(String port, Source source) throws IllegalArgumentException, FileNotFoundException
IllegalArgumentException
- if the script does not have the specified port, the port
does not accept a sequence of documents and multiple documents are supplied, or
if source
is not a SAXSource
and has an empty system ID.FileNotFoundException
- if source
is not a SAXSource
and the
system ID can not be resolved to a document.public BoundScript.Builder withOption(String name, String value) throws FileNotFoundException
IllegalArgumentException
- if the script does not have the specified option, the
option does not accept a sequence of values and multiple values are supplied, or
the value is not valid according to the option type.FileNotFoundException
public BoundScript build() throws IllegalArgumentException
IllegalArgumentException
- if no documents were supplied for a required inputs or
no values were supplied for a required option.Copyright © 2010–2024 The DAISY Consortium. All rights reserved.