public class NameParser extends Object implements INameParser
Modifier and Type | Method and Description |
---|---|
void |
addSchemeNameParser(parser : ISchemeNameParser<?>)
Register a name parser for a specific scheme.
|
SarlName |
decode(name : URI)
Parse the URI of the name, and create the name object.
|
URI |
normalize(name : URI)
Parse the string representation of the name, and create the URI representation.
|
ISchemeNameParser<?> |
removeSchemeNameParser(scheme : NameScheme)
Unregister a name parser for a specific scheme.
|
void |
setSchemeNameParsers(parsers : Set<ISchemeNameParser>)
Change the set of scheme name parsers that is used by this base name parser.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decode, getSchemeObject
@Inject
public def
setSchemeNameParsers(parsers : Set<ISchemeNameParser>) : void
NameParser
This function is annotated in order to be used by the Guice injector.
parsers
- the set of scheme name parsers.public def
addSchemeNameParser(parser : ISchemeNameParser<?>) : void
INameParser
addSchemeNameParser
in interface INameParser
parser
- the name parser, never null
.public def
removeSchemeNameParser(scheme : NameScheme) : ISchemeNameParser<?>
INameParser
removeSchemeNameParser
in interface INameParser
scheme
- the associated scheme, never null
.@Pure
public def
normalize(name : URI) : URI
INameParser
normalize
in interface INameParser
name
- the string representation of the name.null
if the given string cannot be parsed.@Pure
public def
decode(name : URI) : SarlName
INameParser
INameParser.normalize(URI)
.decode
in interface INameParser
name
- the normalized URI representation of the name. See INameParser.normalize(URI)
.null
if the given URI cannot be parsed.Copyright © 2020 the original authors or authors.