public static class ScriptInput.Builder extends Object
Constructor and Description |
---|
Builder()
Don't handle relative inputs.
|
Builder(File baseDir)
Resolve relative inputs against a base directory.
|
Builder(JobResources resources)
Resolve relative inputs within a resource collection.
|
Modifier and Type | Method and Description |
---|---|
ScriptInput |
build()
Build the
ScriptInput
|
ScriptInput.Builder |
withInput(String port,
File source)
Put a single document on the specified input port.
|
ScriptInput.Builder |
withInput(String port,
InputStream source)
Put a single document on the specified input port.
|
ScriptInput.Builder |
withInput(String port,
Source source)
Put a single document on the specified input port.
|
ScriptInput.Builder |
withInput(String port,
URI source)
Put a single document on the specified input port.
|
ScriptInput.Builder |
withInput(String port,
URL source)
Put a single document on the specified input port.
|
ScriptInput.Builder |
withOption(String name,
String value)
Set a single value for an option.
|
public Builder()
public Builder(JobResources resources)
public Builder(File baseDir)
public ScriptInput.Builder withInput(String port, Source source) throws IllegalArgumentException, FileNotFoundException
IllegalArgumentException
- if no InputStream
or Reader
can be
obtained from source
and source
has an empty system ID.FileNotFoundException
- if no InputStream
or Reader
can be obtained
from source
and the system ID can not be resolved to a document.public ScriptInput.Builder withInput(String port, URI source) throws FileNotFoundException
FileNotFoundException
- if the URI can not be resolved to a document.public ScriptInput.Builder withInput(String port, File source) throws FileNotFoundException
FileNotFoundException
- if source
does not exist.public ScriptInput.Builder withInput(String port, URL source) throws FileNotFoundException
FileNotFoundException
- if the URL can not be resolved to a document.public ScriptInput.Builder withInput(String port, InputStream source)
public ScriptInput.Builder withOption(String name, String value)
public ScriptInput build()
ScriptInput
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.