示例#1
0
 def execute(self, schema):
     if schema.builtin(self.ref):
         name = self.ref[0]
         b = Factory.create(schema, name)
         log.debug('%s, found builtin (%s)', self.id, name)
         return b
     result = schema.types.get(self.ref)
     if self.filter(result):
         result = None
     return self.result(result)
示例#2
0
 def execute(self, schema):
     if schema.builtin(self.ref):
         name = self.ref[0]
         b = Factory.create(schema, name)
         log.debug('%s, found builtin (%s)', self.id, name)
         return b
     result = schema.types.get(self.ref)
     if self.filter(result):
         result = None
     return self.result(result)
示例#3
0
 def execute(self, schema):
     if schema.builtin(self.ref):
         name = self.ref[0]
         b = Factory.create(schema, name)
         log.debug('%s, found builtin (%s)', self.id, name)
         return b
     result = None
     for d in (schema.elements, schema.types):
         result = d.get(self.ref)
         if self.filter(result):
             result = None
         else:
             break
     if result is None:
         eq = ElementQuery(self.ref)
         eq.history = self.history
         result = eq.execute(schema)
     return self.result(result)
示例#4
0
 def execute(self, schema):
     if schema.builtin(self.ref):
         name = self.ref[0]
         b = Factory.create(schema, name)
         log.debug('%s, found builtin (%s)', self.id, name)
         return b
     result = None
     for d in (schema.elements, schema.types):
         result = d.get(self.ref)
         if self.filter(result):
             result = None
         else:
             break
     if result is None:
         eq = ElementQuery(self.ref)
         eq.history = self.history
         result = eq.execute(schema)
     return self.result(result)