Documentation
¶
Index ¶
- func AppendPlacetype(pt WOFPlacetype) error
- func AppendPlacetypeSpecification(spec *WOFPlacetypeSpecification) error
- func IsAncestor(a *WOFPlacetype, b *WOFPlacetype) bool
- func IsDescendant(a *WOFPlacetype, b *WOFPlacetype) bool
- func IsValidPlacetype(name string) bool
- func IsValidPlacetypeId(id int64) bool
- type WOFPlacetype
- func Ancestors(pt *WOFPlacetype) []*WOFPlacetype
- func AncestorsForRoles(pt *WOFPlacetype, roles []string) []*WOFPlacetype
- func Children(pt *WOFPlacetype) []*WOFPlacetype
- func Descendants(pt *WOFPlacetype) []*WOFPlacetype
- func DescendantsForRoles(pt *WOFPlacetype, roles []string) []*WOFPlacetype
- func GetPlacetypeById(id int64) (*WOFPlacetype, error)
- func GetPlacetypeByName(name string) (*WOFPlacetype, error)
- func Placetypes() ([]*WOFPlacetype, error)
- func PlacetypesForRoles(roles []string) ([]*WOFPlacetype, error)
- type WOFPlacetypeAltNames
- type WOFPlacetypeName
- type WOFPlacetypeSpecification
- func (spec *WOFPlacetypeSpecification) AppendPlacetype(pt WOFPlacetype) error
- func (spec *WOFPlacetypeSpecification) AppendPlacetypeSpecification(other_spec *WOFPlacetypeSpecification) error
- func (spec *WOFPlacetypeSpecification) Catalog() map[string]WOFPlacetype
- func (spec *WOFPlacetypeSpecification) GetPlacetypeById(id int64) (*WOFPlacetype, error)
- func (spec *WOFPlacetypeSpecification) GetPlacetypeByName(name string) (*WOFPlacetype, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendPlacetype ¶ added in v0.2.0
func AppendPlacetype(pt WOFPlacetype) error
func AppendPlacetypeSpecification ¶ added in v0.2.2
func AppendPlacetypeSpecification(spec *WOFPlacetypeSpecification) error
func IsAncestor ¶ added in v0.4.0
func IsAncestor(a *WOFPlacetype, b *WOFPlacetype) bool
Returns true is 'b' is an ancestor of 'a'.
func IsDescendant ¶ added in v0.4.0
func IsDescendant(a *WOFPlacetype, b *WOFPlacetype) bool
Returns true is 'b' is a descendant of 'a'.
func IsValidPlacetype ¶
IsValidPlacetypeId returns a boolean value indicating whether 'name' is a known and valid placetype name.
func IsValidPlacetypeId ¶
IsValidPlacetypeId returns a boolean value indicating whether 'id' is a known and valid placetype ID.
Types ¶
type WOFPlacetype ¶
type WOFPlacetype struct {
Id int64 `json:"id"`
Name string `json:"name"`
Role string `json:"role"`
Parent []int64 `json:"parent"`
}
func Ancestors ¶
func Ancestors(pt *WOFPlacetype) []*WOFPlacetype
Ancestors returns the ancestors of role "common" for 'pt'.
func AncestorsForRoles ¶
func AncestorsForRoles(pt *WOFPlacetype, roles []string) []*WOFPlacetype
AncestorsForRoles returns the ancestors matching any role in 'roles' for 'pt'.
func Children ¶
func Children(pt *WOFPlacetype) []*WOFPlacetype
Children returns the immediate child placetype of 'pt'.
func Descendants ¶
func Descendants(pt *WOFPlacetype) []*WOFPlacetype
Descendants returns the descendants of role "common" for 'pt'.
func DescendantsForRoles ¶
func DescendantsForRoles(pt *WOFPlacetype, roles []string) []*WOFPlacetype
DescendantsForRoles returns the descendants matching any role in 'roles' for 'pt'.
func GetPlacetypeById ¶
func GetPlacetypeById(id int64) (*WOFPlacetype, error)
func GetPlacetypeByName ¶
func GetPlacetypeByName(name string) (*WOFPlacetype, error)
func Placetypes ¶ added in v0.1.1
func Placetypes() ([]*WOFPlacetype, error)
Placetypes returns all the known placetypes for the 'common', 'optional' and 'common_optional' roles.
func PlacetypesForRoles ¶ added in v0.1.2
func PlacetypesForRoles(roles []string) ([]*WOFPlacetype, error)
type WOFPlacetypeAltNames ¶
type WOFPlacetypeName ¶
type WOFPlacetypeSpecification ¶
type WOFPlacetypeSpecification struct {
// contains filtered or unexported fields
}
func DefaultWOFPlacetypeSpecification ¶ added in v0.2.1
func DefaultWOFPlacetypeSpecification() (*WOFPlacetypeSpecification, error)
func NewWOFPlacetypeSpecification ¶ added in v0.2.1
func NewWOFPlacetypeSpecification(body []byte) (*WOFPlacetypeSpecification, error)
func NewWOFPlacetypeSpecificationWithReader ¶ added in v0.2.3
func NewWOFPlacetypeSpecificationWithReader(r io.Reader) (*WOFPlacetypeSpecification, error)
func (*WOFPlacetypeSpecification) AppendPlacetype ¶ added in v0.2.0
func (spec *WOFPlacetypeSpecification) AppendPlacetype(pt WOFPlacetype) error
func (*WOFPlacetypeSpecification) AppendPlacetypeSpecification ¶ added in v0.2.2
func (spec *WOFPlacetypeSpecification) AppendPlacetypeSpecification(other_spec *WOFPlacetypeSpecification) error
func (*WOFPlacetypeSpecification) Catalog ¶ added in v0.2.0
func (spec *WOFPlacetypeSpecification) Catalog() map[string]WOFPlacetype
func (*WOFPlacetypeSpecification) GetPlacetypeById ¶ added in v0.2.0
func (spec *WOFPlacetypeSpecification) GetPlacetypeById(id int64) (*WOFPlacetype, error)
func (*WOFPlacetypeSpecification) GetPlacetypeByName ¶ added in v0.2.0
func (spec *WOFPlacetypeSpecification) GetPlacetypeByName(name string) (*WOFPlacetype, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
wof-placetype-ancestors
command
|
|
|
wof-placetype-children
command
|
|
|
wof-placetype-descendants
command
|
|
|
wof-valid-placetype
command
|
|