io.sarl.api.naming.parser
Interface ISchemeNameParser<N>
Type Parameters:
N - the type of the name that is the result of the decoding.
All Known Implementing Classes:
AbstractSchemeNameParser<N>, AgentSchemeNameParser, ArtifactSchemeNameParser, BehaviorSchemeNameParser, ContextSchemeNameParser, ScopedDataSchemeNameParser, ServiceSchemeNameParser, SkillSchemeNameParser, SpaceSchemeNameParser
@org.eclipse.xtext.xbase.lib.XbaseGenerated
interface ISchemeNameParser<N>
A parser of names that is accepting URI-based syntax for a specific scheme.
Parameters:
<N> - the type of the name that is the result of the decoding.
Maven Group Identifier:
io.sarl.sdk
Maven Artifact Identifier:
api.naming
Since:
0.12
Property Summary
Modifier and type Property and description
java.lang.String scheme
Replies the name scheme that is supported by this parser.
Action Summary
Modifier and type Action and description
abstract N decode(URI)
Decode the name.
abstract java.lang.String getScheme
Replies the name scheme that is supported by this parser.
abstract java.net.URI refactor(URI)
Refactor the given URI in order to fit the name specification.
Property Details
scheme
val scheme : java.lang.String
Replies the name scheme that is supported by this parser.

This property is an alias for the action: getScheme

Returns:
the scheme that is supported by the parser.
Action Details
decode(URI)
def decode(URI) : N
Decode the name. The purpose is to extract from the given URI all information that is suitable for creating an instance of SarlName.

The provided URI must have a path that is starting with the character /. Otherwise, the returned value will be null.
Parameters:
name - is the URI containing all relevant information for a SarlName. It is assumed that the provided URI is valid for name specification as it is defined in refactor(URI).
Returns:
the SarlName that is recognized from the URI.
getScheme
def getScheme : java.lang.String
Replies the name scheme that is supported by this parser.
Returns:
the scheme that is supported by the parser.
refactor(URI)
def refactor(URI) : java.net.URI
Refactor the given URI in order to fit the name specification.

The key property of an URI for name specification is that its path must start with a / character.
Parameters:
name - the URI to analyze for obtaining valid URI for name specification.
Returns:
the fixed URI from that corresponds to the given name .