コード例 #1
0
 def relationship(self, value):
     #TODO: For known capability IDs, check that the relationship is valid
     #TODO: provide a way to register other capability IDs
     do_check(value, 'relationship', type=basestring)
     self._relationship = value
コード例 #2
0
 def parameters(self, value):
     do_check(value.keys(), 'parameters.keys()', regex_tuple=uri_regex)
     self._parameters = value
コード例 #3
0
 def test(self, value):
     do_check(value, value, type=DefaultQuery.Criterion.Test)
     self._test = value
コード例 #4
0
 def capability_id(self, value):
     do_check(value, 'capability_id', regex_tuple=uri_regex)
     self._capability_id = value
コード例 #5
0
 def targeting_expression_infos(self, value):
     do_check(value, 'targeting_expression_infos', type=DefaultQueryInfo.TargetingExpressionInfo)
     self._targeting_expression_infos = value
コード例 #6
0
 def target(self, value):
     do_check(value, 'target', type=basestring)
     self._target = value
コード例 #7
0
 def criteria(self, value):
     do_check(value, 'critiera', type=DefaultQuery.Criteria)
     self._criteria = value
コード例 #8
0
 def name(self, value):
     do_check(value, 'name', type=basestring)
     self._name = value
コード例 #9
0
 def targeting_expression_id(self, value):
     do_check(value, 'targeting_expression_id', regex_tuple=uri_regex)
     self._targeting_expression_id = value
コード例 #10
0
 def operator(self, value):
     do_check(value, 'operator', value_tuple=OP_TYPES)
     self._operator = value
コード例 #11
0
 def allowed_scope(self, value):
     do_check(value, 'allowed_scope', type=basestring)
     self._allowed_scope = value
コード例 #12
0
 def preferred_scope(self, value):
     do_check(value, 'preferred_scope', type=basestring)
     self._preferred_scope = value
コード例 #13
0
 def capability_modules(self, value):
     do_check(value, 'capability_modules', regex_tuple = uri_regex)
     self._capability_modules = value
コード例 #14
0
 def capability_module_id(self, value):
     do_check(value, 'capability_module_id', type=basestring)
     self._capability_module_id = value
コード例 #15
0
 def criterion(self, value):
     do_check(value, 'criterion', type=DefaultQuery.Criterion)
     self._criterion = value
コード例 #16
0
 def relationships(self, value):
     do_check(value, 'relationships', type=Relationship)
     self._relationships = {}
     for item in value:
         self._relationships[item.name] = item
コード例 #17
0
 def negate(self, value):
     do_check(value, 'negate', value_tuple=(True, False), can_be_none=True)
     self._negate = value
コード例 #18
0
 def test_numeric_regex_valid(self):
     # This message ID is valid. It should not raise an exception
     do_check("12345", "Test Value", regex_tuple=message_id_regex_10)
コード例 #19
0
 def parameters(self, value):
     do_check(value, 'parameters', type=Parameter)
     self._parameters = {}
     for item in value:
         self._parameters[item.name] = item