Documentation
¶
Index ¶
- Constants
- Variables
- func IsKeyword(k string) bool
- type Context
- type ExpandedArray
- type ExpandedIRI
- type ExpandedIRIasBlankNode
- type ExpandedIRIasIRI
- type ExpandedIRIasKeyword
- type ExpandedIRIasNil
- type ExpandedIRIasRawValue
- type ExpandedObject
- type ExpandedScalarPrimitive
- type ExpandedValue
- type TermDefinition
Constants ¶
View Source
const ( ProcessingMode_JSON_LD_1_0 = "json-ld-1.0" ProcessingMode_JSON_LD_1_1 = "json-ld-1.1" )
View Source
const MagicKeywordPropertySourceOffsets = "@rdfkit.property.sourceOffsets"
Variables ¶
View Source
var ProcessorRemoteContextsLimit = 128
Functions ¶
Types ¶
type Context ¶
type Context struct {
// [4.1] the active term definitions which specify how keys and values have to be interpreted (array of term definitions),
TermDefinitions map[string]*TermDefinition
// [4.1] the current base IRI (IRI),
BaseURL *iri.ParsedIRI
BaseURLValue inspectjson.Value
// [4.1] the original base URL (IRI),
OriginalBaseURL *iri.ParsedIRI
// [4.1] an inverse context (inverse context),
InverseContext *Context
// [4.1] an optional vocabulary mapping (IRI),
VocabularyMapping ExpandedIRI
VocabularyMappingValue inspectjson.Value
// [4.1] an optional default language (string),
// DefaultLanguage *string
DefaultLanguageValue *inspectjson.StringValue
// [4.1] an optional default base direction ("ltr" or "rtl"),
// [dpb] commonly referred to as "base direction"; TODO rename?
// DefaultDirection *string
DefaultDirectionValue *inspectjson.StringValue
// [4.1] and an optional previous context (context), used when a non-propagated context is defined.
PreviousContext *Context
// contains filtered or unexported fields
}
type ExpandedArray ¶
type ExpandedArray struct {
Values []ExpandedValue
}
func (*ExpandedArray) AsBuiltin ¶
func (e *ExpandedArray) AsBuiltin() any
type ExpandedIRI ¶
type ExpandedIRI interface {
ExpandedType() string
Equals(e ExpandedIRI) bool
NewPropertyValue(propertyOffsets, valueOffsets *cursorio.TextOffsetRange) *ExpandedScalarPrimitive
String() string
}
type ExpandedIRIasBlankNode ¶
type ExpandedIRIasBlankNode string
func (ExpandedIRIasBlankNode) Equals ¶
func (e ExpandedIRIasBlankNode) Equals(e2 ExpandedIRI) bool
func (ExpandedIRIasBlankNode) ExpandedType ¶
func (ExpandedIRIasBlankNode) ExpandedType() string
func (ExpandedIRIasBlankNode) NewPropertyValue ¶
func (e ExpandedIRIasBlankNode) NewPropertyValue(propertyOffsets, valueOffsets *cursorio.TextOffsetRange) *ExpandedScalarPrimitive
func (ExpandedIRIasBlankNode) String ¶
func (e ExpandedIRIasBlankNode) String() string
type ExpandedIRIasIRI ¶
type ExpandedIRIasIRI string
func (ExpandedIRIasIRI) Equals ¶
func (e ExpandedIRIasIRI) Equals(e2 ExpandedIRI) bool
func (ExpandedIRIasIRI) ExpandedType ¶
func (ExpandedIRIasIRI) ExpandedType() string
func (ExpandedIRIasIRI) NewPropertyValue ¶
func (e ExpandedIRIasIRI) NewPropertyValue(propertyOffsets, valueOffsets *cursorio.TextOffsetRange) *ExpandedScalarPrimitive
func (ExpandedIRIasIRI) String ¶
func (e ExpandedIRIasIRI) String() string
type ExpandedIRIasKeyword ¶
type ExpandedIRIasKeyword string
func (ExpandedIRIasKeyword) Equals ¶
func (e ExpandedIRIasKeyword) Equals(e2 ExpandedIRI) bool
func (ExpandedIRIasKeyword) ExpandedType ¶
func (ExpandedIRIasKeyword) ExpandedType() string
func (ExpandedIRIasKeyword) NewPropertyValue ¶
func (e ExpandedIRIasKeyword) NewPropertyValue(propertyOffsets, valueOffsets *cursorio.TextOffsetRange) *ExpandedScalarPrimitive
func (ExpandedIRIasKeyword) String ¶
func (e ExpandedIRIasKeyword) String() string
type ExpandedIRIasNil ¶
type ExpandedIRIasNil struct{}
func (ExpandedIRIasNil) Equals ¶
func (ExpandedIRIasNil) Equals(e ExpandedIRI) bool
func (ExpandedIRIasNil) ExpandedType ¶
func (ExpandedIRIasNil) ExpandedType() string
func (ExpandedIRIasNil) NewPropertyValue ¶
func (ExpandedIRIasNil) NewPropertyValue(propertyOffsets, valueOffsets *cursorio.TextOffsetRange) *ExpandedScalarPrimitive
func (ExpandedIRIasNil) String ¶
func (ExpandedIRIasNil) String() string
type ExpandedIRIasRawValue ¶
type ExpandedIRIasRawValue struct {
Value inspectjson.Value
}
func (ExpandedIRIasRawValue) Equals ¶
func (e ExpandedIRIasRawValue) Equals(e2 ExpandedIRI) bool
func (ExpandedIRIasRawValue) ExpandedType ¶
func (ExpandedIRIasRawValue) ExpandedType() string
func (ExpandedIRIasRawValue) NewPropertyValue ¶
func (e ExpandedIRIasRawValue) NewPropertyValue(propertyOffsets, valueOffsets *cursorio.TextOffsetRange) *ExpandedScalarPrimitive
func (ExpandedIRIasRawValue) String ¶
func (ExpandedIRIasRawValue) String() string
type ExpandedObject ¶
type ExpandedObject struct {
Members map[string]ExpandedValue
SourceOffsets *cursorio.TextOffsetRange
PropertySourceOffsets *cursorio.TextOffsetRange
}
func (*ExpandedObject) AsBuiltin ¶
func (e *ExpandedObject) AsBuiltin() any
type ExpandedScalarPrimitive ¶
type ExpandedScalarPrimitive struct {
Value inspectjson.Value
PropertySourceOffsets *cursorio.TextOffsetRange
}
func (*ExpandedScalarPrimitive) AsBuiltin ¶
func (e *ExpandedScalarPrimitive) AsBuiltin() any
type ExpandedValue ¶
type ExpandedValue interface {
// only used for testing
AsBuiltin() any
// contains filtered or unexported methods
}
func Expand ¶
func Expand(input inspectjson.Value, opts jsonldtype.ProcessorOptions) (ExpandedValue, error)
type TermDefinition ¶
type TermDefinition struct {
// [4.1] an IRI mapping (IRI),
// [dpb] commonly referred to as "IRI mapping"; TODO rename?
IRI ExpandedIRI
IRIValue inspectjson.Value
// [4.1] a prefix flag (boolean),
// [dpb] commonly referred to as "prefix flag"; TODO rename?
Prefix bool
// [4.1] a protected flag (boolean),
Protected bool
// [4.1] a reverse property flag (boolean),
ReverseProperty bool
// [4.1] an optional base URL (IRI),
BaseURL *iri.ParsedIRI
// [4.1] an optional context (context),
// [dpb] sometimes referred to as "local context"?
Context inspectjson.Value
// [4.1] an optional container mapping (array of strings),
ContainerMapping []string
// [4.1] an optional direction mapping ("ltr" or "rtl"),
// DirectionMapping *string
// string or null
DirectionMappingValue inspectjson.Value // inspectjson.NullValue | inspectjson.StringValue
// [4.1] an optional index mapping (string),
IndexMapping *string
IndexMappingSourceOffsets *cursorio.TextOffsetRange
// [4.1] an optional language mapping (string),
// LanguageMapping *string
// string or null
LanguageMappingValue inspectjson.Value // inspectjson.NullValue | inspectjson.StringValue
// [4.1] an optional nest value (string),
NestValue *string
// [4.1] and an optional type mapping (IRI).
TypeMapping ExpandedIRI
TypeMappingValue inspectjson.Value
}
func (*TermDefinition) Equals ¶
func (d *TermDefinition) Equals(d2 *TermDefinition) bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.