Exemple #1
0
    def setUp(self):
        self.citation_data_csv_path = "index%stest_data%scitations_data.csv" % (
            sep, sep)
        self.citation_prov_csv_path = "index%stest_data%scitations_prov.csv" % (
            sep, sep)
        self.citation_data_ttl_path = "index%stest_data%scitations_data.ttl" % (
            sep, sep)
        self.citation_prov_ttl_path = "index%stest_data%scitations_prov.ttl" % (
            sep, sep)
        self.citation_data_prov_scholix_path = "index%stest_data%scitations_data_prov.scholix" % (
            sep, sep)
        self.tmp_path = "index%stest_data%stmp" % (sep, sep)
        self.baseurl = "https://w3id.org/oc/index/coci/"
        self.ext_local_dir = {"ttl": "rdf", "scholix": "slx", "csv": "csv"}

        # Hack for correct handling of date datatypes
        if XSD.gYear in _toPythonMapping:
            _toPythonMapping.pop(XSD.gYear)
        if XSD.gYearMonth in _toPythonMapping:
            _toPythonMapping.pop(XSD.gYearMonth)
Exemple #2
0
 def _hack_dates() -> None:
     if XSD.gYear in _toPythonMapping:
         _toPythonMapping.pop(XSD.gYear)
     if XSD.gYearMonth in _toPythonMapping:
         _toPythonMapping.pop(XSD.gYearMonth)
Exemple #3
0
    def setUp(self):
        self.citation_data_csv_path = "index%stest_data%scitations_data.csv" % (
            sep, sep)
        self.citation_prov_csv_path = "index%stest_data%scitations_prov.csv" % (
            sep, sep)
        self.citation_data_ttl_path = "index%stest_data%scitations_data.ttl" % (
            sep, sep)
        self.citation_prov_ttl_path = "index%stest_data%scitations_prov.ttl" % (
            sep, sep)
        self.citation_data_prov_scholix_path = "index%stest_data%scitations_data_prov.scholix" % (
            sep, sep)
        self.base_url = "https://w3id.org/oc/index/coci/"

        self.citation_1 = Citation(
            "02001000308362819371213133704040001020809-020010009063615193700006300030306151914",
            "http://dx.doi.org/10.1038/sj.cdd.4401289",
            "2003-10-24",
            "http://dx.doi.org/10.1096/fj.00-0336fje",
            "2001-01",
            None,
            None,
            1,
            "https://w3id.org/oc/index/prov/ra/1",
            "https://api.crossref.org/works/10.1038/sj.cdd.4401289",
            "2018-11-01T09:14:03",
            "OpenCitations Index: COCI",
            "doi",
            "http://dx.doi.org/([[XXX__decode]])",
            None,
            journal_sc=False,
            author_sc=False,
            prov_description="Creation of the citation")

        self.citation_2 = Citation(
            "02001000002361927283705040000-02001000002361927283705030002",
            "http://dx.doi.org/10.1002/jrs.5400",
            "2018-06",
            "http://dx.doi.org/10.1002/jrs.5302",
            "2017-12-05",
            None,
            None,
            1,
            "https://w3id.org/oc/index/prov/ra/1",
            "https://api.crossref.org/works/10.1002/jrs.5400",
            "2018-11-01T14:51:52",
            "OpenCitations Index: COCI",
            "doi",
            "http://dx.doi.org/([[XXX__decode]])",
            None,
            journal_sc=True,
            author_sc=True,
            prov_description="Creation of the citation")

        self.citation_3 = Citation(
            "02001000002361927283705040000-020010003093612062710020603000720",
            "http://dx.doi.org/10.1002/jrs.5400",
            "2018-06",
            "http://dx.doi.org/10.1039/c6ra26307k",
            "2017",
            None,
            None,
            1,
            "https://w3id.org/oc/index/prov/ra/1",
            "https://api.crossref.org/works/10.1002/jrs.5400",
            "2018-11-01T14:51:52",
            "OpenCitations Index: COCI",
            "doi",
            "http://dx.doi.org/([[XXX__decode]])",
            None,
            journal_sc=False,
            author_sc=True,
            prov_description="Creation of the citation")

        self.citation_4 = Citation(
            "02001000308362819371213133704040001020804-02001000308362819371213133704040000030707",
            "http://dx.doi.org/10.1038/sj.cdd.4401284",
            "2003-08-22",
            "http://dx.doi.org/10.1038/sj.cdd.4400377",
            "1998-05",
            None,
            None,
            1,
            "https://w3id.org/oc/index/prov/ra/1",
            "https://api.crossref.org/works/10.1038/sj.cdd.4401284",
            "2018-11-01T09:14:03",
            "OpenCitations Index: COCI",
            "doi",
            "http://dx.doi.org/([[XXX__decode]])",
            None,
            journal_sc=True,
            author_sc=False,
            prov_description="Creation of the citation")

        self.citation_5 = Citation(
            "020010000023625242110370100030001-02001010009361222251430273701090809370903040403",
            "http://dx.doi.org/10.1002/pola.10301",
            "2002-06-21",
            "http://dx.doi.org/10.1109/cmpeur.1989.93443",
            None,
            None,
            None,
            1,
            "https://w3id.org/oc/index/prov/ra/1",
            "https://api.crossref.org/works/10.1002/pola.10301",
            "2018-10-31T16:13:26",
            "OpenCitations Index: COCI",
            "doi",
            "http://dx.doi.org/([[XXX__decode]])",
            None,
            journal_sc=False,
            author_sc=False,
            prov_description="Creation of the citation")

        self.citation_6 = Citation(
            "020010103003602000105370205010358000059-02001010304362801000208030304330009000400020107",
            "http://dx.doi.org/10.1130/2015.2513%2800%29",
            None,
            "http://dx.doi.org/10.1134/s1028334x09040217",
            None,
            None,
            None,
            1,
            "https://w3id.org/oc/index/prov/ra/1",
            "https://api.crossref.org/works/10.1130/2015.2513%2800%29",
            "2018-10-31T16:17:07",
            "OpenCitations Index: COCI",
            "doi",
            "http://dx.doi.org/([[XXX__decode]])",
            None,
            journal_sc=False,
            author_sc=False,
            prov_description="Creation of the citation")

        # Hack for correct handling of date datatypes
        if XSD.gYear in _toPythonMapping:
            _toPythonMapping.pop(XSD.gYear)
        if XSD.gYearMonth in _toPythonMapping:
            _toPythonMapping.pop(XSD.gYearMonth)