java.lang.Object
org.apache.jena.rfc3986.ParseURN
Validate and parse URNs.
- Implementation Note:
- Validation is a single pass over the string. Parsing is a single pass over the string, followed by extracting slices of the string.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URNParse a string a a URN, Return null for invalid.static URNparseURN(String string, BiConsumer<Issue, String> handler) Parse a URN, including URN components.static URNComponentsparseURNComponents(IRI iri) Parse the URN components of an IRI (query string and fragment)static intvalidateAssignedName(String string, BiConsumer<Issue, String> handler) Validate a URN, NID and NSS, excluding URN components.static voidvalidateURN(String string, BiConsumer<Issue, String> handler) Validate a URN, NID and NSS, excluding URN components.
-
Constructor Details
-
ParseURN
public ParseURN()
-
-
Method Details
-
parseURN
Parse a string a a URN, Return null for invalid. -
parseURN
Parse a URN, including URN components. Return aURN. Callhandlerto pass back scheme-specific violations. This is allowed to raise an exception. Return null on error if the handler returned. -
parseURNComponents
Parse the URN components of an IRI (query string and fragment) -
validateURN
Validate a URN, NID and NSS, excluding URN components. Return the index (exclusive) of the end of NSS. Callhandlerto pass back scheme-specific violations. This is allowed to raise an exception. -
validateAssignedName
Validate a URN, NID and NSS, excluding URN components. Return the index (exclusive) of the end of NSS. Callhandlerto pass back scheme-specific violations. This is allowed to raise an exception.
-