@Override
public Property getProperty( String absPath ) throws PathNotFoundException, RepositoryException {
checkLive();
CheckArg.isNotEmpty(absPath, "absPath");
// Return root node if path is "/"
Path path = absolutePathFor(absPath);
if (path.isRoot()) {
throw new PathNotFoundException(JcrI18n.rootNodeIsNotProperty.text());
}
if (path.isIdentifier()) {
throw new PathNotFoundException(JcrI18n.identifierPathNeverReferencesProperty.text());
}
Segment lastSegment = path.getLastSegment();
if (lastSegment.hasIndex()) {
throw new RepositoryException(JcrI18n.pathCannotHaveSameNameSiblingIndex.text(absPath));
}
// This will throw a PNFE if the parent path does not exist
AbstractJcrNode parentNode = node(path.getParent());
AbstractJcrProperty property = parentNode.getProperty(lastSegment.getName());
if (property == null) {
throw new PathNotFoundException(GraphI18n.pathNotFoundExceptionLowestExistingLocationFound.text(absPath,
parentNode.getPath()));