rdf

package
v0.0.0-...-9de2c1c Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

GENERATED FILE, DO NOT EDIT. Please refer to: tools/nsgen/templates.go

GENERATED FILE, DO NOT EDIT. Please refer to: tools/nsgen/templates.go

GENERATED FILE, DO NOT EDIT. Please refer to: tools/nsgen/templates.go

GENERATED FILE, DO NOT EDIT. Please refer to: tools/nsgen/templates.go

Index

Constants

This section is empty.

Variables

View Source
var (
	RDF = &meta.Namespace{
		ID:    "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
		Short: "rdf",
		Props: []*meta.Prop{
			Prop_First,
			Prop_Object,
			Prop_Predicate,
			Prop_Rest,
			Prop_Subject,
			Prop_Type,
			Prop_Value,
		},
		Types: map[string]*meta.Type{
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt":       Class_Alt,
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag":       Class_Bag,
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#List":      Class_List,
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#Property":  Class_Property,
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq":       Class_Seq,
			"http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement": Class_Statement,
		},
	}
	RDFS = &meta.Namespace{
		ID:    "http://www.w3.org/2000/01/rdf-schema#",
		Short: "rdfs",
		Props: []*meta.Prop{
			Prop_Comment,
			Prop_Domain,
			Prop_IsDefinedBy,
			Prop_Label,
			Prop_Member,
			Prop_Range,
			Prop_SeeAlso,
			Prop_SubClassOf,
			Prop_SubPropertyOf,
		},
		Types: map[string]*meta.Type{
			"http://www.w3.org/2000/01/rdf-schema#Class":                       Class_Class,
			"http://www.w3.org/2000/01/rdf-schema#Container":                   Class_Container,
			"http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty": Class_ContainerMembershipProperty,
			"http://www.w3.org/2000/01/rdf-schema#Datatype":                    Class_Datatype,
			"http://www.w3.org/2000/01/rdf-schema#Literal":                     Class_Literal,
			"http://www.w3.org/2000/01/rdf-schema#Resource":                    Class_Resource,
		},
	}

	// The first item in the subject RDF list.
	Prop_First = &meta.Prop{
		ID:      "http://www.w3.org/1999/02/22-rdf-syntax-ns#first",
		Short:   "first",
		Comment: "The first item in the subject RDF list.",
	}

	// The object of the subject RDF statement.
	Prop_Object = &meta.Prop{
		ID:      "http://www.w3.org/1999/02/22-rdf-syntax-ns#object",
		Short:   "object",
		Comment: "The object of the subject RDF statement.",
	}

	// The predicate of the subject RDF statement.
	Prop_Predicate = &meta.Prop{
		ID:      "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",
		Short:   "predicate",
		Comment: "The predicate of the subject RDF statement.",
	}

	// The rest of the subject RDF list after the first item.
	Prop_Rest = &meta.Prop{
		ID:      "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",
		Short:   "rest",
		Comment: "The rest of the subject RDF list after the first item.",
	}

	// The subject of the subject RDF statement.
	Prop_Subject = &meta.Prop{
		ID:      "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",
		Short:   "subject",
		Comment: "The subject of the subject RDF statement.",
	}

	// The subject is an instance of a class.
	Prop_Type = &meta.Prop{
		ID:      "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
		Short:   "type",
		Comment: "The subject is an instance of a class.",
	}

	// Idiomatic property used for structured values.
	Prop_Value = &meta.Prop{
		ID:      "http://www.w3.org/1999/02/22-rdf-syntax-ns#value",
		Short:   "value",
		Comment: "Idiomatic property used for structured values.",
	}

	// A description of the subject resource.
	Prop_Comment = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#comment",
		Short:   "comment",
		Comment: "A description of the subject resource.",
	}

	// A domain of the subject property.
	Prop_Domain = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#domain",
		Short:   "domain",
		Comment: "A domain of the subject property.",
	}

	// The defininition of the subject resource.
	Prop_IsDefinedBy = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#isDefinedBy",
		Short:   "isDefinedBy",
		Comment: "The defininition of the subject resource.",
	}

	// A human-readable name for the subject.
	Prop_Label = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#label",
		Short:   "label",
		Comment: "A human-readable name for the subject.",
	}

	// A member of the subject resource.
	Prop_Member = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#member",
		Short:   "member",
		Comment: "A member of the subject resource.",
	}

	// A range of the subject property.
	Prop_Range = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#range",
		Short:   "range",
		Comment: "A range of the subject property.",
	}

	// Further information about the subject resource.
	Prop_SeeAlso = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#seeAlso",
		Short:   "seeAlso",
		Comment: "Further information about the subject resource.",
	}

	// The subject is a subclass of a class.
	Prop_SubClassOf = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#subClassOf",
		Short:   "subClassOf",
		Comment: "The subject is a subclass of a class.",
	}

	// The subject is a subproperty of a property.
	Prop_SubPropertyOf = &meta.Prop{
		ID:      "http://www.w3.org/2000/01/rdf-schema#subPropertyOf",
		Short:   "subPropertyOf",
		Comment: "The subject is a subproperty of a property.",
	}

	// The class of containers of alternatives.
	Class_Alt = &meta.Type{
		ID:    "http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt",
		Short: "Alt",
		Cast:  func(e ld.Entity) ld.Entity { return AsAlt(e) },
		SubClassOf: []*meta.Type{
			Class_Container,
		},
		Props: []*meta.Prop{},
	}

	// The class of unordered containers.
	Class_Bag = &meta.Type{
		ID:    "http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag",
		Short: "Bag",
		Cast:  func(e ld.Entity) ld.Entity { return AsBag(e) },
		SubClassOf: []*meta.Type{
			Class_Container,
		},
		Props: []*meta.Prop{},
	}

	// The class of RDF Lists.
	Class_List = &meta.Type{
		ID:    "http://www.w3.org/1999/02/22-rdf-syntax-ns#List",
		Short: "List",
		Cast:  func(e ld.Entity) ld.Entity { return AsList(e) },
		SubClassOf: []*meta.Type{
			Class_Resource,
		},
		Props: []*meta.Prop{
			Prop_First,
			Prop_Rest,
		},
	}

	// The class of RDF properties.
	Class_Property = &meta.Type{
		ID:    "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",
		Short: "Property",
		Cast:  func(e ld.Entity) ld.Entity { return AsProperty(e) },
		SubClassOf: []*meta.Type{
			Class_Resource,
		},
		Props: []*meta.Prop{
			Prop_Domain,
			Prop_Range,
			Prop_SubPropertyOf,
		},
	}

	// The class of ordered containers.
	Class_Seq = &meta.Type{
		ID:    "http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq",
		Short: "Seq",
		Cast:  func(e ld.Entity) ld.Entity { return AsSeq(e) },
		SubClassOf: []*meta.Type{
			Class_Container,
		},
		Props: []*meta.Prop{},
	}

	// The class of RDF statements.
	Class_Statement = &meta.Type{
		ID:    "http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement",
		Short: "Statement",
		Cast:  func(e ld.Entity) ld.Entity { return AsStatement(e) },
		SubClassOf: []*meta.Type{
			Class_Resource,
		},
		Props: []*meta.Prop{
			Prop_Object,
			Prop_Predicate,
			Prop_Subject,
		},
	}

	// The class of classes.
	Class_Class = &meta.Type{
		ID:    "http://www.w3.org/2000/01/rdf-schema#Class",
		Short: "Class",
		Cast:  func(e ld.Entity) ld.Entity { return AsClass(e) },
		SubClassOf: []*meta.Type{
			Class_Resource,
		},
		Props: []*meta.Prop{
			Prop_SubClassOf,
		},
	}

	// The class of RDF containers.
	Class_Container = &meta.Type{
		ID:    "http://www.w3.org/2000/01/rdf-schema#Container",
		Short: "Container",
		Cast:  func(e ld.Entity) ld.Entity { return AsContainer(e) },
		SubClassOf: []*meta.Type{
			Class_Resource,
		},
		Props: []*meta.Prop{},
	}

	// The class of container membership properties, rdf:_1, rdf:_2, ...,
	// all of which are sub-properties of 'member'.
	Class_ContainerMembershipProperty = &meta.Type{
		ID:    "http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty",
		Short: "ContainerMembershipProperty",
		Cast:  func(e ld.Entity) ld.Entity { return AsContainerMembershipProperty(e) },
		SubClassOf: []*meta.Type{
			Class_Property,
		},
		Props: []*meta.Prop{},
	}

	// The class of RDF datatypes.
	Class_Datatype = &meta.Type{
		ID:    "http://www.w3.org/2000/01/rdf-schema#Datatype",
		Short: "Datatype",
		Cast:  func(e ld.Entity) ld.Entity { return AsDatatype(e) },
		SubClassOf: []*meta.Type{
			Class_Class,
		},
		Props: []*meta.Prop{},
	}

	// The class of literal values, eg. textual strings and integers.
	Class_Literal = &meta.Type{
		ID:    "http://www.w3.org/2000/01/rdf-schema#Literal",
		Short: "Literal",
		Cast:  func(e ld.Entity) ld.Entity { return AsLiteral(e) },
		SubClassOf: []*meta.Type{
			Class_Resource,
		},
		Props: []*meta.Prop{},
	}

	// The class resource, everything.
	Class_Resource = &meta.Type{
		ID:         "http://www.w3.org/2000/01/rdf-schema#Resource",
		Short:      "Resource",
		Cast:       func(e ld.Entity) ld.Entity { return AsResource(e) },
		SubClassOf: []*meta.Type{},
		Props: []*meta.Prop{
			Prop_Type,
			Prop_Value,
			Prop_Comment,
			Prop_IsDefinedBy,
			Prop_Label,
			Prop_Member,
			Prop_SeeAlso,
		},
	}
)

