Ejemplo n.º 1
0
    def testArticleMapping(self):
        self.assertEqual(0, len(self.graph))
        a = Article()
        self.assertTrue(isinstance(list(self.graph.subjects())[0], BNode))
        self.assertEqual(1, len(self.graph)) # bnode--rdf:type-->bibo:article

        a.title = "Testtitle" # + bnode--dc:title--> "Testtitle"
        self.assertEqual(2, len(self.graph)) 
        self.assertEqual(1, len(list(self.graph.triples((None,DC['title'], None)))))
        self.assertEqual(a.title, "Testtitle")

        a.creators = ["Testcreator1", "Testcreator2"]
        #a.creators = "Testcreator" XXX hoe doe je assertRaises met assignment?

        a.abstract = "Testabstract"
        a.sPg = 1
        a.ePg = 3
        #TODO check string & int types in rdf
        a.auStr = "Author 1, author 2"
        a.section = "Testsection"
        a.ivrs = ["Testintervieuwer"]
        a.ives = [u"Testgeïntervieuwde"]
        self.assertEqual(11, len(self.graph))
Ejemplo n.º 2
0
a1 = Article("<tag:obama-at-manassas,2009-04-23>")
a1.title = "Obama at Manassas"
a1.creators = ["Mike Davis"]
a1.abstract = "Does Obama’s victory signal a political turning point comparable to 1980 or 1932? Mike Davis maps county-level changes, from below—minority-majority demographics, subprime suburbs, white-collar financial worries—catalysed by the 2008 campaign. From above, realignment of American capital behind the Silicon President."
a1.issue = nlr56

a2 = Article("<tag:freedoms-triumph,2009-04-23>")
a2.creators = ["Dylan Riley"]
a2.title = "Freedom's Triumph?"
a2.abstract = "Reviving its classical definition, ‘rule of the propertyless’, Luciano Canfora recasts the story of democracy in Europe as one of successive defeats, with lessons from Louis Napoleon on the use of suffrage as legitimation for oligarchic rule. Dylan Riley assesses a remarkable historical polemic from the Italian philologist."
a2.issue = nlr56

a3 = Article("<tag:giovanni-arrighi,2009-04-22>")
a3.title = "Giovanni Arrighi: The Winding Paths of Capital"
a3.ivrs = ["David Harvey"]
a3.ives = ["Giovani Arrighi"]
a3.abstract = "The author of Long Twentieth Century and Adam Smith in Beijing, interviewed by David Harvey, on dispossession and development, capitalist crises, China’s future. The political education of a teenage factory-manager, via African liberation struggles and autonomia operaia; and influences—Braudel, Gramsci, Smith, Marx—in Arrighi’s work."
a3.issue = nlr56

a4 = Article("<tag:feminism-capitalism,2009-04-22>")
a4.creators = ["Nancy Fraser"]
a4.title = "Feminism, Capitalism and the Cunning of History"
a4.abstract = "Do feminism and neoliberalism share a secret affinity? Nancy Fraser on the co-option of gender politics by the ‘new spirit’ of post-Fordist capitalism, and subordination of its radical critique to a World Bank agenda. Might a neo-Keynesian shift offer prospects for socialist-feminist renewal?"
a4.issue = nlr56

a5 = Article("<tag:colletti-on,2009-04-23>")
a5.creators = ["Geoff Mann"]
a5.title = "Colletti on the Credit Crunch"
a5.abstract = "What political opportunities arise from the current financial crisis? In a critical response to Robin Blackburn’s essay in NLR 50, Geoff Mann proposes the insights of Marx’s theory of value as a starting point for thinking beyond capitalist social relations—as Blackburn’s measures, he argues, do not."
a5.issue = nlr56