io.sarl.api.naming.parser
Class AbstractSchemeNameParser<N>
Type Parameters:
N - the type of the name that is the result of the decoding.
All Superinterfaces:
ISchemeNameParser<N>
All Known Subclasses:
AgentSchemeNameParser, ArtifactSchemeNameParser, BehaviorSchemeNameParser, ContextSchemeNameParser, ServiceSchemeNameParser, SkillSchemeNameParser, SpaceSchemeNameParser
abstract class AbstractSchemeNameParser<N>
extends java.lang.Object
implements ISchemeNameParser<N>
Abstact implementation of 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
Constructor Summary
Constructor and description
new(String)
Constructor.
Action Summary
Modifier and type Action and description
java.lang.String getScheme
protected java.net.URI refactor(URI,int,int,[boolean])
Refactors the URI.
protected java.lang.String validatePath(String,int,int,[boolean])
Validate the path.
Property Details
scheme
val scheme : java.lang.String

This property is an alias for the action: getScheme

Constructor Details
new(String)
protected new(String)
Constructor.
Parameters:
scheme - the scheme that is supported by this name parser.
Action Details
getScheme
def getScheme : java.lang.String
refactor(URI,int,int,[boolean])
protected def refactor(URI,int,int,[boolean]) : java.net.URI
Refactors the URI.
Parameters:
uri - the URI to refactor.
minElements - is the expected minimum number of path components.
maxElements - is the expected maximum number of path components.
lastIsInteger - indicates if the last component could be an integer. In this case, the expected number of not-integer components becomes [minElements, maxElements - 1].
Returns:
the new URI.
validatePath(String,int,int,[boolean])
protected def validatePath(String,int,int,[boolean]) : java.lang.String
Validate the path.
Parameters:
path - the path to validate.
minElements - is the expected minimum number of path components.
maxElements - is the expected maximum number of path components.
lastIsInteger - indicates if the last component could be an integer. In this case, the expected number of not-integer components becomes [minElements, maxElements - 1].
Returns:
the validated path.