Changeset 8199
- Timestamp:
- 31/03/12 15:03:44 (9 years ago)
- Location:
- mauRepo/MolesManager/trunk/src/libs/migration/processor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/libs/migration/processor/commons.py
r8198 r8199 669 669 return md_constraints 670 670 671 def createMD_LegalConstraints(useLimitation = None ):671 def createMD_LegalConstraints(useLimitation = None, accessConstrains = None): 672 672 """ 673 673 Creates a new MD_LegalConstrains 674 674 @param useLimitation: a string array 675 @param accessConstrains: an MD_RestrictionCode array 675 676 """ 676 677 md_legalconstraints = MD_LegalConstraints() 677 678 if useLimitation and type(useLimitation) == list: 678 679 md_legalconstraints.useLimitation = useLimitation 680 if accessConstrains and type(accessConstrains) == list: 681 md_legalconstraints.accessConstrains = accessConstrains 679 682 return md_legalconstraints 680 683 -
mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment.py
r8198 r8199 18 18 createCI_Telephone, extractMolesTemporalRange, isoDateStringToTimeDate,\ 19 19 createTM_Period, createCI_Individual, findAccessLinksInMigrationDocument,\ 20 findLinksInDeployment 20 findLinksInDeployment, createMD_LegalConstraints 21 21 from ea_model.moles3_4.utilities.mo_rolevalue import MO_RoleValue 22 22 from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation … … 34 34 from libs.migration.processor.check.check import moles3Append 35 35 from ea_model.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information.ci_datetypecode import CI_DateTypeCode 36 from ea_model.iso_19115_2006_metadata_corrigendum.constraint_information.md_restrictioncode import MD_RestrictionCode 36 37 37 38 class DeploymentProcessor(object): … … 314 315 if len(access_link) == 0: 315 316 access_link = findAccessLinksInMigrationDocument(self._dataEntityMigration) 316 317 318 i_accessConstraints = [] 319 i_use_limitation = [] 320 321 if len(access_link) == 0: 322 dwn_link = findDownloadLinksInMigrationDocument(self._deploymentMigration) 323 if len(dwn_link) == 0: 324 dwn_link = findDownloadLinksInMigrationDocument(self._dataEntityMigration) 325 if dwn_link and len(dwn_link) == 1: 326 i_use_limitation.append("These data are open access and available through %s." % (dwn_link['href']) ) 327 #i_accessConstraints.append(MD_RestrictionCode.cl_) 328 else: 329 if access_link and len(access_link) == 1: 330 i_use_limitation.append("Access to these data is restricted. To obtain access please apply for access at: %s" % (access_link['href'])) 331 i_accessConstraints.append(MD_RestrictionCode.cl_restricted) 332 333 createMD_LegalConstraints(useLimitation = i_use_limitation, accessConstrains = i_accessConstraints) 334 335 ''' 317 336 contentDict = extractContent(self._deploymentMigration) 318 337 if not contentDict.has_key('access-restricted'): 319 338 contentDict = extractContent(self._dataEntityMigration) 320 ## TO BE DONE339 ''' 321 340 322 341 def _assignMoles2Link(self, ceda_observation):
Note: See TracChangeset
for help on using the changeset viewer.