def load_vocabulary(self, id_, entry, delay=True): """Load a single vocabulary.""" pid_type = entry['pid-type'] # Create the vocabulary type current_service.create_type(self._identity, id_, pid_type) # Load the data file self.load_datafile(id_, entry["data-file"], delay=delay)
def load_vocabulary(self, id_, entry): """Load a single vocabulary.""" pid_type = entry['pid-type'] # Create the vocabulary type current_service.create_type(self._identity, id_, pid_type) # Load the data file data_file_path = entry.get('data-file') if data_file_path: # Creates pid_type, no data yet data_file = self._search_path.path(data_file_path) self.load_datafile(id_, data_file)
def create_vocabulary_type(self, id_, entry): """Create the vocabulary type.""" pid_type = entry['pid-type'] current_service.create_type(self._identity, id_, pid_type)
def resource_type_type(app): """Resource type vocabulary type.""" return vocabulary_service.create_type(system_identity, "resource_types", "rsrct")
def languages_type(app): """Language vocabulary type.""" return vocabulary_service.create_type(system_identity, "languages", "lng")
def relation_type(app): """Relation type vocabulary type.""" return vocabulary_service.create_type(system_identity, "relationtypes", "rlt")
def contributors_role_type(app): """Contributor role vocabulary type.""" return vocabulary_service.create_type(system_identity, "contributorsroles", "cor")
def date_type(app): """Date vocabulary type.""" return vocabulary_service.create_type(system_identity, "datetypes", "dat")
def subject_type(app): """Subject vocabulary type.""" return vocabulary_service.create_type(system_identity, "subjects", "sub")
def description_type(app): """title vocabulary type.""" return vocabulary_service.create_type(system_identity, "descriptiontypes", "dty")
def title_type(app): """title vocabulary type.""" return vocabulary_service.create_type(system_identity, "titletypes", "ttyp")
def licenses(app): """Licenses vocabulary type.""" return vocabulary_service.create_type(system_identity, "licenses", "lic")
def pre_load(self, identity, ignore): """Actions taken before iteratively creating records.""" if self._id not in ignore: pid_type = self._entry['pid-type'] current_service.create_type(identity, self._id, pid_type)