RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
OntologyIsSubsuperclass.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 OntologyIsSubsuperclass(CloudMsg):
12  """ Ontology Is Sub-Superclass Of Cloud Message object"""
13 
14  class Request(CloudRequest):
15  """ Ontology Is Sub-Superclass Of Cloud Request object.
16 
17  OntologyIsSubsuperclass.Request
18  """
19  def __init__(self, **kwargs):
20  """!
21  Constructor
22 
23  @param **kwargs - Keyword arguments. Apply values to the request attributes.
24  - @ref parent_class
25  - @ref child_class
26  - @ref recursive
27  """
28 
29  ## The ontology parent class name.
30  # e.g. 'Oven'
31  self.parent_class = ''
32  ## The ontology child class name.
33  # e.g. 'Microwave'
34  self.child_class = ''
35  ## Recursive ontology database search.
36  self.recursive = False
37  super(OntologyIsSubsuperclass.Request, self).__init__(**kwargs)
38 
39 
40  def make_payload(self):
41  """ Create and return the Payload of the Request. """
42  return Payload(
43  parent_class=self.parent_class,
44  child_class=self.child_class,
45  recursive=self.recursive)
46 
47 
48  def make_files(self):
49  """ Create and return Array of File objects of the Request. """
50  return []
51 
52 
53  class Response(CloudResponse):
54  """ Ontology Is Sub-Superclass Cloud Response object.
55 
56  OntologyIsSubsuperclass.Response
57  """
58  def __init__(self, **kwargs):
59  """!
60  Constructor
61 
62  @param **kwargs - Keyword arguments. Apply values to the request attributes.
63  - @ref error
64  - @ref result
65  """
66 
67  ## Error message
68  self.error = ''
69  ## Success index on ontology-is-subsuperclass-of query.
70  self.result = False
71  super(OntologyIsSubsuperclass.Response, self).__init__(**kwargs)
72 
73 
74  def __init__(self, **kwargs):
75  """!
76  Constructor
77 
78  @param **kwargs - Keyword arguments. Apply values to the request attributes.
79  - @ref Request.parent_class
80  - @ref Request.child_class
81  - @ref Request.recursive
82  """
83 
84  # Create and hold the Request object for this CloudMsg
86  # Create and hold the Response object for this CloudMsg
88  super(OntologyIsSubsuperclass, self).__init__(
89  svcname='ontology_is_subsuperclass_of', **kwargs)
90 
91