Functions

func GetComment

func GetComment(e ld.Entity) interface{}

A description of the subject resource.

func GetDomain

func GetDomain(e ld.Entity) interface{}

A domain of the subject property.

func GetFirst

func GetFirst(e ld.Entity) interface{}

The first item in the subject RDF list.

func GetIsDefinedBy

func GetIsDefinedBy(e ld.Entity) interface{}

The defininition of the subject resource.

func GetLabel

func GetLabel(e ld.Entity) interface{}

A human-readable name for the subject.

func GetMember

func GetMember(e ld.Entity) interface{}

A member of the subject resource.

func GetObject

func GetObject(e ld.Entity) interface{}

The object of the subject RDF statement.

func GetPredicate

func GetPredicate(e ld.Entity) interface{}

The predicate of the subject RDF statement.

func GetRange

func GetRange(e ld.Entity) interface{}

A range of the subject property.

func GetRest

func GetRest(e ld.Entity) interface{}

The rest of the subject RDF list after the first item.

func GetSeeAlso

func GetSeeAlso(e ld.Entity) interface{}

Further information about the subject resource.

func GetSubClassOf

func GetSubClassOf(e ld.Entity) interface{}

The subject is a subclass of a class.

func GetSubPropertyOf

func GetSubPropertyOf(e ld.Entity) interface{}

