Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Info
visibletrue
deckApiInfo
idapiInfo
labelOutput
titleOutput
cardApiInfo

ApiInfo [

self=https://sandbox.nbn-resolving.org/v2/,
version=4.2.7,
admins=https://sandbox.nbn-resolving.org/v2/admins,
namespaces=https://sandbox.nbn-resolving.org/v2/namespaces,
organisations=https://sandbox.nbn-resolving.org/v2/organisations,
validationPolicies=https://sandbox.nbn-resolving.org/v2/policies/urn-naming,
urlPolicies=https://sandbox.nbn-resolving.org/v2/policies/url,
urns=https://sandbox.nbn-resolving.org/v2/urns,
documentation=https://sandbox.nbn-resolving.org/v2/docs/index.html

]


Anker
urnnamespacerestclient
urnnamespacerestclient
UrnNamespaceRestClient

...

Codeblock
languagejava
themeEclipse
titlegetNamespaces()
private static final String V2_URI = "httphttps://apisandbox.nbn-resolving.org/sandbox/v2/";
private static final String DEFAULT_NASP_WILDCARD = "urn:nbn:de*";
private static UrnNamespaceRestClient naspRepository;


public static void main(String[] args) {
 	naspRepository = new UrnNamespaceRestClient(V2_URI);
	
	  final Optional<NamespaceFilter> naspFilter = Optional
                .of(new NamespaceFilter(NamespaceFilterKey.NAME, DEFAULT_NASP_WILDCARD));
        final NamespaceSortParameters naspsortparams = new NamespaceSortParameters().getDefault();
        naspsortparams.setSortBy(NamespaceSortKey.NAME);
        final PagingParameters pagingParameters = new PagingParameters().getDefault();

        UrnRestResultNamespaceObject result = null;

        try {
            result = naspRepository.getNamespacesWithFilter(ORG_LOGIN, ORG_PASSWORD, naspFilter, naspsortparams,
                    pagingParameters);
        } catch (final UrnRestApiNotAvailableException e) {
            System.out.println("The client cannot connect to the URN-REST-API.");
        }
}

...

Info
titleBeispielantwort mittels toString() und Log4j

[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest - You will only see information enabled for your login.
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest - Request successful: true Count results: 428 Results have several pages: true
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest -
These items are on the first resultpage:
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest -
urn:nbn:de,
2003-10-01T06:00:00Z,
2006-04-25T09:36:22Z,
httphttps://apisandbox.nbn-resolving.org/sandbox/v2/organisations/id/1,
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest -
urn:nbn:de:0001,
2003-10-17T12:39:18Z,
2003-10-17T12:39:18Z,
httphttps://apisandbox.nbn-resolving.org/sandbox/v2/organisations/id/35,
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest -
urn:nbn:de:0002,
2003-10-17T12:36:50Z,
2003-10-17T12:36:50Z,
httphttps://apisandbox.nbn-resolving.org/sandbox/v2/organisations/id/22,

....

....

....

Suche nach einem bestimmten Namensraum mittels Namen

...

Codeblock
languagejava
themeEclipse
titlegetNamespace()
private static final String V2_URI = "httphttps://apisandbox.nbn-resolving.org/sandbox/v2/";
private static final String DEFAULT_NASP_WILDCARD = "urn:nbn:de*";
private static final String ORG_NAMESPACE = "urn:nbn:de:0007";
private static UrnNamespaceRestClient naspRepository;


public static void main(String[] args) {
 	naspRepository = new UrnNamespaceRestClient(V2_URI);
	
	UrnRestResultNamespaceObject result = null;

        try {
            result = naspRepository.getNamespaceViaName(ORG_LOGIN, ORG_PASSWORD, ORG_NAMESPACE, ORG_USER);
        } catch (final UrnRestApiNotAvailableException e) {
            System.out.println("The client cannot connect to the URN-REST-API.");
        }

        LOGGER.info("Response End...");
}

...

Info
titleBeispielantwort mittels toString() und Log4j

[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest - getNamespace()...
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest -
UrnRestResultNamespaceObject [
urnNameSugg=[],
namespace=RESTNamespaceRepresentation [
self=httphttps://apisandbox.nbn-resolving.org/sandbox/v2/namespaces/name/urn:nbn:de:0007,
name=urn:nbn:de:0007,
created=2023-07-11T09:13:37Z,
lastModified=2023-07-11T09:13:37Z,
allowsRegistration=true,
owner=httphttps://apisandbox.nbn-resolving.org/sandboxv2/v2/organisations/id/19066,
urnNamingPolicy=httphttps://apisandbox.nbn-resolving.org/sandbox/v2/policies/urn-naming/id/default,
urlPolicy=httphttps://apisandbox.nbn-resolving.org/sandbox/v2/policies/url/id/only-http-ftp,
urns=httphttps://apisandbox.nbn-resolving.org/sandbox/v2/namespaces/name/urn:nbn:de:0007/urns,
urnSuggestion=httphttps://apisandbox.nbn-resolving.org/sandbox/v2/namespaces/name/urn:nbn:de:0007/urn-suggestion],
UrnRestResultObject [successful=true, httpStatusCode=200, ]]
[main] INFO de.dnb.resolvingdienste.urn.restapi.client.testurnclient.mainForTest - Response End...

...