Return default metadata.
436080
def defaults(self):
        """"""
        return dict(
            access_right='open',
            description=self.description,
            license='other-open',
            publication_date=self.release['published_at'][:10],
            related_identifiers=list(self.related_identifiers),
            version=self.version,
            title=self.title,
            upload_type='software',
        )
734911
def table_metadata(self, database, table):
        ""
        return (self.metadata("databases") or {}).get(database, {}).get(
            "tables", {}
        ).get(
            table, {}
        )
344284
def get_meta_type_by_name(name):
    data = get_default_metadata_data()
    child_data = get_child_metadata_data()
    for item in data["metadataObjects"]:
        if 'xmlName' in item and item['xmlName'] == name:
            return item
    for item in child_data:
        if 'xmlName' in item and item['xmlName'] == name:
            return item
    '''
        
    '''
    try:
        if config.describe_data != None:
            project_org_describe = config.describe_data
        if config.project != None and os.path.isfile(os.path.join(config.project.location,'config','.describe')):
            project_org_describe = parse_json_from_file(os.path.join(config.project.location,'config','.describe'))
        if project_org_describe != None and 'metadataObjects' in project_org_describe:
            for item in project_org_describe["metadataObjects"]:
                if 'xmlName' in item and item['xmlName'] == name:
                    return item
    except:
        pass
872289
def get_default_values(data):
    """"""
    request = data.get('request')
    result = {}
    result['__datetime__'] = datetime.now()
    result['__ip_address__'] = request and get_ip(request) or '0.0.0.0'
    return result
771357
def discover(self):
        """"""
        self._load_metadata()

        return dict(datashape=self.datashape,
                    dtype=self.dtype,
                    shape=self.shape,
                    npartitions=self.npartitions,
                    metadata=self.metadata)
851615
def default_entities(self):
        """"""
        return [str(i) for i in range(self.rows + self.columns)]
708801
def default_attributes(self):
        """"""
        if self._default_attributes is None:
            self._default_attributes = {
                name: attr
                for name, attr in self.attributes.items()
                if attr.default is True
            }
        return self._default_attributes
1069879
def default(self):
        """"""

        if self._default is None or self._default not in self:
            self._default = list(self.keys())[0] if self else None

        return self._default
111099
def _prepare_defaults(self):
		""""""
		
		for name, field in self.__fields__.items():
			if field.assign:
				getattr(self, name)
515049
def _init_metadata(self, **kwargs):
        """"""
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._url_default = self._mdata['url']['default_string_values'][0]
        self._data_default = self._mdata['data']['default_object_values'][0]
        self._accessibility_type_default = self._mdata['accessibility_type']['default_type_values'][0]
482242
def metadata(self):
    
    if self._info is None:
      try:
        self._info = self._api.buckets_get(self._name)
      except Exception as e:
        raise e

    return BucketMetadata(self._info) if self._info else None
148807
def _init_metadata(self, **kwargs):
        """"""
        self._mdata.update(default_mdata.get_osid_object_mdata())
        OsidForm._init_metadata(self)
        if 'default_display_name' in kwargs:
            self._mdata['display_name']['default_string_values'][0]['text'] = kwargs['default_display_name']
        update_display_text_defaults(self._mdata['display_name'], self._locale_map)
        if 'default_description' in kwargs:
            self._mdata['description']['default_string_values'][0]['text'] = kwargs['default_description']
        update_display_text_defaults(self._mdata['description'], self._locale_map)
        self._display_name_default = dict(self._mdata['display_name']['default_string_values'][0])
        self._description_default = dict(self._mdata['description']['default_string_values'][0])
        self._genus_type_default = self._mdata['genus_type']['default_type_values'][0]

        if 'mdata' in kwargs:
            self._mdata.update(kwargs['mdata'])
379352
def get_version():
    """"""
    config = RawConfigParser()
    config.read(os.path.join('..', 'setup.cfg'))
    return config.get('metadata', 'version')
1061729
def default(self):
        """"""

        import ambry.bundle.default_files as df
        import os

        path = os.path.join(os.path.dirname(df.__file__), self.file_name)

        if six.PY2:
            with open(path, 'rb') as f:
                return f.read()
        else:
            # py3
            with open(path, 'rt', encoding='utf-8') as f:
                return f.read()
347897
def meta(self):
        """"""
        if not self._pv.meta_data_property or not self._meta_target:
            return {}

        return getattr(self._meta_target, self._pv.meta_data_property)
798733
def default(self):
        """"""
        if self.MUTABLE:
            return copy.deepcopy(self._default)
        else:
            return self._default
866859
def meta(cls):
        """"""
        if getattr(cls, '__from_class__', None) is not None:
            cls = cls.__from_class__
        attribute_info = {}
        for name, value in cls.__table__.columns.items():
            attribute_info[name] = str(value.type).lower()

        return {cls.__name__: attribute_info}