示例#1
0
	def setUp(self):

		# create & init objects
		self.homePage_one = homeLink(HOMEPAGE_ONE)
		self.homePage_two = homeLink(HOMEPAGE_TWO)
		self.subPage = pageLink(SUBPAGE, SUBTAGS)
		self.stData = storeData()
示例#2
0
    def addPage(self, pageURL, pageTags):

        # increment Homepage Count
        self.incCount()

        # create pageLink object
        page = pageLink(pageURL, pageTags)

        # inc. pageLink if already in dict.
        if pageURL in self.pageLinks:
            self.pageLinks[pageURL].incCount()

        # else add pageLink to dict.
        else:
            self.pageLinks[pageURL] = page

        # add Tags to homeLink
        self.addTags(pageTags)
示例#3
0
	def addPage(self, pageURL, pageTags):

		# increment Homepage Count
		self.incCount()

		# create pageLink object
		page = pageLink(pageURL, pageTags)

		# inc. pageLink if already in dict.
		if pageURL in self.pageLinks:
			self.pageLinks[pageURL].incCount()

		# else add pageLink to dict.
		else:
			self.pageLinks[pageURL] = page
		
		# add Tags to homeLink
		self.addTags(pageTags)
示例#4
0
import sys

from pageLink import pageLink
from homeLink import homeLink
from storeData import storeData
from storeData import storeData

stData = storeData()
homeL = homeLink("http://www.google.com")
pageL = pageLink("http://www.google.com/avengers", ['python', 'C++'])


def main():

    stData.addPage("http://www.google.com/avengers", ['jello', 'python'])
    print stData.getSearchData()
    homeL = stData.getLink("http://www.google.com/")
    print homeL.getPageLinks()
    pass


if __name__ == '__main__':
    main()
示例#5
0
import sys


from pageLink import pageLink
from homeLink import homeLink
from storeData import storeData
from storeData import storeData

stData = storeData()
homeL = homeLink("http://www.google.com")
pageL = pageLink("http://www.google.com/avengers", ['python', 'C++'])
		
def main():

	stData.addPage("http://www.google.com/avengers", ['jello', 'python'])
	print stData.getSearchData()
	homeL = stData.getLink("http://www.google.com/")
	print homeL.getPageLinks()
	pass

if __name__ == '__main__':
	main()