Um die Anbindung eigener Anwendungen an den URN-Service bzw. die URN-Rest-API zu unterstützen, stellen wir einen Java-Client zur Verfügung.
Die Nutzung des Java-Clients erfolgt auf eigene Gefahr. Anpassungen finden nur innerhalb unseres URN-Release-Prozesses statt.
Folgende Schnittstellen
UrnNamespaceRepository | Interface for using the query- and creation-methods related to URN-Namespaces. |
UrnOrganisationRepository | Interface for using the query-methods related to URN-Organisations. |
UrnPoliciesRepository | Interface for using the query-methods related to URN-Policies. |
UrnRepository | Interface for REST-API-Entry-Point to get information via RESTApiInfoResource about the URN-REST-API itself. |
UrnUrnRepository | Interface for using the query- and creation-methods related to URNs. |
wurden hier implementiert:
UrnNamespaceRestClient | Entry point for the users of the URN client to access the RESTNamespaceResources. |
UrnOrganisationRestClient | Entry point for the users of the URN client to access the RESTOrganisationResource. |
UrnPoliciesRestClient | Entry point for the users of the URN client to access the RESTPoliciesResource. |
UrnRestClient | Entry point for the users of the URN client to get information via RESTApiInfoResource about the URn-REST-API. |
UrnUrnRestClient | Handles the task of making the connections and the requests to the Urn-Service's RestApi. |
Technische Voraussetzungen:
- Die Verwendung von Java 8 oder kompatiblere JVM Sprache in der entsprechenden Version.
- Berechtigung zur Einspielung von URNS der eigenen Institutionen innerhalb des eigenen Namensraumes in Form von LOGIN / USER Credentials.
- Die URL zur URN-Rest-API (z.B.: "http://api.nbn-resolving.org/sandbox/v2/").
Implementierungen
...
Anker | ||||
---|---|---|---|---|
|
Codeblock | ||||
---|---|---|---|---|
| ||||
private static final String V2_URI = "http://api.nbn-resolving.org/sandbox/v2/"; private static UrnRestClient urnRepository; public static void main(String[] args) { urnRepository = new UrnRestClient(V2_URI); final ApiInfo info = urnRepository.getInfo(); } |
...
Info | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
ApiInfo [ self=http://api.nbn-resolving.org/sandbox/v2/, ] |
...
Anker | ||||
---|---|---|---|---|
|
Um die Namensräume gezielt abfragen zu können, werden Filter- und Sortierparameter benötigt.
...
Info | ||
---|---|---|
| ||
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest - getNamespace()... |
...
Anker | ||||
---|---|---|---|---|
|
Suche nach bestimmter Organisation mittels Login-Name
...
Info | ||
---|---|---|
| ||
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest - getOrganisationWithFilter()... [main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest - Response End... |
Anker | ||||
---|---|---|---|---|
|
Suche über alle URNs mittels Filter
...