def __init__(self, endpoint_url, properties, uri, resource_mapper=None, **kwds):
     self.__endpoint_url = endpoint_url
     if resource_mapper is None:
         resource_mapper = OmekaResourceMapper()
     elif isinstance(resource_mapper, basestring):
         resource_mapper_class_qname_split = resource_mapper.split('.')
         resource_mapper_class = __import__('.'.join(resource_mapper_class_qname_split[:-1]))
         for component in resource_mapper_class_qname_split[1:]:
             resource_mapper_class = getattr(resource_mapper_class, component)
         resource_mapper = resource_mapper_class()
     self.__resource_mapper = resource_mapper
     self.__uri = uri
 def __init__(self, endpoint_url, uri, resource_mapper=None, square_thumbnail_height_px=150, square_thumbnail_width_px=150, **kwds):
     self.__endpoint_url = endpoint_url
     if resource_mapper is None:
         resource_mapper = OmekaResourceMapper()
     elif isinstance(resource_mapper, basestring):
         resource_mapper_class_qname_split = resource_mapper.split('.')
         resource_mapper_class = __import__('.'.join(resource_mapper_class_qname_split[:-1]))
         for component in resource_mapper_class_qname_split[1:]:
             resource_mapper_class = getattr(resource_mapper_class, component)
         resource_mapper = resource_mapper_class()
     self.__resource_mapper = resource_mapper
     self.__square_thumbnail_height_px = int(square_thumbnail_height_px)
     self.__square_thumbnail_width_px = int(square_thumbnail_width_px)
     self.__uri = uri
    def map_omeka_collection(self, collection_store_uri, institution_id, omeka_collection):
#         for element_text in omeka_collection.element_texts:
#             if len(element_text.text) == 0:
#                 continue
#             if element_text.element_set.name == 'Dublin Core' and element_text.element.name == 'Title':
#                 self.__omeka_collections[element_text.text.strip()] = omeka_collection.id
#         import pprint; pprint.pprint(self.__omeka_collections)
        if not omeka_collection.id in self.OMEKA_COLLECTIONS.values():
            return
        collection_entry = OmekaResourceMapper.map_omeka_collection(self, collection_store_uri, institution_id, omeka_collection)
        return CollectionEntry(collection_entry.id, Collection.Builder(collection_entry.model).setHidden(True).build())
 def __init__(self, **kwds):
     OmekaResourceMapper.__init__(self, **kwds)
     self.__structure_counts_by_omeka_item_id = Counter()