Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct { Props schematree.IList // contains filtered or unexported fields }
Instance - An assessment on properties
COMMENT: The assessment module might be too tighly coupled with the SchemaTree. In the
early days the SchemaTree delegate the job of creating the input arguments to the caller of the method. The caller would create the IList and then pass it to the SchemaTree. This behaviour should be avoid because it makes too much internal information visible to the outside. The correct behaviour is to accept an array of strings (or byte-arrays) and then construct the IList oneself. To fix this issue in the future, please consider making IList and IItem private and then use the schematree.Recommend(props []string, types []string). Likewise, assessments should be working with arrays of strings and not IItems. The benefit in the current method is a faster evaluation since the IList construction does not need to be done multiple times.
func NewInstance ¶
func NewInstance(argProps schematree.IList, argTree *schematree.SchemaTree, argUseCache bool) *Instance
NewInstance : constructor method
func NewInstanceFromInput ¶
func NewInstanceFromInput(argProps []string, argTypes []string, argTree *schematree.SchemaTree, argUseCache bool) *Instance
NewInstanceFromInput : constructor method to receive strings and convert them into the current assessment format that uses IList.
func (*Instance) CalcPropertyLength ¶
CalcPropertyLength : Calculate the amount of properties.
func (*Instance) CalcRecommendations ¶
func (inst *Instance) CalcRecommendations() schematree.PropertyRecommendations
CalcRecommendations : Will execute the core schematree recommender on the properties and return the list of recommendations. Cache-enabled operation.
func (*Instance) GetWikiRecs ¶
func (inst *Instance) GetWikiRecs(Properties []string) schematree.PropertyRecommendations
GetWikiRecs computes recommendations from a local wikidata PropertySuggester
Click to show internal directories.
Click to hide internal directories.