public final class SourceUnit extends SqllrObject
| Modifier and Type | Class and Description |
|---|---|
static class |
SourceUnit.Builder
Collects the members of a new
SourceUnit. |
SqllrObject.Reader<T>| Modifier and Type | Field and Description |
|---|---|
static List<String> |
MEMBERS
The members the schema defines, in schema order.
|
static SqllrObject.Reader<SourceUnit> |
READER
Reads a JSON object as a
SourceUnit. |
static List<String> |
REQUIRED
The members the schema requires.
|
| Modifier and Type | Method and Description |
|---|---|
static SourceUnit.Builder |
builder() |
static SourceUnit |
fromJson(Object json)
A
SourceUnit with the members of a JSON object, all kept. |
String |
getAnalysisCompleteness()
The member
analysisCompleteness. |
String |
getAnalysisContextId()
The member
analysisContextId. |
Long |
getAnalysisContextRef()
The member
analysisContextRef. |
Digest |
getContentDigest()
The member
contentDigest. |
String |
getContextDomain()
The member
contextDomain. |
Decoding |
getDecoding()
The member
decoding. |
String |
getDerivedTextStatus()
The member
derivedTextStatus. |
List<Long> |
getDiagnosticRefs()
The member
diagnosticRefs. |
List<Digest> |
getDigests()
The member
digests. |
Map<String,Extension> |
getExtensions()
The member
extensions. |
List<FeatureCompleteness> |
getFeatureCompleteness()
The member
featureCompleteness. |
String |
getIdentityKind()
The member
identityKind. |
String |
getLogicalName()
The member
logicalName. |
String |
getNamespace()
The member
namespace. |
String |
getOriginKind()
The member
originKind. |
List<Map<String,Object>> |
getOriginMap()
The member
originMap. |
String |
getOriginMapping()
The member
originMapping. |
Long |
getParentUnitRef()
The member
parentUnitRef. |
Long |
getRef()
The member
ref. |
List<Digest> |
getResolutionInputDigests()
The member
resolutionInputDigests. |
Long |
getSiteOrdinal()
The member
siteOrdinal. |
String |
getSitePath()
The member
sitePath. |
Span |
getSiteSpan()
The member
siteSpan. |
Long |
getSiteStatementRef()
The member
siteStatementRef. |
String |
getText()
The member
text. |
String |
getUnitId()
The member
unitId. |
String |
getUri()
The member
uri. |
Long |
getVariantOrdinal()
The member
variantOrdinal. |
SourceUnit.Builder |
toBuilder()
A builder holding every member of this object.
|
public static final SqllrObject.Reader<SourceUnit> READER
SourceUnit.public static SourceUnit fromJson(Object json)
SourceUnit with the members of a JSON object, all kept.public static SourceUnit.Builder builder()
public SourceUnit.Builder toBuilder()
public Long getRef()
ref. A document-local reference: an integer that is unique across the
whole document (one reference space for every object that carries a ref). Local references
are assigned after merging and have no meaning outside the document (Sections 6.1 and 13).
Null when absent; throws IllegalStateException when the member holds another JSON type.public String getIdentityKind()
identityKind. The kind of a source unit identity. Registry group
'sourceUnitIdentityKinds' (Section 7.8). Null when absent; throws IllegalStateException when
the member holds another JSON type.public String getUnitId()
unitId. The portable source unit id; absent for LOCAL units (identity
stage: ID_MISSING when a NAMED or CONTENT_ADDRESSED unit omits it). An id computed by
SourceUnitIdV1: 'su1-' followed by 64 lowercase hexadecimal characters of a SHA-256 digest
(algorithms/identity-v1.md). Null when absent; throws IllegalStateException when the member
holds another JSON type.public Long getAnalysisContextRef()
analysisContextRef. The analysis context under which the document asserts
the content of this unit (an object of analysisContexts). A merged document holds one source
unit record per unit and context. A document-local reference: an integer that is unique
across the whole document (one reference space for every object that carries a ref). Local
references are assigned after merging and have no meaning outside the document (Sections 6.1
and 13). Null when absent; throws IllegalStateException when the member holds another JSON
type.public String getAnalysisContextId()
analysisContextId. AnalysisContextV1 of this unit: the manifest of its
analysis context, its decoding, its version digest selected by algorithms/identity-v1.md,
Section 5.5, and its resolution input digests. Present when the unit has a unitId and at
least one digest (identity stage: ID_MISSING / ID_UNEXPECTED). An id computed by
AnalysisContextV1: 'actx1-' followed by 64 lowercase hexadecimal characters of a SHA-256
digest (algorithms/identity-v1.md). The digest of the analysis context of one source unit.
Null when absent; throws IllegalStateException when the member holds another JSON type.public String getNamespace()
namespace. The caller-provided namespace, such as a repository (NAMED
units). Null when absent; throws IllegalStateException when the member holds another JSON
type.public String getLogicalName()
logicalName. The caller-provided name within the namespace, such as a path
relative to the repository (NAMED units). Never an absolute local path. Null when absent;
throws IllegalStateException when the member holds another JSON type.public String getContextDomain()
contextDomain. The caller-declared context domain of a CONTENT_ADDRESSED
unit: the domain within which, by the caller's declaration, equal content is one logical
source unit (Section 7.8). An unnamed file without that declaration is a LOCAL unit. Null
when absent; throws IllegalStateException when the member holds another JSON type.public String getUri()
uri. A retrieval location after redaction. Not part of any identity. Null
when absent; throws IllegalStateException when the member holds another JSON type.public String getOriginKind()
originKind. The origin of a source unit. Registry group
'sourceUnitOriginKinds' (Section 7.8). Null when absent; throws IllegalStateException when
the member holds another JSON type.public Long getParentUnitRef()
parentUnitRef. The unit a derived unit was derived from. A document-local
reference: an integer that is unique across the whole document (one reference space for every
object that carries a ref). Local references are assigned after merging and have no meaning
outside the document (Sections 6.1 and 13). Null when absent; throws IllegalStateException
when the member holds another JSON type.public String getSitePath()
sitePath. The semantic path of the execution or expansion site within the
parent unit's statement. A semantic path. Under the path profile sqllr-path-1 it is a
'/'-joined list of steps CODE[index] (registry group pathStepCodes) that follows
algorithms/path-v1.md (semantic stage: SEMANTIC_PATH_PROFILE_VIOLATION); under another
declared profile it is opaque and comparable only within (producer, path profile). Null when
absent; throws IllegalStateException when the member holds another JSON type.public Span getSiteSpan()
siteSpan. The location of the execution or expansion site in the parent
unit (Section 12.2, rule 1). Null when absent; throws IllegalStateException when the member
holds another JSON type.public String getOriginMapping()
originMapping. Whether a derived source unit is mapped to its parent.
Registry group 'originMappingStatus' (Section 7.8). Null when absent; throws
IllegalStateException when the member holds another JSON type.public String getDerivedTextStatus()
derivedTextStatus. Whether the derived text is proven to be the text the
site executes (algorithms/fold-v1.md, Section 7.3). Required for a derived unit. Whether the
text of a derived source unit is proven. Registry group 'derivedTextStatus' (Sections 7.8 and
11.4). Null when absent; throws IllegalStateException when the member holds another JSON
type.public List<Digest> getDigests()
digests. Version digests of the unit, at most one per domain. They
identify the version, not the unit; the first present in registry order (RAW_BYTES_SHA256,
DECODED_TEXT_SHA256, REDACTED_TEXT_SHA256, KEYED_TOKEN) enters the analysis context. Null
when absent; throws IllegalStateException when the member holds another JSON type.public List<Digest> getResolutionInputDigests()
resolutionInputDigests. The version digest of every other source unit
whose content the analysis read to resolve the names of this unit (its DDL, views, routines,
session statements). A producer that cannot tell lists every input unit of the analysis. An
input of the analysis context (algorithms/identity-v1.md, Section 5.5). Null when absent;
throws IllegalStateException when the member holds another JSON type.public Digest getContentDigest()
contentDigest. The content digest of a CONTENT_ADDRESSED unit, an input of
its identity. Null when absent; throws IllegalStateException when the member holds another
JSON type.public Long getSiteStatementRef()
siteStatementRef. The statement of the parent unit that contains the
execution or expansion site. A document-local reference: an integer that is unique across the
whole document (one reference space for every object that carries a ref). Local references
are assigned after merging and have no meaning outside the document (Sections 6.1 and 13).
Null when absent; throws IllegalStateException when the member holds another JSON type.public Long getSiteOrdinal()
siteOrdinal. The 0-based ordinal of the site on its semantic path. A
0-based ordinal. Null when absent; throws IllegalStateException when the member holds another
JSON type.public Long getVariantOrdinal()
variantOrdinal. The 0-based ordinal of this text among the texts derived
from one site. A 0-based ordinal. Null when absent; throws IllegalStateException when the
member holds another JSON type.public List<Map<String,Object>> getOriginMap()
originMap. The origin map of a MAPPED derived unit, ordered by position in
the derived text. Module exact-spans, defined later. Null when absent; throws
IllegalStateException when the member holds another JSON type.public Decoding getDecoding()
decoding. Null when absent; throws IllegalStateException when the member
holds another JSON type.public String getText()
text. The embedded text (Section 12.3): the decoded text under FULL, the
redacted text under REDACTED; absent under NONE. Never part of any id. Null when absent;
throws IllegalStateException when the member holds another JSON type.public String getAnalysisCompleteness()
analysisCompleteness. Analysis completeness of a scope. Registry group
'analysisCompleteness' (Section 4.4). Null when absent; throws IllegalStateException when the
member holds another JSON type.public List<FeatureCompleteness> getFeatureCompleteness()
featureCompleteness. Feature-scope completeness; one entry per feature.
Null when absent; throws IllegalStateException when the member holds another JSON type.public List<Long> getDiagnosticRefs()
diagnosticRefs. A set of local references. Null when absent; throws
IllegalStateException when the member holds another JSON type.public Map<String,Extension> getExtensions()
extensions. Extension data keyed by namespace. Every core object may carry
it; it never takes part in a core identity. Null when absent; throws IllegalStateException
when the member holds another JSON type.