Class DestinationFromFileCreation
java.lang.Object
org.aksw.jena_sparql_api.io.endpoint.DestinationFromFileCreation
- All Implemented Interfaces:
Destination
Destination of a file that does not yet exist
- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PathThe disposable of the fileCreationprotected io.reactivex.rxjava3.core.Single<? extends org.aksw.commons.io.endpoint.FileCreation> -
Constructor Summary
ConstructorsConstructorDescriptionDestinationFromFileCreation(Path fileBeingCreated, io.reactivex.rxjava3.core.Single<? extends org.aksw.commons.io.endpoint.FileCreation> fileCreation) -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels this destination's underlying fileCreation process and cancel it Has no effect if the process already completedGet a description of the creation status.The file being created once there is a subscription to the singleio.reactivex.rxjava3.core.Single<? extends org.aksw.commons.io.endpoint.FileCreation>io.reactivex.rxjava3.core.Single<DestinationFromFile>materialize(Supplier<Path> preferredPathCallback) Materialize the destination to a given file.io.reactivex.rxjava3.core.Single<InputStreamSupplier>This method requests a supplier for inputstreams.transferTo(FilterEngine engine)
-
Field Details
-
fileCreation
protected io.reactivex.rxjava3.core.Single<? extends org.aksw.commons.io.endpoint.FileCreation> fileCreation -
fileBeingCreated
The disposable of the fileCreation
-
-
Constructor Details
-
DestinationFromFileCreation
public DestinationFromFileCreation(Path fileBeingCreated, io.reactivex.rxjava3.core.Single<? extends org.aksw.commons.io.endpoint.FileCreation> fileCreation) - Parameters:
fileBeingCreated-fileCreation- A single representing the file creation and whose value is CACHED!
-
-
Method Details
-
cancelCreation
public void cancelCreation()Cancels this destination's underlying fileCreation process and cancel it Has no effect if the process already completed- Specified by:
cancelCreationin interfaceDestination
-
getFileCreation
public io.reactivex.rxjava3.core.Single<? extends org.aksw.commons.io.endpoint.FileCreation> getFileCreation() -
getFileBeingCreated
The file being created once there is a subscription to the single- Returns:
-
transferTo
- Specified by:
transferToin interfaceDestination
-
prepareStream
Description copied from interface:DestinationThis method requests a supplier for inputstreams. For basic destinations, such as FileDestination, this process does not involve any overhead. However, if the destination represents a workflow, prepareStream may trigger a complex execution. The execution may generate a file from which streams can be obtained, or nothing gets executed at this point, and execution only occur when opening an input stream.- Specified by:
prepareStreamin interfaceDestination- Returns:
-
materialize
public io.reactivex.rxjava3.core.Single<DestinationFromFile> materialize(Supplier<Path> preferredPathCallback) Description copied from interface:DestinationMaterialize the destination to a given file. If the destination is already a file it waits until it has been completed. For non-file destinations, the callback is invoked to obtain a preferred file name- Specified by:
materializein interfaceDestination- Returns:
-
getCreationStatus
Description copied from interface:DestinationGet a description of the creation status.- Specified by:
getCreationStatusin interfaceDestination- Returns:
-