RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
OntologySuperclasses.py
Go to the documentation of this file.
1 from RappCloud.Objects import (
2  File,
3  Payload)
4 
5 from Cloud import (
6  CloudMsg,
7  CloudRequest,
8  CloudResponse)
9 
10 
11 class OntologySuperclasses(CloudMsg):
12  """ Ontology Superclasses Of Cloud Message object"""
13 
14  class Request(CloudRequest):
15  """ Ontology Superclasses Of Cloud Request object.
16 
17  OntologySuperclasses.Request
18  """
19  def __init__(self, **kwargs):
20  """!
21  Constructor
22 
23  @param **kwargs - Keyword arguments. Apply values to the request attributes.
24  - @ref query
25  """
26  ## The Ontology class.
27  # e.g. 'Oven'
28  self.ontology_class = ''
29  ## Recursive search.
30  self.recursive = False
31  super(OntologySuperclasses.Request, self).__init__(**kwargs)
32 
33 
34  def make_payload(self):
35  """ Create and return the Payload of the Request. """
36  return Payload(
37  ontology_class=self.ontology_class,
38  recursive=self.recursive)
39 
40 
41  def make_files(self):
42  """ Create and return Array of File objects of the Request. """
43  return []
44 
45 
46  class Response(CloudResponse):
47  """ Ontology Superclasses Cloud Response object.
48 
49  OntologySuperclasses.Response
50  """
51  def __init__(self, **kwargs):
52  """!
53  Constructor
54 
55  @param **kwargs - Keyword arguments. Apply values to the request attributes.
56  - @ref error
57  - @ref results
58  """
59 
60  ## Error message
61  self.error = ''
62  ## Ontology query results
63  self.results = []
64  super(OntologySuperclasses.Response, self).__init__(**kwargs)
65 
66 
67  def __init__(self, **kwargs):
68  """!
69  Constructor
70 
71  @param **kwargs - Keyword arguments. Apply values to the request attributes.
72  - @ref Request.query
73  """
74 
75  # Create and hold the Request object for this CloudMsg
77  # Create and hold the Response object for this CloudMsg
79  super(OntologySuperclasses, self).__init__(
80  svcname='ontology_superclasses_of', **kwargs)
81 
82