Hi there
Currently I try to implement a UserContextProvider, which contains information
about the user (see CLEREZZA-87).
I am not sure how to add information to the user node if PLATFORM.user property
already exists in the context-node/graph.
String userName = getUserName();
GraphNode agent = userManager.getUserGraphNode(userName);
if(!(node.getObjects(PLATFORM.user).hasNext())) {
node.addProperty(PLATFORM.user, agent.getNode());
} else {
Resource user = node.getObjects(PLATFORM.user).next();
//TODO: adding triples to the existing resource.
}
node = new GraphNode(node.getNode(), new UnionMGraph(node.getGraph(),
agent.getGraph()));
Thanks for your help.
CHeers
Tsuy