Package com.io7m.xstructural.api
Class XSProcessorRequest
java.lang.Object
com.io7m.xstructural.api.XSProcessorRequest
- All Implemented Interfaces:
XSProcessorRequestType
public final class XSProcessorRequest extends java.lang.Object implements XSProcessorRequestType
A document processor request.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXSProcessorRequest.BuilderBuilds instances of typeXSProcessorRequest.Nested classes/interfaces inherited from interface com.io7m.xstructural.api.XSProcessorRequestType
XSProcessorRequestType.Stylesheet, XSProcessorRequestType.Task -
Method Summary
Modifier and Type Method Description java.util.Optional<java.nio.file.Path>brandingFile()static XSProcessorRequest.Builderbuilder()Creates a builder forXSProcessorRequest.static XSProcessorRequestcopyOf(XSProcessorRequestType instance)Creates an immutable copy of aXSProcessorRequestTypevalue.booleanequals(java.lang.Object another)This 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.java.nio.file.PathmessageFile()java.nio.file.PathoutputDirectory()java.nio.file.PathsourceFile()XSProcessorRequestType.Stylesheetstylesheet()XSProcessorRequestType.Tasktask()java.lang.StringtoString()Prints the immutable valueXSProcessorRequestwith attribute values.java.nio.file.PathtraceFile()XSProcessorRequestwithBrandingFile(java.nio.file.Path value)Copy the current immutable object by setting a present value for the optionalbrandingFileattribute.XSProcessorRequestwithBrandingFile(java.util.Optional<? extends java.nio.file.Path> optional)Copy the current immutable object by setting an optional value for thebrandingFileattribute.XSProcessorRequestwithMessageFile(java.nio.file.Path value)Copy the current immutable object by setting a value for themessageFileattribute.XSProcessorRequestwithOutputDirectory(java.nio.file.Path value)Copy the current immutable object by setting a value for theoutputDirectoryattribute.XSProcessorRequestwithSourceFile(java.nio.file.Path value)Copy the current immutable object by setting a value for thesourceFileattribute.XSProcessorRequestwithStylesheet(XSProcessorRequestType.Stylesheet value)Copy the current immutable object by setting a value for thestylesheetattribute.XSProcessorRequestwithTask(XSProcessorRequestType.Task value)Copy the current immutable object by setting a value for thetaskattribute.XSProcessorRequestwithTraceFile(java.nio.file.Path value)Copy the current immutable object by setting a value for thetraceFileattribute.XSProcessorRequestwithWriteResources(boolean value)Copy the current immutable object by setting a value for thewriteResourcesattribute.booleanwriteResources()
-
Method Details
-
outputDirectory
public java.nio.file.Path outputDirectory()- Specified by:
outputDirectoryin interfaceXSProcessorRequestType- Returns:
- The directory to which output files will be written
-
sourceFile
public java.nio.file.Path 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
public java.nio.file.Path traceFile()- Specified by:
traceFilein interfaceXSProcessorRequestType- Returns:
- The file to which trace messages will be written
-
messageFile
public java.nio.file.Path messageFile()- Specified by:
messageFilein interfaceXSProcessorRequestType- Returns:
- The file to which XSLT messages will be written
-
brandingFile
public java.util.Optional<java.nio.file.Path> brandingFile()- Specified by:
brandingFilein interfaceXSProcessorRequestType- Returns:
- The branding file that will be included into output documents
-
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
public final XSProcessorRequest withBrandingFile(java.util.Optional<? extends java.nio.file.Path> optional)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
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofXSProcessorRequestthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:outputDirectory,sourceFile,task,stylesheet,writeResources,traceFile,messageFile,brandingFile.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueXSProcessorRequestwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
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.build();- Returns:
- A new XSProcessorRequest builder
-