@@ -549,19 +549,19 @@ def getAffiliations(self, ids=None, personfirst=None, personlast=None, orgcode=N
549
549
all Affiliation objects in the database will be returned.
550
550
551
551
Args:
552
- ids (:obj:` list` , optional): List of AffiliationIDs. Defaults to None .
553
- personfirst (:obj:` str` , optional): Person First Name. Defaults to None .
554
- personlast (:obj:` str` , optional): Person Last Name. Defaults to None .
555
- orgcode (:obj:` str` , optional): Organization Code. Defaults to None .
552
+ ids (list, optional): List of AffiliationIDs.
553
+ personfirst (str, optional): Person First Name.
554
+ personlast (str, optional): Person Last Name.
555
+ orgcode (str, optional): Organization Code.
556
556
557
557
Returns:
558
558
list: List of Affiliation objects
559
559
560
560
Examples:
561
- >>> read .getAffiliations(ids=[39,40])
562
- >>> read .getAffiliations(personfirst='John',
561
+ >>> ReadODM2 .getAffiliations(ids=[39,40])
562
+ >>> ReadODM2 .getAffiliations(personfirst='John',
563
563
... personlast='Smith')
564
- >>> read .getAffiliations(orgcode='Acme')
564
+ >>> ReadODM2 .getAffiliations(orgcode='Acme')
565
565
566
566
"""
567
567
q = self ._session .query (Affiliations )
@@ -588,18 +588,36 @@ def getResults(self, ids=None, type=None, uuids=None, actionid=None, simulationi
588
588
variableid = None , siteid = None ):
589
589
590
590
# TODO what if user sends in both type and actionid vs just actionid
591
- """
592
- getResults(self, ids=None, type=None, uuids=None, actionid=None, simulationid=None, sfid=None,
593
- variableid=None, siteid=None)
594
- * Pass nothing - returns a list of all Results objects
595
- * Pass a list of ResultID - returns a single Results object
596
- * Pass a ResultType - returns a list of Result objects of that type. must be from ResultTypeCV
597
- * Pass a list of UUIDs -
598
- * Pass an ActionID - returns a single Results object
599
- * Pass a Sampling Feature ID- returns a list of objects with that Sampling Feature ID
600
- * Pass a Variable ID - returns a list of results with that Variable ID
601
- * Pass a Simulation ID - return a list of results that were generated by that simulation
602
- * Pass a Site ID - return a list of results from that site location, through the related features table.
591
+ """Retrieve a list of Result objects.
592
+
593
+ If no arguments are passed to the function, or their values are None,
594
+ all Result objects in the database will be returned.
595
+
596
+ Args:
597
+ ids (list, optional): List of ResultIDs.
598
+ type (str, optional): Type of Result from
599
+ `controlled vocabulary name <http://vocabulary.odm2.org/resulttype/>`_.
600
+ uuids (list, optional): List of UUIDs string.
601
+ actionid (int, optional): ActionID.
602
+ simulationid (int, optional): SimulationID.
603
+ sfid (int, optional): SamplingFeatureID.
604
+ variableid (int, optional): VariableID.
605
+ siteid (int, optional): SiteID.
606
+
607
+ Returns:
608
+ list: List of Result objects
609
+
610
+ Examples:
611
+ >>> ReadODM2.getResults(ids=[39,40])
612
+ >>> ReadODM2.getResults(type='Time series coverage')
613
+ >>> ReadODM2.getResults(sfid=65)
614
+ >>> ReadODM2.getResults(uuids=['a6f114f1-5416-4606-ae10-23be32dbc202',
615
+ ... '5396fdf3-ceb3-46b6-aaf9-454a37278bb4'])
616
+ >>> ReadODM2.getResults(simulationid=50)
617
+ >>> ReadODM2.getResults(siteid=6)
618
+ >>> ReadODM2.getResults(variableid=7)
619
+ >>> ReadODM2.getResults(actionid=20)
620
+
603
621
"""
604
622
605
623
query = self ._session .query (Results )
0 commit comments