I'm curious if there is an elegant, Jena-style way to do the following
(which can be done pragmatically in many ways).

I'd like to have a single object that can be any of a literal, a
variable, or a resource in a specific model.

RDFNode can be either a literal or a resource in a specific model.

Node can be either a literal or a variable.  (I can find no
getVariable() method.  Does toString() return the variable String used
when created?)

Is there a simple way to have all three using an existing Jena
interface?  Something that will provide methods isLiteral(),
isVariable(), and isResource(); and getLiteral(), getVariable() (or
equivalent), and getResource();  all on the same object?



Reply via email to