Record Class SourceRelationSymbol
java.lang.Object
java.lang.Record
com.darkcollective.relix.symbol.relation.SourceRelationSymbol
- Record Components:
namespace- the namespace this symbol belongs to; must not be blankdeclaredName- the name as written by the user; must not be blankprovenance- built-in or user-defined; must not be nullshadowPolicy- replacement policy for this symbol; must not be nullschema- the structural description of the relation; must not be null
- All Implemented Interfaces:
RelationSymbol,Symbol
public record SourceRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema)
extends Record
implements RelationSymbol
A relation symbol backed by an external data source whose transport details
(HTTP, CSV file, etc.) are held outside the symbol table.
This type carries only the information needed for semantic analysis —
the relation name, its column schema, and the standard symbol metadata.
The full source configuration (URL, method, pagination, extract spec, …)
lives in the semantic model produced by relix-semantic.
Use of(String, Schema) for user-declared sources and
builtin(String, Schema) for runtime-provided built-in sources:
SourceRelationSymbol weather = SourceRelationSymbol.of("current_weather",
new Schema(List.of(
new ColumnDefinition("city", ScalarType.STRING),
new ColumnDefinition("temp", ScalarType.NUMBER)
)));
-
Constructor Summary
ConstructorsConstructorDescriptionSourceRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema) Creates an instance of aSourceRelationSymbolrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SourceRelationSymbolCreates a built-in source relation in the"builtin"namespace withShadowPolicy.FORBIDDEN.Returns the value of thedeclaredNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thenamespacerecord component.static SourceRelationSymbolCreates a user-defined source relation in the"default"namespace withShadowPolicy.PERMITTED.Returns the value of theprovenancerecord component.schema()Returns the value of theschemarecord component.Returns the value of theshadowPolicyrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.darkcollective.relix.symbol.Symbol
canonicalName
-
Constructor Details
-
SourceRelationSymbol
public SourceRelationSymbol(String namespace, String declaredName, Provenance provenance, ShadowPolicy shadowPolicy, Schema schema) Creates an instance of aSourceRelationSymbolrecord class.- Parameters:
namespace- the value for thenamespacerecord componentdeclaredName- the value for thedeclaredNamerecord componentprovenance- the value for theprovenancerecord componentshadowPolicy- the value for theshadowPolicyrecord componentschema- the value for theschemarecord component
-
-
Method Details
-
of
Creates a user-defined source relation in the"default"namespace withShadowPolicy.PERMITTED.- Parameters:
name- the relation name; must not be blankschema- the relation's column schema; must not be null- Returns:
- a new
SourceRelationSymbol
-
builtin
Creates a built-in source relation in the"builtin"namespace withShadowPolicy.FORBIDDEN.- Parameters:
name- the relation name; must not be blankschema- the relation's column schema; must not be null- Returns:
- a new
SourceRelationSymbol
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
namespace
Returns the value of thenamespacerecord component. -
declaredName
Returns the value of thedeclaredNamerecord component.- Specified by:
declaredNamein interfaceSymbol- Returns:
- the value of the
declaredNamerecord component
-
provenance
Returns the value of theprovenancerecord component.- Specified by:
provenancein interfaceSymbol- Returns:
- the value of the
provenancerecord component
-
shadowPolicy
Returns the value of theshadowPolicyrecord component.- Specified by:
shadowPolicyin interfaceSymbol- Returns:
- the value of the
shadowPolicyrecord component
-
schema
Returns the value of theschemarecord component.- Specified by:
schemain interfaceRelationSymbol- Returns:
- the value of the
schemarecord component
-