From: Eugen F <feu...@ya...> - 2013-12-16 10:40:12
|
I implemented entity feature using "SparqlParameterizedString" but I get into some problems. 1. I need a QueryParameterizedString.SetSomething("command", commandString) that would replace a @command with commandString, but I only found methods that accept second param as INode. So I still used string.Format to replace the command param. 2. I can do this: SparqlQuery intialQuery =... getPredicatesQueryParameterizedString.Namespaces = intialQuery.NamespaceMap; But i can't do getPredicatesQueryParameterizedString.Command = intialQuery.Command; so I extracted the command manualy. 3. Doing getPredicatesQueryParameterizedString.Namespaces = intialQuery.NamespaceMap; results in a string that has all prefixes on same line instead of separated lines like it was on intialQuery. On Saturday, December 14, 2013 5:12 PM, Eugen F <feu...@ya...> wrote: Hi Rob, After my last post I realized that there are some scenarios where I would want to compare current results with previous ones, for example reruning same query after user caused some changes through UI. And of course there are the workflows you suggested. So I agree with you, just that at the time of the post I didn't think of other flows...(too much sql server) What I'm thinking now is having 2 run buttons like I suggested in the previous post, or no buttons but some way that a user could change this behavior on the fly, without having a global setting that applies to all connection tabs. Or instead of multiple buttons there could be a dropdown kind of button and when you click on the arrow you select the open type(ovewrite/window/tab), when you click the dropdown itself execute the query based on the open type. Consider the following flow: I run a query, I get some results and then I want to compare all next results to this one. So first time it should open results in a new window, but the following runs should overwrite each other because I only want to compare the latest state with the reference one. With 2 buttons i could run first query, then second time in a new tab, then the following times in same(active) tab. Also a nice to have feature (for the future) that can only be done when having multiple results is to be able to see the difference between them. For example I have 3 tab results and I want to see what triples were added/removed between 2 of the tabs, so i can check them and compare. For now I don't think it's that important to have it, but just to know of the possibility. Related to that entity feature, I was waiting for us to get to some agreement on what should I do, maybe wait for the implementation of the opening of results, so it integrates better. I'm thinking this feature won't be used so often so it should not be visible all the times, but still it's related to a connection tab and a query; besides this it needs some parameters. So an idea would be to hide it by default, but allow enabling with a menu option. When enabled a new button will appear on query window. When user clicks a button I would run a query and when it finishes I should display the new query for entities that he can modify (maybe with the initial query commented at the top). So he runs: {initial query} and i output: # {initial query} {entities query} Now I could overwrite his initial query but that would be kind of strange since by the time my query finishes he could have made changes to the initial query window. To fix this I could disable the run button until i get results, or just open a new connection window when i have the new query, or some other suggestion. On Friday, December 13, 2013 7:26 PM, Rob Vesse <rv...@do...> wrote: Eugen The flat buttons was just a visual tweak, since they aren't really acting as visual tabs it seemed pointless to make them appear as tabs. On the topic of the query results overwriting while this may be what you want it is not necessarily what others want. Remember that this is intended to be a general purpose tool so where there are multiple possible workflows then we need to support those with the UI. Here's two example workflows that I use myself currently that your change breaks: 1. Run two queries which are syntactically different but which I expect to get the two results and then compare the two sets of results in their respective windows 2. Launch multiple queries which I know to be long running and then come back to view the results in a little while The long running queries use case is particularly problematic IMO because now you don't necessarily have any visual indicator that there are queries in flight. So I might run a fast query so the results view pops up, then I run a long running query. While this is running the results of the first query stay visible and at some point in the future they suddenly change to the results of the next query with little/no visual indication to the user (especially if the two queries share the same variables). Also there is the possibility that if you fire off multiple queries that finish out of order you have no idea which query the currently displayed results relate to. What I am thinking is that the behaviour should be configurable so users can pick what works best for them with three options: 1. Only show one set of results at a time in the same window 2. Show multiple sets of results in the same window using a tabbed interface (obviously this option needs some way to display the query alongside the results so a user can figure out which query produced which results) 3. Always show results in new windows I'm happy to work on implementing the above myself. Then when upgrading to the new version Store Manager can offer the user the option to configure their desired behaviour which would then be saved in the users settings with the option to change later if desired. Thanks for the explanations, I understand the entities query idea much better now. Please let me know when you have improvements to this ready for review. Cheers, Rob From: Eugen F <feu...@ya...> Reply-To: Eugen F <feu...@ya...>, dotNetRDF Developer Discussion and Feature Request <dot...@li...> Date: Wednesday, 11 December 2013 15:54 To: dotNetRDF Developer Discussion and Feature Request <dot...@li...> Subject: Re: [dotNetRDF-Develop] Store manager improvements Hi Rob, > > >I pulled the changes from that tool branch locally (sync the url of that tool branch with my local repository) and now I see your changes. (i hope it's the correct process). > > >I'm now sure what is the advantage of flat buttons over tabs, but since the functionality is the same seems ok to me. > > >About the issue: "Currently the query results overwrite each other," , this is exactly what i want. Consider i make some changes to a query (like you do for example in sql management studio), but that query is not final and I gradually improve it, then I don't care about the previous results until i can write the correct query and i don't want to close the old results tab/window each time. Before the current changes I had to manually go and close each MDI window each time I ran a query, and that is very strange to me. If I would want to see previous results then i would create a new connection from current, copy the query, maybe change it, then run it, keeping old result in prev window (and associated with the exact query that generated them). >Another solution would be to add a new Run(tab) button that would open new tabs as you said (keeping the current Run button that overwrites). >But there is an issue to consider: a query and the results form a pair, if we have many results for some query that include older forms of it then it's kind of strange, because for those older results i lost the query that generated them, so ideally for each results i should see the query that generated them. > >In any case I would like to have the functionality to overwrite old results. > > >Regarding the entities feature i think I'll better explain here: >(or only the problem here: http://stackoverflow.com/questions/10251802/sparql-query-to-retrieve-all-objects-and-properties) > >Consider having a list of persons, each person subject of the rdf:type :Person, and each person having one or more of the properties: :Age, :Name, :FullName, :Email, and so on. Now i want to write a query that gives me all the persons and their properties without knowing in advance the properties; > >If i know the properties the final query would look like: >select ?person ?name ?age .. >where { >?person rdf:type :Person. >optional(?person :Name ?name). >optional(?person :hasAge ?age). >.... > >} >But if i don't know the properties i first need to find them, then manually create the query above. >What i did is take the first variable from a query, get all the properties for that list of variables and then dynamically create the query. >In the above example the user would write a query like: >select ?person >where { >?person rdf:type :Person. >} >then i would transform this into a query to get all the predicates for all ?person so running the first query results in a response like: >predicate, nr of usages > >:Name, 2 >:Age, 3 >:Email, 1 > > >so now i can programaticaly create a new query: > > >select ?person ?name ?age .. >where {...... > > >What I did wrong i think is that I actually executed the final query, and I think it's better to actually make a button that generates this final query from the initial one and let the user execute it, because in this way he can remove some of the properties. >So for the user input: >select ?person >where { >?person rdf:type :Person. >} >i would press a button and get as an output a new query: >select ?person ?name ?age .. >where { optional(...... > > > > > > > > > > > >On Wednesday, December 11, 2013 2:09 PM, Rob Vesse <rv...@do...> wrote: > >Eugen > > >Generally I like the changes, I have a few suggestions for improvements. > > >Firstly since the tabs act mainly as buttons to quickly focus on a specific connection I'd suggest using FlatButtons Appearance for the tabs. I've already made this change in the main repository, note that I've moved the changes onto the TOOLS-390 branch in the main repository, if you can pull my changes to your fork and then make any further changes in that branch instead of default that would be much appreciated. > > >Currently the query results overwrite each other, so if I run subsequent queries the previous query results are hidden. It might be a nice idea to have a tab control within the results area and have each new query add a tab preferably with some way to view in each result tab what query produced the results, this would also need the ability to close result tabs that are no longer needed. > > >Another nice feature to have would be the ability to detach results into a separate window when desired though I'm less fussed about this. > > >I'm not really sure what the entities feature is doing since it didn't seem to do much in my testing, I'd like to understand exactly what this is attempting to do. Wrt to the code for this it would be better to use the SparqlParameterizedString class for constructing the queries rather than String.Format() and string concatenation. See the Representing Queries section at https://bitbucket.org/dotnetrdf/dotnetrdf/wiki/UserGuide/Querying%20with%20SPARQL for an example of using this class. > > >Note that you can get the namespaces associated with the existing query by using the NamespaceMap property and the Base URI using the BaseUri property, you can then simply copy these to your SparqlParameterizedString instance avoiding the need to do this by string extraction. (Actually it doesn't have a BaseUri property, I'll add that soon) > > >In general I'm wondering that if you are looking to give a more entity centric view of the data in a store whether it wouldn't be better to add this functionality as a new entities tab and develop entity viewer controls and associated tasks specifically for this rather than reusing the Query Tab? > > >Cheers, > > >Rob > > >From: Rob Vesse <rv...@do...> >Reply-To: dotNetRDF Developer Discussion and Feature Request <dot...@li...> >Date: Tuesday, 10 December 2013 16:12 >To: dotNetRDF Developer Discussion and Feature Request <dot...@li...> >Subject: Re: [dotNetRDF-Develop] Store manager improvements > > > >Thanks for that, I've pulled your changes locally and will try and take a proper look at them tomorrow. I've glanced over the code changes and everything looks OK but I haven't got as far as running the revised UI yet. >> >> >>When I do review properly I'll try and look at the entities query stuff and see if there is any way to make it more efficient. >> >> >>Thanks for spotting the bug in BaseEndpoint, I introduced this by accident with a recent commit and it should now be fixed again with my most recent commits >> >> >>Cheers, >> >> >>Rob >> >> >>From: Eugen F <feu...@ya...> >>Reply-To: Eugen F <feu...@ya...> >>Date: Tuesday, 10 December 2013 09:46 >>To: Rob Vesse <rv...@do...> >>Cc: dotNetRDF Developer Discussion and Feature Request <dot...@li...> >>Subject: Re: [dotNetRDF-Develop] Store manager improvements >> >> >> >>I've updated the repository, so maybe you can check the changes. >>> >>>Note that there is a change in BaseEnpoint "throw new ArgumentException("HTTP Mode can only be GET/POST, derived implementations should override this property if they wish to support more methods");" that I had to comment in order to make the version from repository connect to an endpoint. (no relation to my changes). >>> >>>Also I tried to make an external endpoint work with that entities change, but i only get timeouts...because of the complex query i think. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>>On Monday, December 9, 2013 2:50 PM, Rob Vesse <rv...@do...> wrote: >>> >>>Eugen >>> >>> >>>Forking a Mercurial repository copies all branches, however if you could commit your changes to the default branch that would be best >>> >>> >>>Thanks, >>> >>> >>>Rob >>> >>> >>>From: Eugen F <feu...@ya...> >>>Reply-To: Eugen F <feu...@ya...> >>>Date: Monday, 9 December 2013 12:20 >>>To: Rob Vesse <rv...@do...> >>>Subject: Re: [dotNetRDF-Develop] Store manager improvements >>> >>> >>> >>>I have made the changes so it's now both MDI and tabs, forked repository at https://bitbucket.org/feugen24/storemanager_tabs. Still I'm not sure it's the correct version because there were lots of tags when creating the fork, so i picked the "dynamic" that was selected by default. I assumed dynamic means (latest). >>>> >>>>If it's ok i'll update this one. >>>> >>>> >>>> >>>> >>>>On Sunday, December 8, 2013 5:33 PM, Rob Vesse <rv...@do...> wrote: >>>> >>>>Hi Eugen >>>> >>>> >>>>Thanks for the detailed email, yes there are advantages to a tabbed interface though I suspect some users (like myself) may prefer to have the MDI interface still. >>>> >>>> >>>>What would be ideal from my perspective would be to integrate this such that users can switch between the modes as desired, so users who prefer the current interface can continue to use it and those that like the new interface can use that instead. Or even to have it such that you can dock connections into a tabbed interface as and when desired. >>>> >>>> >>>>The changes all sound useful but I haven't previewed them at all because I'm afraid I'm not going to run a compiled executable from someone who's emailing me for the very first time even if it does pass the virus checker. If you can provide either a link to the git repository, a patch against latest trunk or ideally a mercurial fork that would be fantastic. We use Mercurial for our development with our main repository hosted on BitBucket at http://bitbucket.org/dotnetrdf/dotnetrdf – if you can fork the code on BitBucket, transfer your changes to there and then open a pull request that would be the best way for us to see and review your changes. >>>> >>>> >>>>Btw this is a subscription list, your email was moderated through and you've been CC'd on this initial reply but if you could subscribe at https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop so you can participate in this discussion going forward without us having to manually CC you each time that would be much appreciated. >>>> >>>> >>>>Thanks, >>>> >>>> >>>>Rob >>>> >>>> >>>>From: Eugen F <feu...@ya...> >>>>Reply-To: Eugen F <feu...@ya...>, dotNetRDF Developer Discussion and Feature Request <dot...@li...> >>>>Date: Saturday, 7 December 2013 11:42 >>>>To: "dot...@li..." <dot...@li...> >>>>Subject: [dotNetRDF-Develop] Store manager improvements >>>> >>>> >>>> >>>>Hi, >>>>> >>>>> >>>>>I'm working with store manager and because of the midi interface it's difficult to interact with it, meaning each time i create a connection a new window is created, then when I run a query another window, rerun a query...new window, then close the one of the first query run and so on. >>>>> >>>>> >>>>>So i think the approach in sql server management studio or brightstardb polaris tool is much better. Both have tabs for each new connection, and when i rerun a query only results change (no new window). >>>>>So i made the following changes: >>>>>- when a connection is opened a new tab page is created and I add StoreManagerForm as a child to it >>>>>- each tab has a close btn >>>>> >>>>>The rest of the functionality is the same except for query tab where: >>>>>- i added a splitter control where panel 1 has query window , panel 2 has query results (both for graph and resultset) >>>>> >>>>>- i added a new button for orientation ( --| ) so we can change the orientation of the splitter ( vertical mode is v helpful on wide screens with few columns on results) >>>>>- i removed "query" word from all buttons to occupy less space (i think it's obvious since we are in query window tab) >>>>> >>>>>- i changed AutoSizeColumnsMode to AllCells (previous was DisplayedCells but i had problems with it when large uri's where not in current view) >>>>> >>>>> >>>>>I also added a feature (in query tab) to expand a query for some subjects so i can see all the properties and values of those subjects. This allows a user to see similar results as sql server in case he has entities. For example if a user is using Entityframework api from brightstardb he can the select entities of rdf:type "Car" and see all car entities with values, in a table. >>>>>- i added a new checkbox "AsEntities" that allows this feature when checked (it takes first variable from the current query as entity id/subject) >>>>> >>>>>It transforms user query to get all properties and the dynamically creates a query to get the entities. >>>>>- i also added a numeric control next to the checkbox with default value of 1. This was necessary because in may case I have some predicates that are entities themselves and i need to filter those out. (a group by is used to filter predicates using that default value of 1) >>>>> >>>>> >>>>>I've attached the working version so you can play with it. I worked on a local git source control using latest 102 source code. >>>>>Let me know what you think of the changes, and if it's ok, how to send/publish the source code. I've not really worked on any open source project so i don't know the flow.------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk_______________________________________________ dotNetRDF-develop mailing list dot...@li...https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop >>>> >>>> >>> >>> ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________ dotNetRDF-develop mailing list dot...@li...https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop >------------------------------------------------------------------------------ >Rapidly troubleshoot problems before they affect your business. Most IT >organizations don't have a clear picture of how application performance >affects their revenue. With AppDynamics, you get 100% visibility into your >Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! >http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk >_______________________________________________ >dotNetRDF-develop mailing list >dot...@li... >https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop > > >------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________ dotNetRDF-develop mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ dotNetRDF-develop mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop |