def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     license.add_value("url", response.meta["item"]["license"]["url"])
     license.add_value("internal",
                       self.getProperty("ccm:commonlicense_key", response))
     license.add_value("author",
                       self.getProperty("ccm:author_freetext", response))
     return license
Exemplo n.º 2
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     # add as url + internal to support both data formats
     license.add_value("url",
                       response.meta["row"][CSVBase.COLUMN_LICENSE]["text"])
     license.add_value("internal",
                       response.meta["row"][CSVBase.COLUMN_LICENSE]["text"])
     return license
Exemplo n.º 3
0
 def getLicense(self, response: Response) -> items.LicenseItemLoader:
     license = LomBase.getLicense(self, response)
     license.add_value("internal",
                       response.meta["item"]["status"]["license"])
     # possible values: "youtube", "creativeCommon"
     if response.meta["item"]["status"]["license"] == "creativeCommon":
         license.add_value("url", Constants.LICENSE_CC_BY_30)
     return license
Exemplo n.º 4
0
 def getLicense(self, response: Response) -> items.LicenseItemLoader:
     license = LomBase.getLicense(self, response)
     license.add_value("internal",
                       response.meta["item"]["status"]["license"])
     # possible values: "youtube", "creativeCommon"
     if response.meta["item"]["status"]["license"] == "creativeCommon":
         license.add_value(
             "url", "https://creativecommons.org/licenses/by/3.0/legalcode")
     return license
Exemplo n.º 5
0
 def getLicense(self, response=None):
     license = LomBase.getLicense(self, response)
     record = response.xpath('//OAI-PMH/GetRecord/record')
     rightsDescriptions = record.xpath(
         'metadata/lom/rights/description/string//text()').getall()
     if rightsDescriptions:
         separator = "; "
         license.add_value('internal', separator.join(rightsDescriptions))
     return license
Exemplo n.º 6
0
 def getLicense(self, response=None):
     license = LomBase.getLicense(self, response)
     record = response.xpath("//OAI-PMH/GetRecord/record")
     for desc in record.xpath("metadata/lom/rights/description/string"):
         id = desc.xpath("text()").get()
         if id.startswith("http"):
             license.add_value("url", id)
         else:
             license.add_value("internal", id)
     return license
Exemplo n.º 7
0
    def getLicense(self, response):
        license = LomBase.getLicense(self, response)

        # Element response as a Python dict.
        element_dict = response.meta["item"]

        license.replace_value(
            "internal",
            Constants.LICENSE_NONPUBLIC if element_dict["oeffentlich"] == "1"
            else Constants.LICENSE_COPYRIGHT_LAW,
        )
        return license
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     try:
         licenseId = self.get("acf.licence", json=response.meta["item"])[0]["value"]
         if licenseId == "10":
             license.add_value("oer", OerType.ALL)
         elif licenseId == "11":
             license.add_value("oer", OerType.MIXED)
         elif licenseId == "12":
             license.add_value("oer", OerType.NONE)
     except:
         pass
     return license
    def getLicense(self, response):
        license = LomBase.getLicense(self, response)

        # Element response as a Python dict.
        element_dict = response.meta["item"]

        if "oeffentlich" in element_dict and element_dict[
                "oeffentlich"] == "0":  # private
            license.replace_value("internal", Constants.LICENSE_NONPUBLIC)
        else:
            license.replace_value("internal",
                                  Constants.LICENSE_COPYRIGHT_LAW)  # public

        return license
Exemplo n.º 10
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     try:
         licenseId = self.get('acf.licence',
                              json=response.meta['item'])[0]['value']
         if licenseId == '10':
             license.add_value('oer', OerType.NONE)
         elif licenseId == '11':
             license.add_value('oer', OerType.MIXED)
         elif licenseId == '12':
             license.add_value('oer', OerType.ALL)
     except:
         pass
     return license
Exemplo n.º 11
0
    def getLicense(self, response):
        license = LomBase.getLicense(self, response)

        # Element response as a Python dict.
        element_dict = response.meta["item"]

        # If there is only one element and is the County code 3100, then it is public content.
        if len(element_dict["county_ids"]) == 1 and str(
                element_dict["county_ids"][0]) == "county-3100":
            license.replace_value('internal',
                                  Constants.LICENSE_COPYRIGHT_LAW)  # public
        else:
            license.replace_value('internal',
                                  Constants.LICENSE_NONPUBLIC)  # private

        return license
Exemplo n.º 12
0
 def getLicense(self, response):
   license = LomBase.getLicense(self, response)
   if response.meta['item'].xpath('rechte//text()').get() == 'Keine Angabe, es gilt die gesetzliche Regelung':
     license.add_value('internal', Constants.LICENSE_COPYRIGHT_LAW)
   return license
Exemplo n.º 13
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     license.add_value("url", self.getLRMI("license", response=response))
     return license
Exemplo n.º 14
0
 def getLicense(self, response: Response) -> items.LicenseItemLoader:
     license = LomBase.getLicense(self, response)
     license.add_value("url", self.static_values["licence_url"])
     return license
Exemplo n.º 15
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     license.add_value("internal",
                       self.getCSVValue(response, CSVBase.COLUMN_LICENSE))
     return license
Exemplo n.º 16
0
    def getLicense(self, response):
        license = LomBase.getLicense(self, response)

        return license
Exemplo n.º 17
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     if (response.meta["item"].xpath("rechte//text()").get() ==
             "Keine Angabe, es gilt die gesetzliche Regelung"):
         license.add_value("internal", Constants.LICENSE_COPYRIGHT_LAW)
     return license
Exemplo n.º 18
0
 def getLicense(self, response):
   license = LomBase.getLicense(self, response)
   license.add_value('url', Constants.LICENSE_CC_BY_SA_40)
   return license
Exemplo n.º 19
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     license.add_value("internal", Constants.LICENSE_COPYRIGHT_LAW)
     return license
Exemplo n.º 20
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     license.add_value('url', self.getLRMI('license', response=response))
     return license
Exemplo n.º 21
0
 def getLicense(self, response):
     license = LomBase.getLicense(self, response)
     license.add_value(
         'internal', self.getCSVValue(response, RSSListBase.COLUMN_LICENSE))
     return license