public abstract static class Operation.Upload extends Operation
The operation outcome may assume one among the following Status
codes:
Status | Explanation | Reported as |
---|---|---|
Outcome.Status.OK_CREATED |
the file was successfully uploaded without replacing an existing file for the same resource | exec() return value |
Outcome.Status.OK_MODIFIED |
the file was successfully uploaded and replaced an existing file bound to the same resource | exec() return value |
Outcome.Status.OK_DELETED |
the file was successfully deleted | exec() return value |
Outcome.Status.ERROR_INVALID_INPUT |
in case the supplied URI is not valid or a problem is detected in the uploaded file | OperationException |
Outcome.Status.ERROR_OBJECT_NOT_FOUND |
the file cannot be deleted because it does not exist (the associated resource may or may not exist) | OperationException |
Outcome.Status.ERROR_DEPENDENCY_NOT_FOUND |
supplied file cannot be stored because the referenced resource does not exist | OperationException |
Outcome.Status.ERROR_UNEXPECTED |
an unexpected error occurred preventing the successful execution of the operation | OperationException |
Status#ERROR_UNKNOWN |
a connectivity problem caused the interruption of the operation whose outcome is unknown | OperationException |
Operation.Count, Operation.Create, Operation.Delete, Operation.Download, Operation.Match, Operation.Merge, Operation.Retrieve, Operation.Sparql, Operation.SparqlDelete, Operation.SparqlUpdate, Operation.Update, Operation.Upload
Modifier | Constructor and Description |
---|---|
protected |
Upload(Map<String,String> inheritedNamespaces,
org.openrdf.model.URI id) |
Modifier and Type | Method and Description |
---|---|
protected abstract Outcome |
doExec(Long timeout,
org.openrdf.model.URI resourceID,
Representation representation) |
Outcome |
exec()
Executes the operation, returning its outcome.
|
Operation.Upload |
namespaces(Map<String,String> namespaces)
Sets the optional namespaces for this operation.
|
Operation.Upload |
representation(Representation representation)
Sets the representation to upload, if any.
|
Operation.Upload |
timeout(Long timeout)
Sets the optional timeout for this operation in milliseconds.
|
public Operation.Upload timeout(@Nullable Long timeout)
Operation
public Operation.Upload namespaces(@Nullable Map<String,String> namespaces)
Operation
Session
. Passing null will remove any namespace map
previously set on the operation.namespaces
in class Operation
namespaces
- the namespace map overriding session namespaces; null to resetpublic final Operation.Upload representation(@Nullable Representation representation)
representation
- the representation to upload, if anypublic final Outcome exec() throws OperationException
OperationException
- in case of failure (see possible outcome status codes)protected abstract Outcome doExec(@Nullable Long timeout, org.openrdf.model.URI resourceID, @Nullable Representation representation) throws OperationException
OperationException
Copyright © 2015–2016 FBK-irst. All rights reserved.