Versionen im Vergleich

Schlüssel

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

...

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...

...