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
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
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
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
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
def get_roles(self, role): user = self.find() test, test2 = queryService.query(role) return test, test2