def map_omeka_collection(self, collection_store_uri, institution_id, omeka_collection): collection_id = CollectionId.parse(str(institution_id) + '/' + str(omeka_collection.id)) collection_builder = Collection.Builder() collection_builder.setInstitutionId(institution_id) for element_text in omeka_collection.element_texts: if len(element_text.text) == 0: continue if element_text.element_set.name == 'Dublin Core': if element_text.element.name == 'Contributor': pass elif element_text.element.name == 'Description': collection_builder.setDescription(element_text.text) elif element_text.element.name == 'Title': collection_builder.setTitle(element_text.text) collection_builder.setObjectStoreUri(collection_store_uri) collection = collection_builder.build() return CollectionEntry(collection_id, collection)
Rights.Builder() .setRightsHolder('University of North Texas') .setText("The contents of Texas Fashion Collection, hosted by the University of North Texas Libraries (digital content including images, text, and sound and video recordings) are made publicly available by the collection-holding partners for use in research, teaching, and private study. For the full terms of use, see http://digital.library.unt.edu/terms-of-use/") .setType(RightsType.COPYRIGHTED) .build() )) .build(), institution_id=InstitutionId.parse('untvca'), institution_title='Texas Fashion Collection', institution_url=Url.parse('http://digital.library.unt.edu/explore/collections/TXFC/'), store_parameters=ImmutableMap.of( 'record_mapper', TxfcOaiPmhRecordMapper.__module__ + '.' + TxfcOaiPmhRecordMapper.__name__ # @UndefinedVariable ), ) put_collection( collection_id=CollectionId.parse('untvca/txfc'), institution_id=InstitutionId.parse('untvca'), object_store_uri=Uri.parse(OaiPmhFsObjectStore.URI_SCHEME + ':/' + os.path.join(data_dir_path, 'untvca', 'txfc').replace(os.path.sep, '/')), title='Texas Fashion Collection' ) put_institution( collection_store_uri=Uri.parse(OmekaFsCollectionStore.URI_SCHEME + ':/' + data_dir_path.replace(os.path.sep, '/')), institution_id=InstitutionId.parse('vccc'), institution_title='Vassar College Costume Collection', institution_url=Url.parse('http://vcomeka.com/vccc/'), store_parameters=ImmutableMap.of( 'endpoint_url', 'http://vcomeka.com/vccc', 'resource_mapper', VcccOmekaResourceMapper.__module__ + '.' + VcccOmekaResourceMapper.__name__ # @UndefinedVariable ), )