smartlogic

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConcordanceAuthorityTme             = "TME"
	ConcordanceAuthorityFactset         = "FACTSET"
	ConcordanceAuthorityDbpedia         = "DBPedia"
	ConcordanceAuthorityGeonames        = "Geonames"
	ConcordanceAuthorityWikidata        = "Wikidata"
	ConcordanceAuthoritySmartlogic      = "Smartlogic"
	ConcordanceAuthorityManagedLocation = "ManagedLocation"

	ThingURIPrefix           = "http://www.ft.com/thing/"
	LocationURIPrefix        = "http://www.ft.com/ontology/managedlocation/"
	NotFound          status = iota
	SyntacticallyIncorrect
	SemanticallyIncorrect
	ValidConcept
	InternalError
	ServiceUnavailable
	NoContent
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Concept

type Concept struct {
	ID    string   `json:"@id"`
	Types []string `json:"@type,omitempty"`
	// contains filtered or unexported fields
}

func (*Concept) DbpediaIdentifiers

func (c *Concept) DbpediaIdentifiers() []LocationType

func (Concept) FactsetIdentifiers

func (c Concept) FactsetIdentifiers() []FactsetID

func (*Concept) GeonamesIdentifiers

func (c *Concept) GeonamesIdentifiers() []LocationType

func (Concept) TmeIdentifiers

func (c Concept) TmeIdentifiers() []TmeID

func (*Concept) UnmarshalJSON

func (c *Concept) UnmarshalJSON(data []byte) error

func (*Concept) WikidataIdentifiers

func (c *Concept) WikidataIdentifiers() []LocationType

type ConceptData added in v1.6.0

type ConceptData struct {
	Concepts []Concept `json:"@graph"`
}

type ConceptEditorial

type ConceptEditorial struct {
	TmeIdentifiersValue      []TmeID        `json:"http://www.ft.com/ontology/TMEIdentifier,omitempty"`
	FactsetIdentifiersValue  []FactsetID    `json:"http://www.ft.com/ontology/factsetIdentifier,omitempty"`
	WikidataIdentifiersValue []LocationType `json:"http://www.ft.com/ontology/wikidataIdentifier,omitempty"`
	GeonamesIdentifiersValue []LocationType `json:"http://www.ft.com/ontology/geonamesIdentifier,omitempty"`
}

func (ConceptEditorial) DbpediaIdentifiers

func (c ConceptEditorial) DbpediaIdentifiers() []LocationType

func (ConceptEditorial) FactsetIdentifiers

func (c ConceptEditorial) FactsetIdentifiers() []FactsetID

func (ConceptEditorial) GeonamesIdentifiers

func (c ConceptEditorial) GeonamesIdentifiers() []LocationType

func (ConceptEditorial) TmeIdentifiers

func (c ConceptEditorial) TmeIdentifiers() []TmeID

func (ConceptEditorial) WikidataIdentifiers

func (c ConceptEditorial) WikidataIdentifiers() []LocationType

type ConceptML

type ConceptML struct {
	TmeIdentifiersValue      []TmeID        `json:"http://www.ft.com/ontology/managedlocation/TMEIdentifier,omitempty"`
	FactsetIdentifiersValue  []FactsetID    `json:"http://www.ft.com/ontology/managedlocation/factsetIdentifier,omitempty"`
	DbpediaIdentifiersValue  []LocationType `json:"http://www.ft.com/ontology/managedlocation/dbpediaId,omitempty"`
	GeonamesIdentifiersValue []LocationType `json:"http://www.ft.com/ontology/managedlocation/geonamesId,omitempty"`
	WikidataIdentifiersValue []LocationType `json:"http://www.ft.com/ontology/managedlocation/wikidataId,omitempty"`
}

func (ConceptML) DbpediaIdentifiers

func (c ConceptML) DbpediaIdentifiers() []LocationType

func (ConceptML) FactsetIdentifiers

func (c ConceptML) FactsetIdentifiers() []FactsetID

func (ConceptML) GeonamesIdentifiers

func (c ConceptML) GeonamesIdentifiers() []LocationType

func (ConceptML) TmeIdentifiers

func (c ConceptML) TmeIdentifiers() []TmeID

func (ConceptML) WikidataIdentifiers

func (c ConceptML) WikidataIdentifiers() []LocationType

type Concepter

type Concepter interface {
	TmeIdentifiers() []TmeID
	FactsetIdentifiers() []FactsetID
	DbpediaIdentifiers() []LocationType
	GeonamesIdentifiers() []LocationType
	WikidataIdentifiers() []LocationType
}

type ConcordanceTransformerHandler added in v1.6.0

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

func NewHandler

func NewHandler(transformer TransformerService, consumer messageConsumer, log *logger.UPPLogger) ConcordanceTransformerHandler

func (*ConcordanceTransformerHandler) ProcessKafkaMessage added in v1.6.0

func (h *ConcordanceTransformerHandler) ProcessKafkaMessage(msg kafka.FTMessage)

func (*ConcordanceTransformerHandler) RegisterAdminHandlers added in v1.6.0

func (h *ConcordanceTransformerHandler) RegisterAdminHandlers(router *mux.Router, appSystemCode string, appName string, appDescription string)

func (*ConcordanceTransformerHandler) RegisterHandlers added in v1.6.0

func (h *ConcordanceTransformerHandler) RegisterHandlers(router *mux.Router)

func (*ConcordanceTransformerHandler) SendHandler added in v1.6.0

func (*ConcordanceTransformerHandler) TransformHandler added in v1.6.0

func (h *ConcordanceTransformerHandler) TransformHandler(rw http.ResponseWriter, req *http.Request)

type ConcordedID added in v1.6.0

type ConcordedID struct {
	Authority      string `json:"authority"`
	AuthorityValue string `json:"authorityValue,omitempty"`
	UUID           string `json:"uuid"`
}

type FactsetID added in v1.6.0

type FactsetID struct {
	Language string `json:"@language"`
	Value    string `json:"@value"`
}

type LocationType

type LocationType struct {
	Type  string `json:"@type"`
	Value string `json:"@value"`
}

type TmeID added in v1.6.0

type TmeID struct {
	Value string `json:"@value"`
}

type TransformerService

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

func NewTransformerService

func NewTransformerService(topic string, writerAddress string, httpClient httpClient, log *logger.UPPLogger) TransformerService

type UppConcordance

type UppConcordance struct {
	Authority    string        `json:"authority"`
	ConceptUUID  string        `json:"uuid"`
	ConcordedIds []ConcordedID `json:"concordances"`
}

Jump to

Keyboard shortcuts

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