Package dev.tachyonmcp.api.server.domain
Class UriTemplate
java.lang.Object
dev.tachyonmcp.api.server.domain.UriTemplate
Reverse parser for RFC 6570 URI templates with scalar and unambiguous exploded list values.
-
Method Summary
Modifier and TypeMethodDescriptionstatic UriTemplateCreates a reverse parser for an RFC 6570 URI template.Parses a raw URI according to this template and extracts decoded variable values.
-
Method Details
-
create
Creates a reverse parser for an RFC 6570 URI template.- Parameters:
uriTemplate- the URI template to compile- Returns:
- a parser that extracts decoded values from matching URIs
- Throws:
NullPointerException- ifuriTemplateisnullIllegalArgumentException- if the template is too long or malformed
-
parse
Parses a raw URI according to this template and extracts decoded variable values.- Parameters:
rawUri- the URI to parse- Returns:
- an unmodifiable map of variable names to decoded scalar or sequence values
- Throws:
IllegalArgumentException- if the URI is invalid, exceeds the supported length, does not match the template, or contains undecodable values
-