Beispiel #1
0
 def addTuple(self, sentenceTuple):
     """ generated source for method addTuple """
     if len(sentenceTuple) != self.form.getTupleSize():
         raise IllegalArgumentException()
     # For each slot...
     i = 0
     while i < len(sentenceTuple):
         if self.dependentSlots.get(i):
             # Either add to that entry, or invalidate the slot
             lookupTuple.remove(i)
             if curValue == None:
                 # Just add to the map
                 valueMap.put(ImmutableList.copyOf(lookupTuple), newValue)
             else:
                 # If this isn't the existing sentence, invalidate this slot
                 if curValue != newValue:
                     self.dependentSlots.set(i, False)
                     self.valueMaps.set(i, ImmutableMap.of())
         i += 1
Beispiel #2
0
 def addTrueSentencesToModel(self):
     """ generated source for method addTrueSentencesToModel """
     for gdl in description:
         ConcurrencyUtils.checkForInterruption()
         if isinstance(gdl, (GdlSentence, )):
             addSentenceToModel(gdl, ImmutableMap.of())
Beispiel #3
0
put_institution(
    data_rights=\
        RightsSet.Builder()
            .setElements(ImmutableList.of(
                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(