Package com.io7m.xstructural.api
Class XSProcessorRequest
java.lang.Object
com.io7m.xstructural.api.XSProcessorRequest
- All Implemented Interfaces:
XSProcessorRequestType
A document processor request.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.io7m.xstructural.api.XSProcessorRequestType
XSProcessorRequestType.Stylesheet, XSProcessorRequestType.Task -
Method Summary
Modifier and TypeMethodDescriptionstatic XSProcessorRequest.Builderbuilder()Creates a builder forXSProcessorRequest.static XSProcessorRequestcopyOf(XSProcessorRequestType instance) Creates an immutable copy of aXSProcessorRequestTypevalue.booleanThis instance is equal to all instances ofXSProcessorRequestthat have equal attribute values.inthashCode()Computes a hash code from attributes:outputDirectory,sourceFile,task,stylesheet,writeResources,traceFile,messageFile,brandingFile,outputName.task()toString()Prints the immutable valueXSProcessorRequestwith attribute values.final XSProcessorRequestwithBrandingFile(Path value) Copy the current immutable object by setting a present value for the optionalbrandingFileattribute.final XSProcessorRequestwithBrandingFile(Optional<? extends Path> optional) Copy the current immutable object by setting an optional value for thebrandingFileattribute.final XSProcessorRequestwithMessageFile(Path value) Copy the current immutable object by setting a value for themessageFileattribute.final XSProcessorRequestwithOutputDirectory(Path value) Copy the current immutable object by setting a value for theoutputDirectoryattribute.final XSProcessorRequestwithOutputName(String value) Copy the current immutable object by setting a present value for the optionaloutputNameattribute.final XSProcessorRequestwithOutputName(Optional<String> optional) Copy the current immutable object by setting an optional value for theoutputNameattribute.final XSProcessorRequestwithSourceFile(Path value) Copy the current immutable object by setting a value for thesourceFileattribute.final XSProcessorRequestCopy the current immutable object by setting a value for thestylesheetattribute.final XSProcessorRequestCopy the current immutable object by setting a value for thetaskattribute.final XSProcessorRequestwithTraceFile(Path value) Copy the current immutable object by setting a value for thetraceFileattribute.final XSProcessorRequestwithWriteResources(boolean value) Copy the current immutable object by setting a value for thewriteResourcesattribute.booleanMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.xstructural.api.XSProcessorRequestType
checkPreconditions
-
Method Details
-
outputDirectory
- Specified by:
outputDirectoryin interfaceXSProcessorRequestType- Returns:
- The directory to which output files will be written
-
sourceFile
- Specified by:
sourceFilein interfaceXSProcessorRequestType- Returns:
- The source document
-
task
- Specified by:
taskin interfaceXSProcessorRequestType- Returns:
- The task that will be executed
-
stylesheet
- Specified by:
stylesheetin interfaceXSProcessorRequestType- Returns:
- The stylesheet that will be used
-
writeResources
public boolean writeResources()- Specified by:
writeResourcesin interfaceXSProcessorRequestType- Returns:
trueif resources (such as CSS) should be copied into the output directory
-
traceFile
- Specified by:
traceFilein interfaceXSProcessorRequestType- Returns:
- The file to which trace messages will be written
-
messageFile
- Specified by:
messageFilein interfaceXSProcessorRequestType- Returns:
- The file to which XSLT messages will be written
-
brandingFile
- Specified by:
brandingFilein interfaceXSProcessorRequestType- Returns:
- The branding file that will be included into output documents
-
outputName
- Specified by:
outputNamein interfaceXSProcessorRequestType- Returns:
- The name of the output file, if relevant to the operation
-
withOutputDirectory
Copy the current immutable object by setting a value for theoutputDirectoryattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for outputDirectory- Returns:
- A modified copy of the
thisobject
-
withSourceFile
Copy the current immutable object by setting a value for thesourceFileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sourceFile- Returns:
- A modified copy of the
thisobject
-
withTask
Copy the current immutable object by setting a value for thetaskattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for task- Returns:
- A modified copy of the
thisobject
-
withStylesheet
Copy the current immutable object by setting a value for thestylesheetattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for stylesheet- Returns:
- A modified copy of the
thisobject
-
withWriteResources
Copy the current immutable object by setting a value for thewriteResourcesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for writeResources- Returns:
- A modified copy of the
thisobject
-
withTraceFile
Copy the current immutable object by setting a value for thetraceFileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for traceFile- Returns:
- A modified copy of the
thisobject
-
withMessageFile
Copy the current immutable object by setting a value for themessageFileattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for messageFile- Returns:
- A modified copy of the
thisobject
-
withBrandingFile
Copy the current immutable object by setting a present value for the optionalbrandingFileattribute.- Parameters:
value- The value for brandingFile- Returns:
- A modified copy of
thisobject
-
withBrandingFile
Copy the current immutable object by setting an optional value for thebrandingFileattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for brandingFile- Returns:
- A modified copy of
thisobject
-
withOutputName
Copy the current immutable object by setting a present value for the optionaloutputNameattribute.- Parameters:
value- The value for outputName- Returns:
- A modified copy of
thisobject
-
withOutputName
Copy the current immutable object by setting an optional value for theoutputNameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for outputName- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofXSProcessorRequestthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:outputDirectory,sourceFile,task,stylesheet,writeResources,traceFile,messageFile,brandingFile,outputName. -
toString
Prints the immutable valueXSProcessorRequestwith attribute values. -
copyOf
Creates an immutable copy of aXSProcessorRequestTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable XSProcessorRequest instance
-
builder
Creates a builder forXSProcessorRequest.XSProcessorRequest.builder() .setOutputDirectory(java.nio.file.Path) // requiredoutputDirectory.setSourceFile(java.nio.file.Path) // requiredsourceFile.setTask(com.io7m.xstructural.api.XSProcessorRequestType.Task) // optionaltask.setStylesheet(com.io7m.xstructural.api.XSProcessorRequestType.Stylesheet) // optionalstylesheet.setWriteResources(boolean) // optionalwriteResources.setTraceFile(java.nio.file.Path) // optionaltraceFile.setMessageFile(java.nio.file.Path) // optionalmessageFile.setBrandingFile(java.nio.file.Path) // optionalbrandingFile.setOutputName(String) // optionaloutputName.build();- Returns:
- A new XSProcessorRequest builder
-