*/
public Node storeAsNode(String absPath) throws ItemExistsException,
PathNotFoundException, VersionException, ConstraintViolationException,
LockException, UnsupportedRepositoryOperationException, RepositoryException {
NamePathResolver resolver = mgrProvider.getNamePathResolver();
try {
Path p = resolver.getQPath(absPath).getNormalizedPath();
if (!p.isAbsolute()) {
throw new RepositoryException(absPath + " is not an absolute path");
}
String jcrParent = resolver.getJCRPath(p.getAncestor(1));
if (!session.itemExists(jcrParent)) {
throw new PathNotFoundException(jcrParent);
}
String relPath = resolver.getJCRPath(p).substring(1);
String ntName = resolver.getJCRName(NameConstants.NT_QUERY);
Node queryNode = session.getRootNode().addNode(relPath, ntName);
// set properties
queryNode.setProperty(resolver.getJCRName(NameConstants.JCR_LANGUAGE), getLanguage());
queryNode.setProperty(resolver.getJCRName(NameConstants.JCR_STATEMENT), getStatement());
node = queryNode;
return node;
} catch (NameException e) {
throw new RepositoryException(e.getMessage(), e);
}