public function loadFromFile()
    {
        $this->getLogger()->debug('Reading metadata from ' . $this->defFile);
        $fields = Yaml::parse($this->defFile);
        if (!is_array($fields)) {
            $fields = array();
            $this->getLogger()->warning('No definition found in metadata file.');
        }
        $res = array();
        foreach ($fields as $field_data) {
            $res[$field_data['id']] = $field_data;
        }
        ksort($res);
        return $res;
    }