boakes.org

IPropertySource and IAdaptable

In order to get an RDF Resource displayed in the Properties view it needs to be accessible through an object which implements the IPropertySource interface. My first pass saw me configure my INode interface to extends IPropertySource, however, noting that INode is merely a container for a Resource, not the resource itself, and that several INode’s may point to a single Resource this may not be the best solution – time will tell – i’m sticking with the first idea for expedience.

Time passes…

OK, so scratch that – having read some more I’m getting convinced that’s what’s needed is to take the [official] alternative path to implementing IPropertySource which is to implement IAdaptable. An object which does this will return an adapter object when requested – this adapter object contains the code used by the Properties view, and queries the underlying object for the information required.

This, I think will give me a nice abstraction so I can use different RDF API’s (should an alternative to Jena be required).

Published: June 25th, 2003

Tags: