Documentation ¶
Index ¶
- Variables
- func APIURL(uuid string, labels []string, env string) string
- func FullTypeHierarchy(highestLevelType string) []string
- func IDURL(uuid string) string
- func MostSpecificType(types []string) (string, error)
- func ParentType(t string) string
- func SortTypes(types []string) ([]string, error)
- func TypeURIs(labels []string) []string
- func TypesFromURIs(types []string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNotHierarchy = errors.New("provided types are not a consistent hierarchy")
Functions ¶
func APIURL ¶
APIURL - Establishes the ApiURL given a whether the Label is a Person, Organisation or Company (Public or Private)
func FullTypeHierarchy ¶
Full type hierarchy is returned when provided either the concept type or full uri of the most specific concept type
func IDURL ¶
IDURL - Adds the appropriate prefix e.g http://api.ft.com/things/
func MostSpecificType ¶
MostSpecific returns the most specific from a list of types in an hierarchy behaviour is undefined if any of the types are siblings.
func ParentType ¶
ParentType returns the immediate parent type for a given Type
func TypeURIs ¶
TypeURIs - Builds up the type URI based on type e.g http://www.ft.com/ontology/Person
func TypesFromURIs ¶ added in v1.1.0
TypesFromURIs converts list of typeURIs to types based on the "typeURIs" mapping. The returned concept type list is sorted based on the "parentTypes" hierarchy. If a typeURI is not part of the "typeURIs" mapping, or if the type list is un-sortable it returns an error.
Types ¶
This section is empty.