Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: Strawman for 0..n entity ids [WAS: [higgins-dev] My position on EntityId]

Depends, no one is stating what an EntityID represents, my view is it resolves to the Entity within a context

Anthony Nadalin | Work 512.838.0085 | Cell 512.289.4122

Inactive hide details for "Markus Sabadello" ---09/18/2008 12:30:56 PM---After the call, I had this idea:"Markus Sabadello" ---09/18/2008 12:30:56 PM---After the call, I had this idea:


From:

"Markus Sabadello" <msabadello@xxxxxxxxxxxxx>

To:

"Higgins (Trust Framework) Project developer discussions" <higgins-dev@xxxxxxxxxxx>

Date:

09/18/2008 12:30 PM

Subject:

Re: Strawman for 0..n entity ids [WAS: [higgins-dev] My position on EntityId]




After the call, I had this idea:

1. Let's say IEntity.getEntityIds() returns an array of Objects (in Java: Object[]). These Objects can either be Strings or IAttributeValues. If the EntityId is not exposed as an attribute, it's just a String. If it is exposed as an attribute, then it's an IAttributeValue.

2. IEntity.getCanonicalEntityId() returns a single Object. As before, if the canonical EntityId is not exposed as an attribute, then the Object is a String. Otherwise it's an IAttributeValue.

3. IContext.getEntity() has two overloaded versions. One that takes a String, and one that takes an IAttributeValue.

So in total:

public Object[] IEntityId.getEntityIds(); // Objects can either be String or IAttributeValue
public Object IEntity.getCanonicalEntityId(); // Object can either be String or IAttributeValue
public IEntity IContext.getEntity(String);
public IEntity IContext.getEntity(IAttributeValue);

You don't invent something new for typing such as key-value pairs. You simply use the existing IAttributeValue interface. IAttributeValue already includes the type. And it can be complex, so you can do multi-part keys too.

All the IAttributeValue instances returned by IEntityId.getEntityIds() are guaranteed to also show up somewhere on the IEntity in an IAttribute that is a sub-attribute of higgins:synonym.

Would that work?

Markus

On Thu, Sep 18, 2008 at 4:26 PM, Paul Trevithick <paul@xxxxxxxxxxxxxxxxx> wrote: _______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev

GIF image

GIF image


Back to the top