wisski

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	URI     URI      // URI of this entity
	Path    []URI    // the path of this entity
	Triples []Triple // the triples that define this entity itself

	Fields   map[string][]FieldValue // values for specific fields
	Children map[string][]Entity     // child paths for specific entities
}

Entity represents an Entity inside a WissKI Bundle

func (Entity) AllTriples

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

AllTriples returns all triples that are related to this entity. Concretetly 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.

type FieldValue

type FieldValue struct {
	Path    []URI
	Triples []Triple
	Value   any
}

FieldValue represents the value of a field inside an entity

type Triple

type Triple = igraph.Triple[URI, any]

Triple represents a triple of WissKI Data

type URI

type URI string

URI represents a URI inside of WissKI

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

Jump to

Keyboard shortcuts

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