-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi Resource Reactor #83
Comments
Thanks @Christian-Nja for raising this issue and enhancement. |
Thank you very much @ali1k for your fast reply! Yes now that you make me note i'm agree with you, it is better a ComplexResource than a MultiResource. I know in advance it's URI so i can configure the ResourceReactor as you suggested to handle it. Maybe i can do something like this (follow on with the example of Situation) on loading of the Situation component i can define and trigger a new action such as loadComplexResource or loadExtraProperties How does it sounds to you? The last thing i'm not sure of is where to store the extra data collected by the second query. Do you think it may be possible pass them to the ResourceStore too? Or is there the need for another store ? Again, thanks for your help! |
Your approach sounds good to me! With regards to making a new store, I think you can still reuse the current ResourceStore. You might only need to have a custom parseProperties in https://github.com/ali1k/ld-r/blob/master/services/utils/ResourceUtil.js#L29 to take care of additional resources/properties you will receive by your custom query. |
Great! Thank you very much @ali1k for valuable hints ! |
Thanks to your advice @ali1k i managed to make working the data flow. As a solution I created a new reactor in the reactor.js configuration on the PropertyReactor key. Beside that you need to specify a Viewer for the property/resource and a customQuery to retrieve additional data (i put the query in the configs to, in this way the component may be reused).
|
good to hear that it works now with static config. For dynamic config, you need to change the queries at https://github.com/ali1k/ld-r/blob/master/plugins/dynamicConfiguration/DynamicConfigurator.js#L949 to retrieve the additional fields you have added there. And the results of those queries are parsed in https://github.com/ali1k/ld-r/blob/master/services/utils/Configurator.js#L151 |
Hello @ali1k i encountered a problem while going on with the development of this functionality.
If the two listen to the same ResourceStore after second update (the query from collection_1) data by the two will be merged or override. SOLUTION 1: CommonStore
complex_1 will be rerendered n time, complex_2 n times -1 ... SOLUTION 2: a store for every complex resource pattern As every complex component listen to a single personal store , there would be no unnecessary rerendering and no problem with data overriding. What do you think about this? |
It is indeed a complex situation. I was thinking maybe another variation of option 1 is to have different state variables for each case Where your component is listening to. It still doesn’t solve the re- rendering issue though. |
In this phase i will go with option two (faster) as the work on Visualization for Ontology Design Patterns has research purpose only . In any case as LD-R is a really great framework i'm curious to see how GraphQL can expand its potential! If you need some help let me know! |
Hi @ali1k, thank you very much if you would like to help me again. I keep on developing the pattern visualization application on top of There are three layers here: PatternNetwork -> PatterInstancesNetwork -> SingleInstance (or ComplexResource we spoke above). I was wondering:
I have the URI of the istance, and i know it is of tye Instance. Is it possible to define a reactor sayning all the resources of type Instance to be treated with InstanceView ? A possible scenario is: we have a Here are config files: Dataset level:
What i don't know is how to retrigger LD-R mechanism (NavLink, route?), i would like to do something like:
All this is based on the assumption that KnowledgeGraph is modelled with ontology design patterns and annotated with opla vocabulary. |
If the problem is to redirect all resource of type "SituationPattern" to your Complex Resource component, you can use "treatAsResourceType" property.
|
Hi @ali1k i was not quite clear with the explanation. I reread the paper explaining LD-R algo to clarify myself :) . I have a node representing a resource at Dataset visualization. Clicking on that node i'd like to trigger LD-R adaptive algorithm for the resource represented by the node. To which endpoint/href should i make request and which properties are required ? I suppose i will use a update Well i manage to do that on route: |
Hi @ali1k , i almost manage to complete this feature! The last basic requirement i'm missing is add facets to complex resource. Imagine we have again a bunch of complex-resource such as I saw [1]
|
First of all, thank you for this wonderful framework, it's a really great and useful project !
I'm working on visualization for ontology design pattern (link below for a reference) and i'm thinking on the way to get isnide ld-r framework.
I provide an example trying to be more clear:
scenario: I'm navigating using ld-r through a dataset with a list of resources. I click on a resource to examine it (it's route would than be handled as defined in routes.js by ResourceReactor, it calls loadResource with the query defined in services/resource.js and i can define a custom view component for this resource )
my problem: this resource is for example a Situation. I would like that it would be treated as a pattern: it may have a TimeInterval and Participants and participants may have Names and Location and location may have Coordinates.
For that, i would need to create a custom component to visualize as a unity multi resource data.
This VIEW coding won't be that difficult i think,
but here arise two problems:
If i'm not wrong the ResourceReactor can handle the visualization of a resource and related nodes with a depth of 1.
( The service invoked by the loadResource action generates a query that gets a resource and all its properties (with depth 1).
Again, if i'm correct or is something escapes me ?)
My problem is that i need a more specific query to collect all the data composing the pattern.
And in the context of fluxible i would need also a new Store for the state and maybe a new Reactor etc.
Probably i got confused as you may read and there's a simpler solution :)
What i'm thinking right now would be:
I opened this issues to asks for suggestion to you on how to implement this (do you think to simpler ways to do?) and maybe to propose an enhancement if it may be useful.
thank you very much !
Christian
Gangemi, Aldo. "Ontology design patterns for semantic web content." International semantic web conference. Springer, Berlin, Heidelberg, 2005.
The text was updated successfully, but these errors were encountered: