コード例 #1
0
ファイル: modelsOld.py プロジェクト: damodamr/ac-webServies
    def get_statesO(self, stateO):
        user = self.find()

        search = Node(
            "Search",
            id=str(uuid.uuid4()),
            description=stateO,
            timestamp=timestamp(),
            date=date(),
        )
        search = graph.merge_one("SearchJamendo", "description", stateO)
        rel = Relationship(user, "searchedFor", search)
        graph.create(rel)

        test, test2 = queryService.query(stateO)
        return test2
コード例 #2
0
    def searchJamendo(self, stateO):
        user = self.find()

        search = Node(
            "SearchJamendo",
            id=str(uuid.uuid4()),
            description=stateO,
            timestamp=timestamp(),
            date=date(),
        )
        #search=graph.merge_one("SearchJamendo","description",stateO)
        rel = Relationship(search, "wasAssociatedWith", user)
        graph.create(rel)

        test, test2 = queryService.query(stateO)
        return test2
コード例 #3
0
    def searchFreesound(self, query):
        user = self.find()

        search = Node(
            "TextSearchFreesound",
            id=str(uuid.uuid4()),
            query=query,
            timestamp=timestamp(),
            date=date(),
        )
        #search=graph.merge_one("TextSearch","query",query)
        rel = Relationship(search, "wasAssociatedWith", user)
        graph.create(rel)

        test, test2 = queryService.query(query)
        return test
コード例 #4
0
ファイル: models.py プロジェクト: damodamr/ac-webServies
    def searchJamendo(self, stateO):
        user = self.find()

        search = Node(
            "Action",
            id=str(uuid.uuid4()),
            timestamp=timestamp(),
            date=date(),
            description="Search Jamendo",
            actionDesc="SearchAction",
            hasInputMessage=stateO,
            hasMethod="GET",
            hasAddress="URITemplate",
            hasOutputMessage="mo:MusicalWork",
            query=stateO,
        )
        #search=graph.merge_one("SearchJamendo","description",stateO)
        rel = Relationship(search, "wasAssociatedWith", user)
        graph.create(rel)

        test, test2 = queryService.query(stateO)
        return test2
コード例 #5
0
ファイル: models.py プロジェクト: damodamr/ac-webServies
    def TextSearch(self, query):
        user = self.find()

        search = Node(
            "Action",
            id=str(uuid.uuid4()),
            timestamp=timestamp(),
            date=date(),
            description="Text Search Freesound",
            provider="Freesound",
            actionDesc="SearchAction",
            hasInputMessage=query,
            hasMethod="GET",
            hasAddress="URITemplate",
            hasOutputMessage="mo:MusicalBuildingBlock",
            query=query,
        )
        #search=graph.merge_one("TextSearch","query",query)
        rel = Relationship(search, "wasAssociatedWith", user)
        graph.create(rel)

        test, test2 = queryService.query(query)
        return test
コード例 #6
0
ファイル: modelsOld.py プロジェクト: damodamr/ac-webServies
 def get_roles(self, role):
     user = self.find()
     test, test2 = queryService.query(role)
     return test, test2