Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] Nodes outside Contexts?

So maybe we should do the following:

Create an interface INodeId with these methods:

IContextId getContextId()  <--- return value may be null if it's a relative NodeId
String getAbsolute() <--- returns the absolute NodeId which includes the ContextId, may be null
String getRelative() <--- returns the relative NodeId (that's what used to be called SubjectId)

Create a factory class NodeIdFactory (in analogy to the existing ContextIdFactory) with the following method:

INodeId fromString(String)

Add these methods to IdASRegistry:

INode createNode(INodeId)
INode createNode(String)

Markus

On Fri, Feb 15, 2008 at 1:03 PM, Markus Sabadello <msabadello@xxxxxxxxxxxxx> wrote:
Nono that's not what I'm saying.

Every node is inside a context.

But: http://wiki.eclipse.org/NodeId_Data_Range says that "An absolute NodeId Data Range MUST uniquely identify both a Context and a specific Node within that Context".

This means that the absolute NodeId contains a ContextId and a relative NodeId (see examples on that page).

So.. If you give the IdASRegistry an absolute NodeId (and auth materials for opening the context.. I forgot that in the previous mail), it should be able to directly hand you an instance of INode, or?

Markus

On Fri, Feb 15, 2008 at 12:57 PM, Jim Sermersheim <jimse@xxxxxxxxxx> wrote:

I want to just say no, but I suspect I'm missing something.  Right now, a Context is like a top-level thing in Higgins.  So createContext is what we have to use to get started -- once we have the Context, everything we do (including accessing/updating Nodes) is in terms of that Context.


Are you thinking we need a way of creating Nodes outside the scope of any Context?

>>> "Markus Sabadello" <msabadello@xxxxxxxxxxxxx> 02/13/08 11:09 AM >>>
Jim,

Should we have an INodeId interface, in the same manner as we have a IContextId interface?

I could imagine the following method in IdASRegistry:

INode createNode(INodeId nodeId)

.. just like there is

IContext createContext(IContextId contextId)

today.

Markus


_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev




Back to the top