Ejemplo n.º 1
0
func FindFeaturesOfInterest(c gossamer.Client) {
	ol, e := c.FindFeaturesOfInterest()
	if e != nil {
		log.Fatal(e)
	}

	for _, v := range ol {
		o, err := c.GetFeaturesOfInterest(v.GetId())
		if err != nil {
			log.Fatal(err)
		} else {
			log.Println("Got FeaturesofInterest Entity ", o.GetId())
		}
	}
}
Ejemplo n.º 2
0
func DeleteFeaturesOfInterest(c gossamer.Client) {
	ol, e := c.FindFeaturesOfInterest()
	if e != nil {
		log.Fatal(e)
	}

	for _, v := range ol {
		o, err := c.GetFeaturesOfInterest(v.GetId())
		if err != nil {
			log.Fatal(err)
		} else {
			// Delete Observation
			e := c.DeleteFeaturesOfInterest(o.GetId())
			if e != nil {
				log.Fatal(err)
			} else {
				log.Println("Deleted FeatureOfInterest ", o.GetId())
			}
		}
	}
}