public class DnbUrnValidator extends Rfc3188Validator
| Modifier and Type | Field and Description |
|---|---|
static int |
CHECKSUM_NOT_A_NUMBER
Checksum must be a number
|
static int |
INVALID_CHECKSUM
Wrong checksum
|
static int |
MAX_NAMESPACE_LENGTH
Max NAMESPACE length
|
static int |
MAX_UNIQUE_PART_LENGTH
Max UNIQUE PART length
|
static int |
MAX_URN_LENGTH
Max URN length
|
static int |
MIN_URN_LENGTH
Min URN length
|
static int |
NAMESPACE_TOO_LONG
Namespace must be shorter than 52 characters
|
static int |
NO_SEPERATOR
Parts of an URN must be separated by a - character
|
static int |
UNIQUE_PART_TOO_LONG
Unique ID part can be max 200 characters + checksum digit
|
static int |
UNKNOWN_NAMESPACE
Namespace not registered
|
static int |
URN_TOO_LONG
URNs must be shorter than 254 characters
|
static int |
URN_TOO_SHORT
URNs must be longer than 15 characters
|
BAD_COUNTRY_CODE, EMPTY_NBN_STRING, EMPTY_SUBNAMESPACE, INVALID_CHAR_NBN, INVALID_CHAR_NID, iso3106Codes, MUST_START_WITH_URN, NID_TOO_SHORT, NOT_A_NBN, NOT_TWO_DIGIT_CODE, PART_COUNT_TOO_LOW, URN_EQUALS_NULL, URN_IS_EMPTY, URN_IS_VALID, VALID_CHARS| Constructor and Description |
|---|
DnbUrnValidator() |
| Modifier and Type | Method and Description |
|---|---|
static int |
validateUrn(String urn)
Validates if the given URN is compliant German National Library URN policy.
|
charsValidpublic static final int MIN_URN_LENGTH
public static final int MAX_URN_LENGTH
public static final int MAX_NAMESPACE_LENGTH
public static final int MAX_UNIQUE_PART_LENGTH
public static final int URN_TOO_SHORT
public static final int URN_TOO_LONG
public static final int NO_SEPERATOR
public static final int NAMESPACE_TOO_LONG
public static final int UNIQUE_PART_TOO_LONG
public static final int CHECKSUM_NOT_A_NUMBER
public static final int INVALID_CHECKSUM
public static final int UNKNOWN_NAMESPACE
public static int validateUrn(String urn)
urn - A National Bibliography Number as Uniform Resource Name according to RFC 3188.Copyright © 2014 Deutsche Nationalbibliothek / German National Library. All rights reserved.