Closed mshd closed 4 years ago
Hi @mshd . I don't know if that's is correct. After i get the id for the spouse, i call the api through Axios, but the curly bracket that usually change into value is not working
Yes, that is certainly not correct, first of all: don't use axios.get(), we already have a function for this that does the same "wikidataController.wikidataApi" As you can see in the page, it's not showing anything. A spouse can have children, a spouse can not have another spouse. Further, these are callback functions so you need some new function/structure.
Okay, i'll remove the axios tomorrow, i just realized that wikidatacontroller.wikidataApi after pushed. So, in the screenshot that i attached, so later every entity either the husband or the wife have their own children, is that what you mean?
Yes that looks good, but keep in mind, that there can be multiple spouses. The children always go down from the spouse, your added hand-drawing is not necessary. Please push these chaanges
Please keep, in mind that data structure is only for descendants, for ancestors, nothing should be changed
Idea: first just work on descandants without spouses, save all spouses in an array. In all children add "mother" and "father" value to the array. Remove existing ids from the spouses (becuase either mother or father is already within the tree). Reconstruct the tree hierarchy. Add spouses or other parent to the structure, the unflatten function may also be moved to the backend
@edwinindrajayas for siblings you need to add a pseudo node JSON data structure guide.docx maybe this will help, so iff siblings is selected you need to add another pseudo node to support (add another hierarchy)
Subissue of #6
result2.zip see basic-example.js
I have found someone to update TreantJS, attached is an example. The new data structure has a new element called "spouse". We can get the property spouse, but this will not be enough, as some people have children with other people :) Basically we need to get the children first and see what their other father/mother for an element has. Addition recursive functions are needed.
[x] Add spouse from property "spouse"
[ ] Add spouse from children's "other parent"
[x] Add siblings (later)
The Plugin might still be buggy, but we need to test it with our tool