Class McpTextCoordinate
java.lang.Object
com.soklet.McpTextCoordinate
Immutable stable identity for one framework-owned localizable MCP field.
Coordinates contain registration identity and a deterministic semantic
member path, never source or translated text. toExternalKey()
returns a versioned representation suitable for an application-owned opaque
translation-key strategy.
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic @NonNull McpTextCoordinatefromComponents(@NonNull String endpointPath, @NonNull McpTextOwnerType ownerType, @NonNull String subjectId, @NonNull String memberPath) Creates a text coordinate from its structured components.inthashCode()Returns the bounded opaque external keysoklet-mcp-text-v1.<owner-type-token>.<digest>.toString()
-
Method Details
-
fromComponents
public static @NonNull McpTextCoordinate fromComponents(@NonNull String endpointPath, @NonNull McpTextOwnerType ownerType, @NonNull String subjectId, @NonNull String memberPath) Creates a text coordinate from its structured components.- Parameters:
endpointPath- normalized endpoint pathownerType- MCP text owner typesubjectId- stable owner identity within the endpointmemberPath- deterministic RFC 6901-escaped semantic member path- Returns:
- immutable text coordinate
- Throws:
NullPointerException- if any argument is nullIllegalArgumentException- if a string argument contains malformed UTF-16
-
getEndpointPath
- Returns:
- normalized endpoint path
-
getOwnerType
- Returns:
- MCP text owner type
-
getSubjectId
- Returns:
- stable owner identity within the endpoint
-
getMemberPath
- Returns:
- deterministic RFC 6901-escaped semantic member path
-
toExternalKey
Returns the bounded opaque external keysoklet-mcp-text-v1.<owner-type-token>.<digest>. The digest is unpadded Base64URL SHA-256 over the ASCII domainsoklet-mcp-text-coordinate-v1\0, followed by four UTF-8 components: endpoint path, fixed lowercase owner-type token, subject ID, and member path. Each component is preceded by its four-byte unsigned big-endian byte length. Components are encoded exactly, without normalization or case folding; malformed UTF-16 is rejected when the coordinate is constructed.- Returns:
- stable versioned opaque translation key
-
equals
-
hashCode
-
toString
-