public class MultipartMNode extends MultipartD1Node implements MNode
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
defaultRestClient, defaultSession, latestRestClient, latestSession, nodeType
SERVICE_VERSION
Constructor and Description |
---|
MultipartMNode(MultipartRestClient mrc,
String nodeBaseServiceUrl)
Construct a new client-side MultipartMNode (Member Node) object,
passing in the base url of the member node for calling its services.
|
MultipartMNode(MultipartRestClient mrc,
String nodeBaseServiceUrl,
Session session)
Construct a new client-side MultipartMNode (Member Node) object,
passing in the base url of the member node for calling its services,
and the Session to use for connections to that node.
|
MultipartMNode(String nodeBaseServiceUrl)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Identifier |
archive(Identifier pid) |
Identifier |
archive(Session session,
Identifier pid)
sets the archived flag to true on an MN or CN
|
Identifier |
create(Session session,
Identifier pid,
InputStream object,
SystemMetadata sysmeta) |
Identifier |
delete(Identifier pid) |
Identifier |
delete(Session session,
Identifier pid) |
DescribeResponse |
describe(Identifier pid) |
DescribeResponse |
describe(Session session,
Identifier pid) |
Identifier |
generateIdentifier(Session session,
String scheme,
String fragment) |
Identifier |
generateIdentifier(String scheme,
String fragment) |
InputStream |
get(Identifier pid)
Get the resource with the specified pid.
|
InputStream |
get(Session session,
Identifier pid)
Get the resource with the specified pid.
|
Node |
getCapabilities() |
Checksum |
getChecksum(Identifier pid,
String checksumAlgorithm) |
Checksum |
getChecksum(Session session,
Identifier pid,
String checksumAlgorithm)
This method can handle both the MN and CN method, although the CN overriding method
will need to recast the InvalidRequest exception and use 'null' for the checksumAlgorithm param
|
Log |
getLogRecords(Session session,
Date fromDate,
Date toDate,
String event,
String idFilter,
Integer start,
Integer count) |
String |
getNodeBaseServiceUrl()
Retrieve the service URL for this node.
|
InputStream |
getPackage(Session session,
ObjectFormatIdentifier packageType,
Identifier id) |
InputStream |
getReplica(Session session,
Identifier pid) |
SystemMetadata |
getSystemMetadata(Session session,
Identifier id)
Get the system metadata from a resource with the specified guid, potentially using the local
system metadata cache if specified to do so.
|
boolean |
isAuthorized(Identifier pid,
Permission action) |
boolean |
isAuthorized(Session session,
Identifier pid,
Permission action) |
ObjectList |
listObjects(Session session,
Date fromDate,
Date toDate,
ObjectFormatIdentifier formatid,
Identifier identifier,
Boolean replicaStatus,
Integer start,
Integer count) |
OptionList |
listViews(Session session) |
Date |
ping() |
boolean |
replicate(Session session,
SystemMetadata sysmeta,
NodeReference sourceNode) |
boolean |
synchronizationFailed(Session session,
SynchronizationFailed message) |
Identifier |
update(Session session,
Identifier pid,
InputStream object,
Identifier newPid,
SystemMetadata sysmeta) |
boolean |
updateSystemMetadata(Session session,
Identifier pid,
SystemMetadata sysmeta) |
InputStream |
view(Session session,
String theme,
Identifier id) |
closeLoudly, deserializeServiceType, getLatestRequestUrl, getNodeId, getNodeType, getQueryEngineDescription, getRestClient, listQueryEngines, query, setNodeBaseServiceUrl, setNodeId, setNodeType, systemMetadataChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLatestRequestUrl, getNodeId, getNodeType, setNodeId, setNodeType
systemMetadataChanged
getQueryEngineDescription, listQueryEngines, query
@Deprecated public MultipartMNode(String nodeBaseServiceUrl) throws IOException, ClientSideException
nodeBaseServiceUrl
- base url for constructing service endpoints.ClientSideException
IOException
public MultipartMNode(MultipartRestClient mrc, String nodeBaseServiceUrl)
nodeBaseServiceUrl
- base url for constructing service endpoints.public MultipartMNode(MultipartRestClient mrc, String nodeBaseServiceUrl, Session session)
nodeBaseServiceUrl
- base url for constructing service endpoints.session
- - the Session object passed to the CertificateManager
to be used for establishing connectionspublic String getNodeBaseServiceUrl()
MultipartD1Node
getNodeBaseServiceUrl
in interface D1Node
getNodeBaseServiceUrl
in class MultipartD1Node
public Date ping() throws NotImplemented, ServiceFailure, InsufficientResources
ping
in interface MNCore
ping
in class MultipartD1Node
NotImplemented
ServiceFailure
InsufficientResources
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_core.ping
public ObjectList listObjects(Session session, Date fromDate, Date toDate, ObjectFormatIdentifier formatid, Identifier identifier, Boolean replicaStatus, Integer start, Integer count) throws InvalidRequest, InvalidToken, NotAuthorized, NotImplemented, ServiceFailure
listObjects
in interface MNRead
InvalidRequest
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_read.listObjects
public Node getCapabilities() throws NotImplemented, ServiceFailure
getCapabilities
in interface MNCore
getCapabilities
in class MultipartD1Node
NotImplemented
ServiceFailure
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_core.getCapabilities
public InputStream get(Identifier pid) throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound, InsufficientResources
MultipartD1Node
get
in class MultipartD1Node
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
NotFound
InsufficientResources
public InputStream get(Session session, Identifier pid) throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound, InsufficientResources
MultipartD1Node
get
in interface MNRead
get
in class MultipartD1Node
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
NotFound
InsufficientResources
public Log getLogRecords(Session session, Date fromDate, Date toDate, String event, String idFilter, Integer start, Integer count) throws InvalidToken, InvalidRequest, ServiceFailure, NotAuthorized, NotImplemented
getLogRecords
in interface MNCore
InvalidToken
InvalidRequest
ServiceFailure
NotAuthorized
NotImplemented
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_core.getLogRecords
public SystemMetadata getSystemMetadata(Session session, Identifier id) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented
getSystemMetadata
in interface MNRead
getSystemMetadata
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
NotFound
NotImplemented
DataONE API Reference (MemberNode API)
,
DataONE API Reference (CoordinatingNode API)
public DescribeResponse describe(Identifier pid) throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound
describe
in class MultipartD1Node
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
NotFound
public DescribeResponse describe(Session session, Identifier pid) throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound
describe
in interface MNRead
describe
in class MultipartD1Node
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
NotFound
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_read.describe
public Checksum getChecksum(Identifier pid, String checksumAlgorithm) throws InvalidRequest, InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound
getChecksum
in class MultipartD1Node
InvalidRequest
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
NotFound
public Checksum getChecksum(Session session, Identifier pid, String checksumAlgorithm) throws InvalidRequest, InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound
MultipartD1Node
getChecksum
in interface MNRead
getChecksum
in class MultipartD1Node
checksumAlgorithm
- - for MN implementations onlyInvalidRequest
- - for MN implementations onlyInvalidToken
NotAuthorized
NotImplemented
ServiceFailure
NotFound
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_read.getChecksum
public boolean synchronizationFailed(Session session, SynchronizationFailed message) throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure
synchronizationFailed
in interface MNRead
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_read.synchronizationFailed
public boolean isAuthorized(Identifier pid, Permission action) throws ServiceFailure, InvalidRequest, InvalidToken, NotFound, NotAuthorized, NotImplemented
isAuthorized
in class MultipartD1Node
ServiceFailure
InvalidRequest
InvalidToken
NotFound
NotAuthorized
NotImplemented
public boolean isAuthorized(Session session, Identifier pid, Permission action) throws ServiceFailure, InvalidRequest, InvalidToken, NotFound, NotAuthorized, NotImplemented
isAuthorized
in interface MNAuthorization
isAuthorized
in class MultipartD1Node
ServiceFailure
InvalidRequest
InvalidToken
NotFound
NotAuthorized
NotImplemented
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_auth.isAuthorized
public Identifier generateIdentifier(String scheme, String fragment) throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented, InvalidRequest
generateIdentifier
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
NotImplemented
InvalidRequest
public Identifier generateIdentifier(Session session, String scheme, String fragment) throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented, InvalidRequest
generateIdentifier
in interface MNStorage
generateIdentifier
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
NotImplemented
InvalidRequest
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MNStorage.generateIdentifier
public Identifier create(Session session, Identifier pid, InputStream object, SystemMetadata sysmeta) throws IdentifierNotUnique, InsufficientResources, InvalidRequest, InvalidSystemMetadata, InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, UnsupportedType
create
in interface MNStorage
IdentifierNotUnique
InsufficientResources
InvalidRequest
InvalidSystemMetadata
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
UnsupportedType
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_storage.create
public boolean updateSystemMetadata(Session session, Identifier pid, SystemMetadata sysmeta) throws NotImplemented, NotAuthorized, ServiceFailure, InvalidRequest, InvalidSystemMetadata, InvalidToken
updateSystemMetadata
in interface MNStorage
updateSystemMetadata
in class MultipartD1Node
NotImplemented
NotAuthorized
ServiceFailure
InvalidRequest
InvalidSystemMetadata
InvalidToken
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_storage.updateSystemMetadata
public Identifier update(Session session, Identifier pid, InputStream object, Identifier newPid, SystemMetadata sysmeta) throws IdentifierNotUnique, InsufficientResources, InvalidRequest, InvalidSystemMetadata, InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, UnsupportedType, NotFound
update
in interface MNStorage
IdentifierNotUnique
InsufficientResources
InvalidRequest
InvalidSystemMetadata
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
UnsupportedType
NotFound
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_storage.update
public Identifier archive(Identifier pid) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented
archive
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
NotFound
NotImplemented
public Identifier archive(Session session, Identifier pid) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented
MultipartD1Node
archive
in interface MNStorage
archive
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
NotFound
NotImplemented
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_storage.archive
public Identifier delete(Identifier pid) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented
delete
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
NotFound
NotImplemented
public Identifier delete(Session session, Identifier pid) throws InvalidToken, ServiceFailure, NotAuthorized, NotFound, NotImplemented
delete
in interface MNStorage
delete
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
NotFound
NotImplemented
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_storage.delete
public boolean replicate(Session session, SystemMetadata sysmeta, NodeReference sourceNode) throws NotImplemented, ServiceFailure, NotAuthorized, InvalidRequest, InvalidToken, InsufficientResources, UnsupportedType
replicate
in interface MNReplication
NotImplemented
ServiceFailure
NotAuthorized
InvalidRequest
InvalidToken
InsufficientResources
UnsupportedType
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MN_replication.replicate
public InputStream getReplica(Session session, Identifier pid) throws InvalidToken, NotAuthorized, NotImplemented, ServiceFailure, NotFound, InsufficientResources
getReplica
in interface MNRead
InvalidToken
NotAuthorized
NotImplemented
ServiceFailure
NotFound
InsufficientResources
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MNRead.getReplica
public InputStream view(Session session, String theme, Identifier id) throws InvalidToken, ServiceFailure, NotAuthorized, InvalidRequest, NotImplemented, NotFound
view
in interface MNView
view
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
InvalidRequest
NotImplemented
NotFound
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MNView.view
public OptionList listViews(Session session) throws InvalidToken, ServiceFailure, NotAuthorized, InvalidRequest, NotImplemented
listViews
in interface MNView
listViews
in class MultipartD1Node
InvalidToken
ServiceFailure
NotAuthorized
InvalidRequest
NotImplemented
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MNView.listViews
public InputStream getPackage(Session session, ObjectFormatIdentifier packageType, Identifier id) throws InvalidToken, ServiceFailure, NotAuthorized, InvalidRequest, NotImplemented, NotFound, UnsupportedType
getPackage
in interface MNPackage
InvalidToken
ServiceFailure
NotAuthorized
InvalidRequest
NotImplemented
NotFound
UnsupportedType
https://purl.dataone.org/architecturev2/apis/MN_APIs.html#MNPackage.getPackage
Copyright © 2020. All Rights Reserved.