public final class IdentityV1 extends Object
PUBLIC-LINEAGE-ID-V1 (lineage-spec/algorithms/identity-v1.md).
Each algorithm takes its inputs as a JSON value in the shape of the specification's vectors and of the
reference implementation (sqllr_ids.py, compute), validates them in the reference's order,
and returns an IdentityV1.IdResult: the identity status, and the framed input, digest, id and numeric key when
an id is computed. Canonical segment keys are inputs; minting them belongs to the producer.
| Modifier and Type | Class and Description |
|---|---|
static class |
IdentityV1.IdResult
The outcome of one algorithm run.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
checkNumericKeys(Collection<?> ids)
The importer rule of Section 5.10: two different ids with one numeric key are a fatal collision.
|
static IdentityV1.IdResult |
compute(String algorithm,
Object inputs)
Runs one algorithm on its inputs.
|
static boolean |
isId(Object value,
String prefix)
True for a well-formed id with this prefix.
|
static String |
numericKey(Object id)
NumericKeyV1 (Section 5.10): the first 16 bytes of the digest of an id, as 32 lowercase
hexadecimal characters. |
public static final String FAMILY
public static final String PATH_PROFILE_V1
public static final String SOURCE_UNIT
public static final String ENDPOINT
public static final String FACT
public static final String OCCURRENCE_KEY
public static final String ANALYSIS_CONTEXT
public static final String OCCURRENCE_RECORD
public static final String EXPLAIN_NODE_KEY
public static final String EXPLAIN_NODE_RECORD
public static final String DEPENDENCY_SNAPSHOT
public static final String METADATA_DIGEST
public static final String PORTABLE
public static final String LOCAL
public static final String UNAVAILABLE_COLLATION
public static final String UNAVAILABLE_MIXED_PROFILE
public static final String OPAQUE_PRODUCER_LOCAL
public static final List<String> FACT_KINDS
public static final List<String> NON_PORTABLE
public static final List<String> DIGEST_DOMAINS
public static final List<String> METADATA_STATUSES
public static final List<String> ANALYSIS_FEATURES
public static final List<String> CAPABILITY_STATUSES
public static final List<String> BOM_HANDLING
public static final List<String> LINE_ENDING_HANDLING
public static final List<String> ROUTINE_NAMESPACES
public static final List<String> ROUTINE_KINDS
public static final List<String> SIGNATURE_FORMS
public static final List<String> PARAMETER_MODES
public static final List<String> PATH_SEGMENT_KINDS
public static final List<String> CANDIDATE_SET_MEMBERSHIP
public static final List<String> PATH_STEP_CODES
public static final List<String> EXPLAIN_NODE_KINDS
public static final Map<String,String> IDENTITY_CLASS
endpointKinds) to identity class (Section 5.2.1); a kind mapped to
null has no identity class in V1 and is LOCAL.public static final List<String> ALGORITHMS
public static IdentityV1.IdResult compute(String algorithm, Object inputs)
algorithm - one of the names of Section 2, such as EndpointIdV1SqllrException - with an ID_* code (or a SCHEMA_* code for JSON that canonical JSON
cannot carry) when the inputs are rejectedpublic static String numericKey(Object id)
NumericKeyV1 (Section 5.10): the first 16 bytes of the digest of an id, as 32 lowercase
hexadecimal characters.SqllrException - ID_INVALID_REFERENCE for a string that is not an id of the familypublic static void checkNumericKeys(Collection<?> ids)
SqllrException - ID_NUMERIC_KEY_COLLISION