Fetch all definitions
489528
def each(&block)
      definitions = Hash.new

      env.logger.debug("[Definition] Searching #{env.definition_dir} for definitions:")
      subdirs = Dir.glob("#{env.definition_dir}/*")

      subdirs.each do |sub|
        name = File.basename(sub)
        env.logger.debug("[Definition] possible definition '#{name}' found")
        begin
          definitions[name] = Veewee::Definition.load(name, env)
        rescue Veewee::DefinitionError => ex
          env.logger.debug("[Definition] failed to load definition from directory '#{name}' #{ex}")
        end
      end

      if definitions.length == 0
        env.logger.debug("[Definition] no definitions found")
      end

      definitions.each(&block)
    end
1182693
protected function fetchTaxonomies()
    {
        $response = $this->api->appData();

        $taxonomies = array_get($response, 'data.taxonomies', []);

        $this->taxonomies = new Collection($taxonomies);
    }
1318090
def get_all(self):
        
        if not self.vars:
            return self.parent
        if not self.parent:
            return self.vars
        return dict(self.parent, **self.vars)
607357
def _extract_definitions(alist, level=None):
    

    def _extract_array_defs(source):
        # extract any definitions that are within arrays
        # this occurs recursively
        ret = []
        items = source.get('items')
        if items is not None and 'schema' in items:
            ret += _extract_definitions([items], level+1)
        return ret

    # for tracking level of recursion
    if level is None:
        level = 0

    defs = list()
    if alist is not None:
        for item in alist:
            schema = item.get("schema")
            if schema is not None:
                schema_id = schema.get("id")
                if schema_id is not None:
                    defs.append(schema)
                    ref = {"$ref": "#/definitions/{}".format(schema_id)}

                    # only add the reference as a schema if we are in a response or
                    # a parameter i.e. at the top level
                    # directly ref if a definition is used within another definition
                    if level == 0:
                        item['schema'] = ref
                    else:
                        item.update(ref)
                        del item['schema']

                # extract any definitions that are within properties
                # this occurs recursively
                properties = schema.get('properties')
                if properties is not None:
                    defs += _extract_definitions(properties.values(), level+1)

                defs += _extract_array_defs(schema)

            defs += _extract_array_defs(item)

    return defs
761012
def final_definitions
      parent_definitions = Hash(parent&.definitions&.dup)
      definitions.each_with_object(parent_definitions) do |(key, val), obj|
        obj[key] = check_type(obj[key], val)
      end
    end
58917
def get_definition(self):
        ''''''
        definition = parsers.get_definition(self.__chebi_id)

        if definition is None:
            definition = parsers.get_definition(self.get_parent_id())

        if definition is None:
            for parent_or_child_id in self.__get_all_ids():
                definition = parsers.get_definition(parent_or_child_id)

                if definition is not None:
                    break

        return definition
820634
private void readDefinitions()
   {
      for (MapRow row : m_tables.get("TTL"))
      {
         Integer id = row.getInteger("DEFINITION_ID");
         List<MapRow> list = m_definitions.get(id);
         if (list == null)
         {
            list = new ArrayList<MapRow>();
            m_definitions.put(id, list);
         }
         list.add(row);
      }

      List<MapRow> rows = m_definitions.get(WBS_FORMAT_ID);
      if (rows != null)
      {
         m_wbsFormat = new SureTrakWbsFormat(rows.get(0));
      }
   }
49704
def getCatalogDefinitions():
    
    final = {}
    analysis_request = bika_catalog_analysisrequest_listing_definition
    analysis = bika_catalog_analysis_listing_definition
    autoimportlogs = bika_catalog_autoimportlogs_listing_definition
    worksheet = bika_catalog_worksheet_listing_definition
    report = bika_catalog_report_definition
    # Merging the catalogs
    final.update(analysis_request)
    final.update(analysis)
    final.update(autoimportlogs)
    final.update(worksheet)
    final.update(report)
    return final
493486
def fetchall_triples_xrefs(prefix):
    
    logging.info("fetching xrefs for: "+prefix)
    query = """
    SELECT * WHERE {{
    ?c <{p}> ?x
    }}
    """.format(p=prefixmap[prefix])
    bindings = run_sparql(query)
    rows = [(r['c']['value'], r['x']['value']) for r in bindings]
    return rows
645136
def all(self):
        
        return {
            self._decode(k): self._loads(v)
            for k, v in self._client.hgetall(self.key_prefix).items()
        }
1037111
function() {
      var options = [];
      Object.keys(_definition).forEach((key, i, list) => {
        if(options.indexOf(_definition[key]) == -1) {
          options.push(_definition[key]);
        }
      });
      return options;
    }
596747
private static function parseDefinitions(array $definitions): array
    {
        if (\count($definitions) === 0) {
            return $definitions;
        }

        return \array_map(
            function ($definition) {
                if (\is_array($definition)) {
                    return $definition;
                }

                return self::loadDefinitionsFromPath($definition);
            },
            $definitions
        );
    }
941873
def get_definition(self, name):
        """"""
        for definition in self.definitions:
            if definition.name == name:
                return definition
65674
def get_column_definition_all(self, table):
        """"""
        # Get complete table definition
        col_defs = self.get_table_definition(table).split('\n')

        # Return only column definitions
        return [i[0:-1].strip().replace(',', ', ') for i in col_defs if i.strip().startswith('`')]
1374458
def logical_definitions(self, nid):
        
        ldefs = self.all_logical_definitions
        if ldefs is not None:
            #print("TESTING: {} AGAINST LD: {}".format(nid, str(ldefs)))
            return [x for x in ldefs if x.class_id == nid]
        else:
            return []
318862
def _get_all(self):
        
        return [self._to_dict(row) for row in models.User.objects.all()]
726446
public function getDefinitions($key = null)
    {
        if (!is_null($key)) {
            return isset($this->definitions[$key]) ? $this->definitions[$key] : null;
        }

        return !empty($this->definitions) ? $this->definitions : [];
    }