io.sarl.api.naming.parser
Interface INameParser
All Known Implementing Classes:
UriBasedNameParser, InjectedNameParser
interface INameParser
Parser of names that is supporting multiple URI-based schemes.
Maven Group Identifier:
io.sarl.sdk
Maven Artifact Identifier:
api.naming
Since:
0.12
Property Summary
Modifier and type Property and description
java.util.Set<E> supportedSchemes
Replies the list of the supported schmes.
Action Summary
Modifier and type Action and description
abstract void addSchemeNameParser(ISchemeNameParser<N>)
Register a name parser for a specific scheme.
default java.net.URI decode(String)
Parse the string representation of the name, and create the URI representation.
abstract SarlName decode(URI)
Parse the URI of the name, and create the name object.
abstract java.util.Set<E> getSupportedSchemes
Replies the list of the supported schmes.
abstract java.net.URI normalize(URI)
Parse the string representation of the name, and create the URI representation.
abstract ISchemeNameParser<N> removeSchemeNameParser(String)
Unregister a name parser for a specific scheme.
Property Details
supportedSchemes
val supportedSchemes : java.util.Set<E>
Replies the list of the supported schmes.

This property is an alias for the action: getSupportedSchemes

Returns:
the list of the supported schmes.
Action Details
addSchemeNameParser(ISchemeNameParser<N>)
def addSchemeNameParser(ISchemeNameParser<N>)
Register a name parser for a specific scheme.
Parameters:
parser - the name parser, never null.
decode(String)
def decode(String) : java.net.URI
Parse the string representation of the name, and create the URI representation.
Parameters:
name - the string representation of the name.
Returns:
the URI representation of the given name, or null if the given string cannot be parsed.
decode(URI)
def decode(URI) : SarlName
Parse the URI of the name, and create the name object. The argument must be a normalized URI that is computed by normalize(URI).
Parameters:
name - the normalized URI representation of the name. See normalize(URI).
Returns:
the name, or null if the given URI cannot be parsed.
getSupportedSchemes
def getSupportedSchemes : java.util.Set<E>
Replies the list of the supported schmes.
Returns:
the list of the supported schmes.
normalize(URI)
def normalize(URI) : java.net.URI
Parse the string representation of the name, and create the URI representation.
Parameters:
name - the string representation of the name.
Returns:
the URI representation of the given name, or null if the given string cannot be parsed.
removeSchemeNameParser(String)
def removeSchemeNameParser(String) : ISchemeNameParser<N>
Unregister a name parser for a specific scheme.
Parameters:
scheme - the associated scheme, never null.
Returns:
the name parser that was associated to the name protocol.