The subject is a subproperty of a property.

func GetSubject

func GetSubject(e ld.Entity) interface{}

The subject of the subject RDF statement.

func GetType

func GetType(e ld.Entity) interface{}

The subject is an instance of a class.

func GetValue

func GetValue(e ld.Entity) interface{}

Idiomatic property used for structured values.

func IsAlt

func IsAlt(e ld.Entity) bool

Does the object quack like a(n) Alt?

func IsBag

func IsBag(e ld.Entity) bool

Does the object quack like a(n) Bag?

func IsClass

func IsClass(e ld.Entity) bool

Does the object quack like a(n) Class?

func IsContainer

func IsContainer(e ld.Entity) bool

Does the object quack like a(n) Container?

func IsContainerMembershipProperty

func IsContainerMembershipProperty(e ld.Entity) bool

Does the object quack like a(n) ContainerMembershipProperty?

func IsDatatype

func IsDatatype(e ld.Entity) bool

Does the object quack like a(n) Datatype?

func IsList

func IsList(e ld.Entity) bool

Does the object quack like a(n) List?

func IsLiteral

func IsLiteral(e ld.Entity) bool

Does the object quack like a(n) Literal?

func IsProperty

func IsProperty(e ld.Entity) bool

Does the object quack like a(n) Property?

func IsResource

func IsResource(e ld.Entity) bool

Does the object quack like a(n) Resource?

func IsSeq

func IsSeq(e ld.Entity) bool

Does the object quack like a(n) Seq?

func IsStatement

