wisski

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SameAs    impl.Label = "http://www.w3.org/2002/07/owl#sameAs"            // the default "SameAs" Predicate
	InverseOf impl.Label = "http://www.w3.org/2002/07/owl#inverseOf"         // the default "InverseOf" Predicate
	Type      impl.Label = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" // the "Type" Predicate
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Fields   map[string][]FieldValue // values for specific fields
	Children map[string][]Entity     // child paths for child bundles
	URI      impl.Label
	Path     []impl.Label
	Triples  []igraph.Triple
}

Entity represents an Entity inside a WissKI Bundle

func (Entity) AllTriples

func (entity Entity) AllTriples() (triples []igraph.Triple)

AllTriples returns all triples that are related to this entity. Concretely this means:

- Any Triple defining the entity itself. - Any Triple defining any field of the entity. - Any Triple defining any child entity.

Triples are returned in globally consistent order. Triples are guaranteed not to be repeated. This means that any two calls to AllTriples() use the same order.

func (Entity) WriteAllTriples added in v0.0.3

func (entity Entity) WriteAllTriples(w io.Writer, canonical bool, f rdf.Format) error

WriteTo writes triples representing this entity into w.

type FieldValue

type FieldValue struct {
	Value    impl.Datum
	Language impl.Language
	Path     []impl.Label
	Triples  []igraph.Triple
}

FieldValue represents the value of a field inside an entity

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL