public class D1Client extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static MultipartRestClient |
multipartRestClient |
| Constructor and Description |
|---|
D1Client() |
| Modifier and Type | Method and Description |
|---|---|
static Identifier |
archive(Session session,
D1Object d1object)
Perform an archive on an object in DataONE with the given D1Object on the
authoritativeMemberNode contained in its systemMetadata.
|
static Identifier |
create(Session session,
D1Object d1object)
Attempts to create the given D1Object on the originMemberNode contained
in its SystemMetadata.
|
static CNode |
getCN()
Get the cached CNode object for calling Coordinating Node services.
|
static CNode |
getCN(Session session)
Deprecated.
broken functionality, and unused. use getCN() or getCN(baseUrl) instead
|
static CNode |
getCN(String cnBaseUrl)
Returns a Coordinating Node using the base service URL to look up the node
in the existing environment.
|
static MNode |
getMN(NodeReference nodeRef)
Return an MNode using the nodeReference for the member node.
|
static MNode |
getMN(String mnBaseUrl)
Returns a Member Node using the base service URL for the node.
|
protected static MultipartRestClient |
getMultipartRestClient() |
static ObsoletesChain |
listUpdateHistory(Identifier pid)
Return the full ObsoletesChain for the given Identifier.
|
static void |
setCN(String cnUrl)
Use this method to set the environment via the baseUrl to the environment's
Coordinating Node.
|
static void |
setNodeLocator(NodeLocator nodeLocator)
For testing, we can override the nodeLocator
|
static Identifier |
update(Session session,
D1Object d1object)
Perform an update an object in DataONE with the given D1Object on the
originMemberNode contained in its systemMetadata.
|
protected static MultipartRestClient multipartRestClient
protected static MultipartRestClient getMultipartRestClient() throws IOException, ClientSideException
IOExceptionClientSideExceptionpublic static void setNodeLocator(NodeLocator nodeLocator)
nodeLocator - public static CNode getCN() throws ServiceFailure, NotImplemented
ServiceFailureNotImplemented@Deprecated public static CNode getCN(Session session) throws ServiceFailure, NotImplemented
session - - the client session to be used in connections, null uses default behavior.ServiceFailureNotImplementedpublic static void setCN(String cnUrl) throws NotImplemented, ServiceFailure
cnUrl - NotImplementedServiceFailurepublic static MNode getMN(String mnBaseUrl) throws ServiceFailure
mnBaseUrl - the service URL for the Member NodeServiceFailurepublic static CNode getCN(String cnBaseUrl) throws ServiceFailure
cnBaseUrl - ServiceFailurepublic static MNode getMN(NodeReference nodeRef) throws ServiceFailure
nodeRef - ServiceFailurepublic static Identifier create(Session session, D1Object d1object) throws InvalidToken, ServiceFailure, NotAuthorized, IdentifierNotUnique, UnsupportedType, InsufficientResources, InvalidSystemMetadata, NotImplemented, InvalidRequest
session - d1object - - the d1object representing both the data bytes and systemMetadataInvalidTokenServiceFailureNotAuthorizedIdentifierNotUniqueUnsupportedTypeInsufficientResourcesInvalidSystemMetadataNotImplementedInvalidRequestpublic static Identifier update(Session session, D1Object d1object) throws InvalidToken, ServiceFailure, NotAuthorized, IdentifierNotUnique, UnsupportedType, InsufficientResources, InvalidSystemMetadata, NotImplemented, InvalidRequest, NotFound
session - d1object - - the d1object representing both the data bytes and systemMetadataInvalidTokenServiceFailureNotAuthorizedIdentifierNotUniqueUnsupportedTypeInsufficientResourcesInvalidSystemMetadataNotImplementedInvalidRequestNotFoundpublic static Identifier archive(Session session, D1Object d1object) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented, InvalidRequest
session - d1object - - the d1object representing both the data bytes and systemMetadataInvalidTokenServiceFailureNotAuthorizedNotImplementedInvalidRequestNotFoundClientSideExceptionpublic static ObsoletesChain listUpdateHistory(Identifier pid) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented
pid - InvalidTokenServiceFailureNotAuthorizedNotFoundNotImplementedClientSideExceptionCopyright © 2020. All Rights Reserved.