func IsStatement(e ld.Entity) bool

Does the object quack like a(n) Statement?

func SetComment

func SetComment(e ld.Entity, v interface{})

func SetDomain

func SetDomain(e ld.Entity, v interface{})

func SetFirst

func SetFirst(e ld.Entity, v interface{})

func SetIsDefinedBy

func SetIsDefinedBy(e ld.Entity, v interface{})

func SetLabel

func SetLabel(e ld.Entity, v interface{})

func SetMember

func SetMember(e ld.Entity, v interface{})

func SetObject

func SetObject(e ld.Entity, v interface{})

func SetPredicate

func SetPredicate(e ld.Entity, v interface{})

func SetRange

func SetRange(e ld.Entity, v interface{})

func SetRest

func SetRest(e ld.Entity, v interface{})

func SetSeeAlso

func SetSeeAlso(e ld.Entity, v interface{})

func SetSubClassOf

func SetSubClassOf(e ld.Entity, v interface{})

func SetSubPropertyOf

func SetSubPropertyOf(e ld.Entity, v interface{})

func SetSubject

func SetSubject(e ld.Entity, v interface{})

func SetType

func SetType(e ld.Entity, v interface{})

func SetValue

func SetValue(e ld.Entity, v interface{})

Types

type Alt

type Alt struct{ Container }

The class of containers of alternatives.

func AsAlt

func AsAlt(e ld.Entity) Alt

Ducktypes the object into a(n) Alt.

func NewAlt

func NewAlt(id string) Alt

type Bag

type Bag struct{ Container }

The class of unordered containers.

func AsBag

func AsBag(e ld.Entity) Bag

Ducktypes the object into a(n) Bag.

func NewBag

func NewBag(id string) Bag

type Class

type Class struct{ Resource }

The class of classes.

func AsClass

func AsClass(e ld.Entity) Class

Ducktypes the object into a(n) Class.

func NewClass

func NewClass(id string) Class

func (Class) SetSubClassOf

func (obj Class) SetSubClassOf(v interface{})

func (Class) SubClassOf

func (obj Class) SubClassOf() interface{}

The subject is a subclass of a class.

type Container

type Container struct{ Resource }

The class of RDF containers.

func AsContainer

func AsContainer(e ld.Entity) Container

Ducktypes the object into a(n) Container.

func NewContainer

func NewContainer(id string) Container

type ContainerMembershipProperty

type ContainerMembershipProperty struct{ Property }

The class of container membership properties, rdf:_1, rdf:_2, ..., all of which are sub-properties of 'member'.

func AsContainerMembershipProperty

func AsContainerMembershipProperty(e ld.Entity) ContainerMembershipProperty

Ducktypes the object into a(n) ContainerMembershipProperty.

func NewContainerMembershipProperty

func NewContainerMembershipProperty(id string) ContainerMembershipProperty

type Datatype

type Datatype struct{ Class }

The class of RDF datatypes.

func AsDatatype

func AsDatatype(e ld.Entity) Datatype

Ducktypes the object into a(n) Datatype.

func NewDatatype

func NewDatatype(id string) Datatype

type HTML

type HTML interface{}

The datatype of RDF literals storing fragments of HTML content

type LangString

type LangString interface{}

The datatype of language-tagged string values

type List

type List struct{ Resource }

The class of RDF Lists.

func AsList

func AsList(e ld.Entity) List

Ducktypes the object into a(n) List.

func NewList

func NewList(id string) List

func (List) First

func (obj List) First() interface{}

The first item in the subject RDF list.

func (List) Rest

func (obj List) Rest() interface{}

The rest of the subject RDF list after the first item.

func (List) SetFirst

func (obj List) SetFirst(v interface{})

func (List) SetRest

func (obj List) SetRest(v interface{})

type Literal

type Literal struct{ Resource }

The class of literal values, eg. textual strings and integers.

func AsLiteral

func AsLiteral(e ld.Entity) Literal

Ducktypes the object into a(n) Literal.

func NewLiteral

func NewLiteral(id string) Literal

type PlainLiteral

type PlainLiteral interface{}

The class of plain (i.e. untyped) literal values, as used in RIF and OWL 2

type Property

type Property struct{ Resource }

The class of RDF properties.

func AsProperty

func AsProperty(e ld.Entity) Property

