queries

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryBuilder

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

func NewQueryBuilder

func NewQueryBuilder(server string, token string) *QueryBuilder

func (*QueryBuilder) FileQuery added in v0.16.0

func (qb *QueryBuilder) FileQuery(fileContent string, timeout time.Duration) ([]any, error)

func (*QueryBuilder) GetNamespacePrefix

func (qb *QueryBuilder) GetNamespacePrefix(urlExpansion string) (string, error)

func (*QueryBuilder) Query

func (qb *QueryBuilder) Query(startingEntities []string, predicate string, inverse bool, datasets []string) (*QueryResult, error)

func (*QueryBuilder) QuerySingle

func (qb *QueryBuilder) QuerySingle(entityId string, details bool, datasets []string) (*api.Entity, map[string]interface{}, error)

type QueryResult

type QueryResult struct {
	Data []ResultPart
}

type ResultPart

type ResultPart struct {
	Uri          string     `json:"uri"`
	PredicateUri string     `json:"predicateUri"`
	Entity       api.Entity `json:"entity"`
}

func (*ResultPart) UnmarshalJSON

func (part *ResultPart) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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