model

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package model provides various models for structuring extra information about terms, relationships and graphs in the OBO Graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicPropertyValue

type BasicPropertyValue struct {
	*PropertyValue
}

BasicPropertyValue is a generic PropertyValue.

func NewBasicPropertyValue

func NewBasicPropertyValue(prd, val string) *BasicPropertyValue

NewBasicPropertyValue returns a new Basic.

type Definition

type Definition struct {
	*PropertyValue
}

Definition represents a textual definition of an ontology term.

func NewDefinition

func NewDefinition(val string, refs []string) *Definition

NewDefinition returns a new Definition.

type Meta

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

Meta is a container for hosting sets of PropertyValue objects.

func NewMeta

func NewMeta(opt *MetaOptions) *Meta

NewMeta is a constructor for Meta.

func (*Meta) BasicPropertyValues

func (m *Meta) BasicPropertyValues() []*BasicPropertyValue

BasicPropertyValues are the collection of meta properties.

func (*Meta) Comments

func (m *Meta) Comments() []string

Comments are unstructured text information.

func (*Meta) Definition

func (m *Meta) Definition() *Definition

Definition is node definition.

func (*Meta) IsDeprecated added in v1.6.0

func (m *Meta) IsDeprecated() bool

IsDeprecated returns a boolean indicating whether the meta information is deprecated.

func (*Meta) Namespace

func (m *Meta) Namespace() string

Namespace returns either the default namespace(top level ontology) or the individual namespace of a node.

func (*Meta) Subsets

func (m *Meta) Subsets() []string

Subsets are the subset values of the meta properties.

func (*Meta) Synonyms

func (m *Meta) Synonyms() []*Synonym

Synonyms are the synonyms of the nodes.

func (*Meta) Version

func (m *Meta) Version() string

Version the ontology version, will be unset for nodes and edges.

func (*Meta) Xrefs

func (m *Meta) Xrefs() []*Xref

Xrefs are slice of all xrefs.

func (*Meta) XrefsValues

func (m *Meta) XrefsValues() []string

XrefsValues are values of all the xrefs.

type MetaOptions

type MetaOptions struct {
	Definition *Definition
	BaseProps  []*BasicPropertyValue
	Synonyms   []*Synonym
	Xrefs      []*Xref
	Comments   []string
	Subsets    []string
	Version    string
	Deprecated bool
}

MetaOptions is a container for various types of metadata.

type PropertyValue

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

PropertyValue for modeling ontology metadata other than term and their relationships.

func (*PropertyValue) Pred

func (p *PropertyValue) Pred() string

Pred corresponds to OWL properties.

func (*PropertyValue) Value

func (p *PropertyValue) Value() string

Value is the value of property.

func (*PropertyValue) Xrefs

func (p *PropertyValue) Xrefs() []string

Xrefs is list of data supporting the property-value assertion.

type Synonym

type Synonym struct {
	*PropertyValue
}

Synonym represent an alternate term for the node.

func NewSynonym

func NewSynonym(prd, val string) *Synonym

NewSynonym returns a new Synonym.

func NewSynonymWithRefs

func NewSynonymWithRefs(prd, val string, refs []string) *Synonym

NewSynonymWithRefs returns a new Synonym.

func (*Synonym) IsExact

func (s *Synonym) IsExact() bool

IsExact is a convenience method to check for EXACT scope.

func (*Synonym) Scope

func (s *Synonym) Scope() string

Scope returns OBO-style scope of synonym.

type Xref

type Xref struct {
	*PropertyValue
}

Xref support the property-value assertion.

func NewXref

func NewXref(val string) *Xref

NewXref returns a new Xref.

Jump to

Keyboard shortcuts

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