/// <summary> /// Returns the list of Place Observation instances which belong to the given Place name, or null if none found. The list is a copy, mofifications to the list have no affect on the original. /// </summary> /// <param name="placeName">string: Place name to match</param> /// <returns>List of Observation: List of matching Place Observation instances.</returns> public List <Observation> GetPlaceObservations(string placeName) { Place p = _model.GetPlace(AppDelegates.PlaceHasName(placeName)); if (p is null) { return(null); } return(p.Observations); }
/// <summary> /// Returns a TrailSite instance for a given name. The instance is a copy, modifications to the instance will not affect the original. /// </summary> /// <param name="name">String: Name of TrailSite</param> /// <returns>TrailSite: Instance of TrailSite or null if not found.</returns> public TrailSite GetTrailSiteByName(string name) { return(_model.GetTrailSite(AppDelegates.PlaceHasName(name))); }
/// <summary> /// Returns a list of Observation instances of the given Facility name which belong to the given Place name, or null if none found. The list is a copy, mofifications to the list have no affect on the original. /// </summary> /// <param name="placeName">string: Name of Place to match</param> /// <param name="facilityName">string: Name of Facility to match</param> /// <returns>List of Observation: List of matching Observation instances.</returns> public List <Observation> GetPlaceFacilityObservations(string placeName, string facilityName) { Facility returned = _model.GetPlace(AppDelegates.PlaceHasName(placeName)).Facilities.Find(AppDelegates.FacilityHasEntry(facilityName)); return(returned.Observations); }
/// <summary> /// Returns an instance implementing Place, for a given name. The instance is a copy, modifications to the instance will not affect the original. /// </summary> /// <param name="name">string: Name of Place to match</param> /// <returns>Place: Instance implementing Place or null if not found.</returns> public Place GetPlaceByName(string name) { return(_model.GetPlace(AppDelegates.PlaceHasName(name))); }