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
 def parameters(self, value):
     do_check(value.keys(), 'parameters.keys()', regex_tuple=uri_regex)
     self._parameters = value
 def test(self, value):
     do_check(value, value, type=DefaultQuery.Criterion.Test)
     self._test = value
 def capability_id(self, value):
     do_check(value, 'capability_id', regex_tuple=uri_regex)
     self._capability_id = value
 def targeting_expression_infos(self, value):
     do_check(value, 'targeting_expression_infos', type=DefaultQueryInfo.TargetingExpressionInfo)
     self._targeting_expression_infos = value
 def target(self, value):
     do_check(value, 'target', type=basestring)
     self._target = value
 def criteria(self, value):
     do_check(value, 'critiera', type=DefaultQuery.Criteria)
     self._criteria = value
 def name(self, value):
     do_check(value, 'name', type=basestring)
     self._name = value
 def targeting_expression_id(self, value):
     do_check(value, 'targeting_expression_id', regex_tuple=uri_regex)
     self._targeting_expression_id = value
 def operator(self, value):
     do_check(value, 'operator', value_tuple=OP_TYPES)
     self._operator = value
 def allowed_scope(self, value):
     do_check(value, 'allowed_scope', type=basestring)
     self._allowed_scope = value
 def preferred_scope(self, value):
     do_check(value, 'preferred_scope', type=basestring)
     self._preferred_scope = value
 def capability_modules(self, value):
     do_check(value, 'capability_modules', regex_tuple = uri_regex)
     self._capability_modules = value
 def capability_module_id(self, value):
     do_check(value, 'capability_module_id', type=basestring)
     self._capability_module_id = value
 def criterion(self, value):
     do_check(value, 'criterion', type=DefaultQuery.Criterion)
     self._criterion = value
 def relationships(self, value):
     do_check(value, 'relationships', type=Relationship)
     self._relationships = {}
     for item in value:
         self._relationships[item.name] = item
 def negate(self, value):
     do_check(value, 'negate', value_tuple=(True, False), can_be_none=True)
     self._negate = value
Example #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)
 def parameters(self, value):
     do_check(value, 'parameters', type=Parameter)
     self._parameters = {}
     for item in value:
         self._parameters[item.name] = item