Ducktypes the object into a(n) Property.

func NewProperty

func NewProperty(id string) Property

func (Property) Domain

func (obj Property) Domain() interface{}

A domain of the subject property.

func (Property) Range

func (obj Property) Range() interface{}

A range of the subject property.

func (Property) SetDomain

func (obj Property) SetDomain(v interface{})

func (Property) SetRange

func (obj Property) SetRange(v interface{})

func (Property) SetSubPropertyOf

func (obj Property) SetSubPropertyOf(v interface{})

func (Property) SubPropertyOf

func (obj Property) SubPropertyOf() interface{}

The subject is a subproperty of a property.

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

The class resource, everything.

func AsResource

func AsResource(e ld.Entity) Resource

Ducktypes the object into a(n) Resource.

func NewResource

func NewResource(id string) Resource

func (Resource) Apply

func (obj Resource) Apply(other ld.Entity, mergeArrays bool) error

Applies another object as a patch to this one. Implements ld.Entity.

func (Resource) Comment

func (obj Resource) Comment() interface{}

A description of the subject resource.

func (Resource) Get

func (obj Resource) Get(key string) interface{}

Returns the named attribute. Implements ld.Entity.

func (Resource) ID

func (obj Resource) ID() string

Returns the object's @id. Implements ld.Entity.

func (Resource) IsDefinedBy

func (obj Resource) IsDefinedBy() interface{}

The defininition of the subject resource.

func (Resource) IsNull

func (obj Resource) IsNull() bool

Returns whether the wrapped object is null. Implements ld.Entity.

func (Resource) Label

func (obj Resource) Label() interface{}

A human-readable name for the subject.

func (Resource) Member

func (obj Resource) Member() interface{}

A member of the subject resource.

func (Resource) Obj

func (obj Resource) Obj() *ld.Object

Returns the wrapped plain ld.Object. Implements ld.Entity.

func (Resource) SeeAlso

func (obj Resource) SeeAlso() interface{}

Further information about the subject resource.

func (Resource) Set

func (obj Resource) Set(key string, v interface{})

Sets the named attribute. Implements ld.Entity.

func (Resource) SetComment

func (obj Resource) SetComment(v interface{})

func (Resource) SetIsDefinedBy

func (obj Resource) SetIsDefinedBy(v interface{})

func (Resource) SetLabel

func (obj Resource) SetLabel(v interface{})

func (Resource) SetMember

func (obj Resource) SetMember(v interface{})

func (Resource) SetSeeAlso

func (obj Resource) SetSeeAlso(v interface{})

func (Resource) SetType_

func (obj Resource) SetType_(v interface{})

func (Resource) SetValue_

func (obj Resource) SetValue_(v interface{})

func (Resource) Type

func (obj Resource) Type() []string

Returns the object's @type. Implements ld.Entity.

func (Resource) Type_

func (obj Resource) Type_() interface{}

The subject is an instance of a class.

func (Resource) Value

func (obj Resource) Value() string

Returns the object's @value. Implements ld.Entity.

func (Resource) Value_

func (obj Resource) Value_() interface{}

Idiomatic property used for structured values.

type Seq

type Seq struct{ Container }

The class of ordered containers.

func AsSeq

func AsSeq(e ld.Entity) Seq

Ducktypes the object into a(n) Seq.

func NewSeq

func NewSeq(id string) Seq

type Statement

type Statement struct{ Resource }

The class of RDF statements.

func AsStatement

func AsStatement(e ld.Entity) Statement

Ducktypes the object into a(n) Statement.

func NewStatement

func NewStatement(id string) Statement

func (Statement) Object

func (obj Statement) Object() interface{}

The object of the subject RDF statement.

func (Statement) Predicate

func (obj Statement) Predicate() interface{}

The predicate of the subject RDF statement.

func (Statement) SetObject

func (obj Statement) SetObject(v interface{})

func (Statement) SetPredicate

func (obj Statement) SetPredicate(v interface{})

func (Statement) SetSubject

func (obj Statement) SetSubject(v interface{})

func (Statement) Subject

func (obj Statement) Subject() interface{}

The subject of the subject RDF statement.

type XMLLiteral

type XMLLiteral interface{}

The datatype of XML literal values.

Jump to

Keyboard shortcuts

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