Hi Hannes,
A very good question.
The purpose of the mergenode is to inform the system where to merge 2 graph
parts.
For example, let's imagine that you have a resource graph that looks like
this:
root
|
child <-- only 1 node ever desired in an instance graph
/ \
sub1 sub(n)... <-- n number of nodes allowed here (mergenode set
to "child")
And the intent is that you can only ever have 1 child node in an instance
graph (a graph with actual data in it) and that it can have any number of
sub nodes.
Now imagine that I have a graph part that I'd like to merge onto the base
graph (like you do when adding an item via a form).
The base graph looks like this:
root
|
child
|
sub1
The graph part that I want to merge onto the base graph looks like this:
root
|
child
|
sub3
With the mergenode set to "child" on the "sub" node, what I'll end up with
is this:
root
|
child
/ \
sub1 sub3
If I'd set the mergenode to "root", though, I'd end up with a graph that
looks like this:
root
/ \
child child
/ \
sub1 sub3
Which is clearly not what I intended.
To answer your question about whether the mergenode is
> used and/or required for specifiying "required" and "unique"
The answer is kind of. The system itself will allow you to save any shape
graph you want (correct or otherwise). It's up to you as a developer to
understand the intent of the graph shape and then use the mergenode
information to achieve that goal.
This is something that we'd like to add in the future. That is, build into
the graphs enough metadata to inform the system of the specific intent of
the graph developer.
Hope this helps.
Cheers,
Alexei
Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
On Tue, Jul 14, 2015 at 2:53 AM, H Pirker <[email protected]> wrote:
> Dear all,
>
> Can somebody comment on the role & purpose of "mergenode" in Resource
> Graphs.
>
> In the documentation (
> http://arches3.readthedocs.org/en/latest/arches-data/#resource-graphs )
> it just says:
>
> mergenode: defines the upstream node that occurs one time (and only one
>> time) within a given resource instance. In most cases, that node is the one
>> that represents the resource itself.
>
>
> When inspecting an existing graph. e.g. ACTOR.E39 I can see that the
> mergenode depicts the root of "useful" sub-graphs, i.e. for PLACE,
> APPELATION and ARCHES_EVENT_PHASE.
>
> But what are actually the consequences of adding mergenodes - or leaving
> them out? Is it used and/or required for specifiying "required" and
> "unique" (""one time (and only one time)" ) ? (But this would mean, that
> only a SINGLE ARCHES_EVENT_PHASE can be assigned to a ACTOR, which seems
> odd ?)
> Why do some sub-graphs have a mergenode, while others just "merge" with
> the root-node of the whole Resource Graph ? (e.g.
> BEGINNING_OF_EXISTENCE_TYPE.E63)
>
> yours puzzled :-)
>
> Hannes
>
> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
-- To post, send email to [email protected]. To unsubscribe, send
email to [email protected]. For more information,
visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.