public class MdrClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH_SEPARATOR
Path separator.
|
| Constructor and Description |
|---|
MdrClient()
Create an MdrClient instance with the properties loaded from mdr.properties file.
|
MdrClient(String mdrBaseUrl)
Create an MdrClient instance.
|
MdrClient(String mdrBaseUrl,
jakarta.ws.rs.client.Client client)
Create an MDR client with a readily configured HTTP Client (with proxy settings).
|
MdrClient(String mdrBaseUrl,
String proxyHost,
String proxyPort)
Create a MDR client instance with proxy.
|
MdrClient(String mdrBaseUrl,
String proxyHost,
String proxyPort,
String proxyUsername,
String proxyPassword)
Create an MDR client instance with proxy authentication.
|
MdrClient(String mdrBaseUrl,
String proxyHost,
String proxyPort,
String proxyUsername,
String proxyPassword,
String proxyRealm)
Create an MDR client instance with proxy authentication and realm.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanCache()
Clean the cache.
|
List<Result> |
filterMembers(List<Result> members,
EnumElementType enumElementType)
Filter members by type.
|
URI |
getBaseUri()
Get the MDR RESTful interface base URI.
|
Catalogue |
getCatalogue(String catalogueId,
String languageCode)
Get a catalogue by its urn.
|
Catalogue |
getCatalogue(String catalogueId,
String languageCode,
String accessToken,
String userAuthId)
Get a catalogue by its urn.
|
Code |
getCode(String mdrCatalogueId,
String mdrCodeId)
Get a code, without authentication.
|
Code |
getCode(String mdrCatalogueId,
String mdrCodeId,
String accessToken,
String userAuthId)
Get a code.
|
ArrayList<Slot> |
getCodeSlots(String mdrCatalogueId,
String mdrCodeId)
Get a codes slots, without authentication.
|
ArrayList<Slot> |
getCodeSlots(String mdrCatalogueId,
String mdrCodeId,
String accessToken,
String userAuthId)
Get a codes slots.
|
DataElement |
getDataElement(String mdrDataElementId,
String languageCode)
Get the whole DataElement object from the MDR without authentication.
|
DataElement |
getDataElement(String mdrDataElementId,
String languageCode,
String accessToken,
String userAccessToken)
Get the whole DataElement object from the MDR.
|
Catalogue |
getDataElementCatalogue(String mdrDataElementId,
String languageCode)
Get a data element catalogue (when applicable).
|
Catalogue |
getDataElementCatalogue(String mdrDataElementId,
String languageCode,
String accessToken,
String userAuthId)
Get a data element catalogue (when applicable).
|
Definition |
getDataElementDefinition(String mdrDataElementId,
String languageCode)
Get the designation/definition and the value domain of an MDR data element as
Definition, without authentication. |
Definition |
getDataElementDefinition(String mdrDataElementId,
String languageCode,
String accessToken,
String userAccessToken)
Get the designation/definition and the value domain of a MDR data element as
Definition. |
List<Label> |
getDataElementGroupLabel(String recordId,
String languageCode)
Get dataelementgroup label, without authentication.
|
List<Label> |
getDataElementGroupLabel(String groupId,
String languageCode,
String accessToken,
String userAuthId)
Get dataelementgroup label from the MDR.
|
ArrayList<Slot> |
getDataElementGroupSlots(String mdrDataElementGroupId)
Get a data element group's slots, without authentication.
|
ArrayList<Slot> |
getDataElementGroupSlots(String mdrDataElementGroupId,
String accessToken,
String userAuthId)
Get a data group's slots.
|
List<Result> |
getDataElementsFromGroup(String mdrGroupId,
String languageCode)
Deprecated.
no longer supported directly by the MDR. Use
getMembers(String, String)
instead. |
List<Result> |
getDataElementsFromGroup(String mdrGroupId,
String languageCode,
String accessToken,
String userAuthId)
Deprecated.
no longer supported directly by the MDR. Use
getMembers(String, String)
instead. |
ArrayList<Slot> |
getDataElementSlots(String mdrDataElementId)
Get a data element's slots, without authentication.
|
ArrayList<Slot> |
getDataElementSlots(String mdrDataElementId,
String accessToken,
String userAuthId)
Get a data element's slots.
|
Validations |
getDataElementValidations(String mdrDataElementId,
String languageCode)
Get a data element's validations, without authentication.
|
Validations |
getDataElementValidations(String mdrDataElementId,
String languageCode,
String accessToken,
String userAuthId)
Get a data element's validations.
|
protected String |
getJson(String path,
String languageCode)
Get a JSON response, tries to load data from the cache first, without authentication.
|
protected String |
getJson(String path,
String languageCode,
String accessToken,
String userAuthId)
Get a JSON response, tries to load data from the cache first.
|
protected String |
getJsonCatalogue(String catalogueId,
String languageCode,
String accessToken,
String userAuthId)
Get the JSON string representation of a catalogue from the given catalog URN.
|
protected String |
getJsonCode(String mdrCatalogueId,
String mdrCodeId,
String accessToken,
String userAuthId)
Get a codes from the MDR.
|
protected String |
getJsonCodeSlots(String mdrCatalogueId,
String mdrCodeId,
String accessToken,
String userAuthId)
Get a codes slots from the MDR.
|
protected String |
getJsonDataElement(String mdrDataElementId,
String languageCode,
String accessToken,
String userAuthId)
Get the whole DataElement as a JSON object from the MDR.
|
protected String |
getJsonDataElementCatalogue(String mdrDataElementId,
String languageCode,
String accessToken,
String userAuthId)
Get the JSON string representation of the catalogue from the given data element.
|
protected String |
getJsonDataElementDefinition(String mdrDataElementId,
String languageCode,
String accessToken,
String userAuthId)
Get the designation/definition and the value domain of an MDR data element as JSON.
|
protected String |
getJsonDataElementGroupSlots(String mdrDataElementGroupId,
String accessToken,
String userAuthId)
Get a data element group's slots from the MDR.
|
protected String |
getJsonDataElementSlots(String mdrDataElementId,
String accessToken,
String userAuthId)
Get a data element's slots from the MDR.
|
protected String |
getJsonDataElementValidations(String mdrDataElementId,
String languageCode,
String accessToken,
String userAuthId)
Get a data element's validations.
|
protected String |
getJsonLabel(String memberId,
String languageCode,
EnumElementType enumElementType,
String accessToken,
String userAuthId)
Get the label of an MDR element as JSON string.
|
protected String |
getJsonMembers(String mdrGroupId,
String languageCode,
String accessToken,
String userAuthId)
Get all the data elements from a group defined in the MDR as JSON string.
|
protected String |
getJsonNamespaceMembers(String languageCode,
String accessToken,
String userAuthId,
String namespace)
Get elements from a namespace (e.g.
|
protected String |
getJsonNamespaces(String languageCode,
String accessToken,
String userAuthId)
Get all available namespaces as JSON.
|
protected String |
getJsonRecordDefinition(String mdrRecordId,
String languageCode,
String accessToken,
String userAuthId)
Get the designation/definition and the value domain of an MDR record as JSON.
|
protected String |
getJsonRecordMembers(String mdrGroupId,
String languageCode,
String accessToken,
String userAuthId)
Get all the data elements from a record defined in the MDR as JSON string.
|
protected String |
getJsonRecordSlots(String mdrRecordId,
String accessToken,
String userAuthId)
Gets a record's slots from the MDR.
|
protected String |
getJsonSearch(String searchText,
String languageCode,
String accessToken,
String namespace)
Search for data that are related to the given search text.
|
protected String |
getJsonSearchLocal(String searchText,
String languageCode,
String accessToken)
Search for data that are related to the given search text.
|
List<Result> |
getMembers(String mdrGroupId,
String languageCode)
Get the members of a given group defined in the MDR, not authenticated.
|
List<Result> |
getMembers(String mdrGroupId,
String languageCode,
String accessToken,
String userAuthId)
Get the members of a given group defined in the MDR.
|
List<Result> |
getNamespaceMembers(String languageCode,
String namespace)
Get the root groups from the MDR (e.g.
|
List<Result> |
getNamespaceMembers(String languageCode,
String accessToken,
String userAuthId,
String namespace)
Get the root groups from the MDR (e.g.
|
List<Namespace> |
getNamespaces(String languageCode)
Get the namespeaces from the MDR, without authentication.
|
List<Namespace> |
getNamespaces(String languageCode,
String accessToken,
String userAuthId)
Get the namespeaces from the MDR.
|
RecordDefinition |
getRecordDefinition(String mdrRecordId,
String languageCode)
Get the designation/definition and the value domain of an MDR record as
RecordDefinition, without authentication. |
RecordDefinition |
getRecordDefinition(String mdrRecordId,
String languageCode,
String accessToken,
String userAccessToken)
Get the designation/definition and the value domain of a MDR record as
RecordDefinition. |
List<Label> |
getRecordLabel(String recordId,
String languageCode)
Get record label, without authentication.
|
List<Label> |
getRecordLabel(String recordId,
String languageCode,
String accessToken,
String userAuthId)
Get record label from the MDR.
|
List<Result> |
getRecordMembers(String recordId,
String languageCode)
Get the members of a given record defined in the MDR without authentication.
|
List<Result> |
getRecordMembers(String recordId,
String languageCode,
String accessToken,
String userAuthId)
Get the members of a given record defined in the MDR.
|
ArrayList<Slot> |
getRecordSlots(String mdrRecordId)
Gets the slots of a record without authentication.
|
ArrayList<Slot> |
getRecordSlots(String mdrRecordId,
String accessToken,
String userAuthId)
Gets the slots of a record.
|
protected String |
getUserJsonRootElements(String languageCode,
String accessToken,
String userAuthId)
Get the root elements from the MDR for a specific user (e.g.
|
ResultList |
getUserNamespaceRepresentations(String mdrDataElementId,
String accessToken,
String userAuthId)
Get the representations of a dataelement for a specific users namespace.
|
ResultList |
getUserRootElements(String languageCode,
String accessToken,
String userAuthId)
Get the root elements from the MDR for a specific user.
|
List<Result> |
search(String searchText,
String languageCode,
String accessToken)
Search for data that is related to the given search text.
|
List<Result> |
searchInNamespace(String searchText,
String languageCode,
String accessToken,
String namespace)
Search for data that is related to the given search text.
|
List<Result> |
searchLocal(String searchText,
String languageCode,
String accessToken)
Search for data that is related to the given search text.
|
public static final String PATH_SEPARATOR
public MdrClient()
public MdrClient(String mdrBaseUrl)
MdrClient(String, String, String) instead
in case a proxy is necessary to contact the MDR client.mdrBaseUrl - the MDR REST interface base URLpublic MdrClient(String mdrBaseUrl, String proxyHost, String proxyPort)
mdrBaseUrl - the MDR REST interface base URLproxyHost - the proxy hostproxyPort - the proxy portpublic MdrClient(String mdrBaseUrl, String proxyHost, String proxyPort, String proxyUsername, String proxyPassword)
mdrBaseUrl - the MDR REST interface base URLproxyHost - the MDR REST interface proxy hostproxyPort - the MDR REST interface proxy portproxyUsername - the MDR REST interface proxy user nameproxyPassword - the MDR REST interface proxy passwordpublic MdrClient(String mdrBaseUrl, String proxyHost, String proxyPort, String proxyUsername, String proxyPassword, String proxyRealm)
mdrBaseUrl - the MDR REST interface base URLproxyHost - the MDR REST interface proxy hostproxyPort - the MDR REST interface proxy portproxyUsername - the MDR REST interface proxy user nameproxyPassword - the MDR REST interface proxy passwordproxyRealm - the MDR REST interface proxy realm namepublic MdrClient(String mdrBaseUrl, jakarta.ws.rs.client.Client client)
mdrBaseUrl - the MDR URLclient - a jersey webclientprotected final String getJsonLabel(String memberId, String languageCode, EnumElementType enumElementType, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
memberId - e.g. "urn:mdr:record:1:1"languageCode - e.g. "de".enumElementType - type of the data element EnumElementTypeaccessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls
to the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorpublic final List<Label> getRecordLabel(String recordId, String languageCode) throws MdrConnectionException, ExecutionException
recordId - e.g. "urn:mdr:record:1:1 (a test record)"languageCode - e.g. "de".MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorgetRecordLabel(String, String, String, String)public final List<Label> getRecordLabel(String recordId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
recordId - e.g. "urn:mdr:record:1:1 (a test record)"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorpublic final List<Label> getDataElementGroupLabel(String recordId, String languageCode) throws MdrConnectionException, ExecutionException
recordId - e.g. "urn:mdr:dataelementgroup:1:1 (a test record)"languageCode - e.g. "de".MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorgetDataElementGroupLabel(String, String, String, String)public final List<Label> getDataElementGroupLabel(String groupId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
groupId - e.g. "urn:mdr:dataelementgroup:1:1 (a test record)"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorpublic final ArrayList<Slot> getRecordSlots(String mdrRecordId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrRecordId - e.g. "urn:mdr:record:1:1 (a test record)"MdrConnectionException - Todo.MdrInvalidResponseException - Todo.ExecutionException - Todo.getRecordSlots(String, String, String)public final ArrayList<Slot> getRecordSlots(String mdrRecordId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrRecordId - e.g. "urn:mdr:record:1:1 (a test record)"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - Todo.MdrInvalidResponseException - Todo.ExecutionException - Todo.protected final String getJsonRecordMembers(String mdrGroupId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
mdrGroupId - e.g. "urn:mdr:record:1:1 (a test record)"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorpublic final List<Result> getRecordMembers(String recordId, String languageCode) throws MdrConnectionException, ExecutionException
recordId - e.g. "urn:mdr:record:1:1 (a test record)"languageCode - e.g. "de".MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorgetRecordMembers(String, String, String, String)public final List<Result> getRecordMembers(String recordId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
recordId - e.g. "urn:mdr:record:1:1 (a test record)"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorprotected final String getJsonMembers(String mdrGroupId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
mdrGroupId - e.g. "urn:mdr:dataelementgroup:1:1 (for MDS-K)"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorpublic final List<Result> getMembers(String mdrGroupId, String languageCode) throws MdrConnectionException, ExecutionException
mdrGroupId - e.g. "urn:mdr:dataelementgroup:1:1 (for MDS-K)"languageCode - e.g. "de".MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorgetMembers(String, String, String, String)public final List<Result> getMembers(String mdrGroupId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
mdrGroupId - e.g. "urn:mdr:dataelementgroup:1:1 (for MDS-K)"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorprotected final String getJson(String path, String languageCode) throws ExecutionException
path - MDR REST interface path to be calledlanguageCode - e.g. "de".ExecutionException - if there is an execution errorprotected final String getJson(String path, String languageCode, String accessToken, String userAuthId) throws ExecutionException
path - MDR REST interface path to be calledlanguageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.ExecutionException - if there is an execution error@Deprecated public final List<Result> getDataElementsFromGroup(String mdrGroupId, String languageCode) throws MdrConnectionException, ExecutionException
getMembers(String, String)
instead.mdrGroupId - e.g. "urn:mdr:dataelementgroup:1:1 (for MDS-K)"languageCode - e.g. "de".MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorgetDataElementsFromGroup(String, String, String, String)@Deprecated public final List<Result> getDataElementsFromGroup(String mdrGroupId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, ExecutionException
getMembers(String, String)
instead.mdrGroupId - e.g. "urn:mdr:dataelementgroup:1:1 (for MDS-K)"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there is an error while connecting to the MDRExecutionException - if there is an execution errorprotected final String getJsonDataElementValidations(String mdrDataElementId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorprotected final String getJsonDataElementCatalogue(String mdrDataElementId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - data element that has a catalogue e.g. "urn:test:dataelement:3:1"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.protected final String getJsonCatalogue(String catalogueId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
catalogueId - urn of the catalogue e.g. "urn:test:catalog:1:1"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.protected final String getJsonDataElementSlots(String mdrDataElementId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1:0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution errorprotected final String getJsonDataElementGroupSlots(String mdrDataElementGroupId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementGroupId - e.g. "urn:mdr:dataelementgroup:2:1:0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It
is used for the cache loader key - the user specific calls are
cached across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution errorprotected final String getJsonRecordSlots(String mdrRecordId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrRecordId - e.g. "urn:mdr:record:1:1"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.MdrConnectionException - Todo.MdrInvalidResponseException - Todo.ExecutionException - Todo.protected final String getJsonCodeSlots(String mdrCatalogueId, String mdrCodeId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrCatalogueId - e.g. "urn:mdr:catalog:1:1"mdrCodeId - e.g. "urn:mdr:code:2:1.0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls
to the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution errorpublic final ArrayList<Slot> getDataElementSlots(String mdrDataElementId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorgetDataElementSlots(String, String, String)public final ArrayList<Slot> getDataElementSlots(String mdrDataElementId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorpublic final ArrayList<Slot> getDataElementGroupSlots(String mdrDataElementGroupId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementGroupId - e.g. "urn:mdr:datagroup:2:1.0"MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorgetDataElementGroupSlots(String, String, String)public final ArrayList<Slot> getDataElementGroupSlots(String mdrDataElementGroupId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementGroupId - e.g. "urn:mdr:datagroup:2:1.0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It
is used for the cache loader key - the user specific calls are
cached across sessions.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorpublic final Code getCode(String mdrCatalogueId, String mdrCodeId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrCatalogueId - e.g. "urn:mdr:catalog:1:1"mdrCodeId - e.g. "urn:mdr:code:2:1.0"MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorgetCode(String, String, String, String)public final Code getCode(String mdrCatalogueId, String mdrCodeId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrCatalogueId - e.g. "urn:mdr:catalog:1:1"mdrCodeId - e.g. "urn:mdr:code:2:1.0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls
to the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication monitor id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorprotected final String getJsonCode(String mdrCatalogueId, String mdrCodeId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrCatalogueId - e.g. "urn:mdr:catalog:1:1"mdrCodeId - e.g. "urn:mdr:code:2:1.0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls
to the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication monitor id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution errorpublic final ArrayList<Slot> getCodeSlots(String mdrCatalogueId, String mdrCodeId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrCatalogueId - e.g. "urn:mdr:catalog:1:1"mdrCodeId - e.g. "urn:mdr:code:2:1.0"MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorgetCodeSlots(String, String, String, String)public final ArrayList<Slot> getCodeSlots(String mdrCatalogueId, String mdrCodeId, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrCatalogueId - e.g. "urn:mdr:catalog:1:1"mdrCodeId - e.g. "urn:mdr:code:2:1.0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls
to the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached across
sessions.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - the MDR response is not valid.ExecutionException - if there is an execution errorprotected final String getJsonSearch(String searchText, String languageCode, String accessToken, String namespace) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
searchText - the text to search forlanguageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.namespace - the namespace to search in. can be omitted to search in own namespaceMdrConnectionException - if there is an error while connecting to the MDRMdrInvalidResponseException - if an invalid response is retrieved from the MDRExecutionException - if there is an execution errorprotected final String getJsonSearchLocal(String searchText, String languageCode, String accessToken) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
searchText - the text to search forlanguageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.MdrConnectionException - if there is an error while connecting to the MDRMdrInvalidResponseException - if an invalid response is retrieved from the MDRExecutionException - if there is an execution errorpublic final Validations getDataElementValidations(String mdrDataElementId, String languageCode) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.getDataElementValidations(String, String, String, String)public final Validations getDataElementValidations(String mdrDataElementId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final Catalogue getDataElementCatalogue(String mdrDataElementId, String languageCode) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - data element that has a catalogue e.g. "urn:test:dataelement:3:1"languageCode - e.g. "de".MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final Catalogue getDataElementCatalogue(String mdrDataElementId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - data element that has a catalogue e.g. "urn:test:dataelement:3:1"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final Catalogue getCatalogue(String catalogueId, String languageCode) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
catalogueId - urn of the catalogue e.g. "urn:test:catalog:1:1"languageCode - e.g. "de".MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final Catalogue getCatalogue(String catalogueId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
catalogueId - urn of the catalogue e.g. "urn:test:catalog:1:1"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final List<Result> search(String searchText, String languageCode, String accessToken) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
searchText - the text to search forlanguageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final List<Result> searchInNamespace(String searchText, String languageCode, String accessToken, String namespace) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
searchText - the text to search forlanguageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.namespace - the namespace to search in.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final List<Result> searchLocal(String searchText, String languageCode, String accessToken) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
searchText - the text to search forlanguageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.protected final String getJsonDataElementDefinition(String mdrDataElementId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.protected final String getJsonDataElement(String mdrDataElementId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionExceptionMdrInvalidResponseExceptionExecutionExceptionprotected final String getJsonRecordDefinition(String mdrRecordId, String languageCode, String accessToken, String userAuthId) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrRecordId - e.g. "urn:mdr:record:2:1.0"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final Definition getDataElementDefinition(String mdrDataElementId, String languageCode) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
Definition, without authentication.mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.getDataElementDefinition(String, String, String, String)public final Definition getDataElementDefinition(String mdrDataElementId, String languageCode, String accessToken, String userAccessToken) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
Definition.mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAccessToken - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final RecordDefinition getRecordDefinition(String mdrRecordId, String languageCode) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
RecordDefinition, without authentication.mdrRecordId - e.g. "urn:osse-123:record:2:1"languageCode - e.g. "de".MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.getRecordDefinition(String, String, String, String)public final RecordDefinition getRecordDefinition(String mdrRecordId, String languageCode, String accessToken, String userAccessToken) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
RecordDefinition.mdrRecordId - e.g. "urn:osse-123:record:2:1"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls
to the MDR when a user is logged in. Use null for anonymous access.userAccessToken - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionException - if there was an error communicating with the MDR.MdrInvalidResponseException - if the MDR response is not valid.ExecutionException - if there is an execution error.public final List<Result> filterMembers(List<Result> members, EnumElementType enumElementType)
EnumElementType from an element
result list, use this method.members - a list of MDR members.enumElementType - type of the members list returned.protected final String getJsonNamespaces(String languageCode, String accessToken, String userAuthId) throws ExecutionException
languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.ExecutionException - if there is an execution error.protected final String getJsonNamespaceMembers(String languageCode, String accessToken, String userAuthId, String namespace) throws ExecutionException
languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.namespace - the namespace from which members will be queried.ExecutionException - if there is an execution error.protected final String getUserJsonRootElements(String languageCode, String accessToken, String userAuthId) throws ExecutionException
languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.ExecutionException - if there is an execution error.public final List<Namespace> getNamespaces(String languageCode) throws ExecutionException
languageCode - e.g. "de".ExecutionException - if there is an execution error.getNamespaces(String, String, String)public final List<Namespace> getNamespaces(String languageCode, String accessToken, String userAuthId) throws ExecutionException
languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.ExecutionException - if there is an execution error.public final List<Result> getNamespaceMembers(String languageCode, String namespace) throws ExecutionException
languageCode - e.g. "de".namespace - the namespace from which members will be queried.ExecutionException - if there is an execution error.getNamespaceMembers(String, String, String, String)public final List<Result> getNamespaceMembers(String languageCode, String accessToken, String userAuthId, String namespace) throws ExecutionException
languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.namespace - the namespace from which members will be queried.ExecutionException - if there is an execution error.public final ResultList getUserRootElements(String languageCode, String accessToken, String userAuthId) throws ExecutionException
languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST calls to
the MDR when a user is logged in. Use null for anonymous access.userAuthId - The user authentication server id of the user who is logged in. It is used
for the cache loader key - the user specific calls are cached across
sessions. Use null for anonymous access.ExecutionException - if there is an execution error.public final ResultList getUserNamespaceRepresentations(String mdrDataElementId, String accessToken, String userAuthId) throws ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAuthId - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.ExecutionException - if there is an execution error.public final DataElement getDataElement(String mdrDataElementId, String languageCode) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".MdrConnectionExceptionMdrInvalidResponseExceptionExecutionExceptiongetDataElement(String, String, String, String)public final DataElement getDataElement(String mdrDataElementId, String languageCode, String accessToken, String userAccessToken) throws MdrConnectionException, MdrInvalidResponseException, ExecutionException
mdrDataElementId - e.g. "urn:mdr:dataelement:2:1.0"languageCode - e.g. "de".accessToken - Access token, obtained from OSSE.Auth, that should be used on REST
calls to the MDR when a user is logged in. Use null for anonymous
access.userAccessToken - The user authentication server id of the user who is logged in. It is
used for the cache loader key - the user specific calls are cached
across sessions. Use null for anonymous access.MdrConnectionExceptionMdrInvalidResponseExceptionExecutionExceptionpublic final void cleanCache()
public final URI getBaseUri()
Copyright © 2022 Samply Community. All rights reserved.