Package javax.jcr

Examples of javax.jcr.PathNotFoundException


      JCRPath itemPath = locationFactory.parseRelPath(relPath);

      ItemImpl node = dataManager.getItem(nodeData(), itemPath.getInternalPath().getEntries(), true, ItemType.NODE);
      if (node == null || !node.isNode())
      {
         throw new PathNotFoundException("Node not found " + (isRoot() ? "" : getLocation().getAsString(false)) + "/"
            + itemPath.getAsString(false));
      }

      return (NodeImpl)node;
   }
View Full Code Here


      if (LOG.isDebugEnabled())
         LOG.debug("getProperty() " + getLocation().getAsString(false) + " " + relPath);

      ItemImpl prop = dataManager.getItem(nodeData(), itemPath.getInternalPath().getEntries(), true, ItemType.PROPERTY);
      if (prop == null || prop.isNode())
         throw new PathNotFoundException("Property not found " + itemPath.getAsString(false));

      return (Property)prop;
   }
View Full Code Here

         QPath destPath = locationFactory.parseRelPath(relPath).getInternalPath();
         NodeImpl destParent =
            (NodeImpl)dataManager.getItem(nodeData(), destPath.makeParentPath().getEntries(), false, ItemType.NODE);
        
         if (destParent == null)
            throw new PathNotFoundException("Parent not found for " + relPath);

         if (!destParent.isNode())
            throw new ConstraintViolationException("Parent item is not a node. Rel path " + relPath);

         NodeImpl destNode =
View Full Code Here

      RepositoryException
   {
      PropertyImpl prop =
         (PropertyImpl)dataManager.getItem(nodeData(), new QPathEntry(name, 1), false, ItemType.PROPERTY);
      if (prop == null || prop.isNode())
         throw new PathNotFoundException("Property not found " + name);
      return prop;
   }
View Full Code Here

      ItemImpl parentItem =
         dataManager.getItem(nodeData(), itemPath.makeParentPath().getInternalPath().getEntries(), false,
            ItemType.UNKNOWN);

      if (parentItem == null)
         throw new PathNotFoundException("Parent not found for " + itemPath.getAsString(true));
      if (!parentItem.isNode())
         throw new ConstraintViolationException("Parent item is not a node " + parentItem.getPath());

      NodeImpl parent = (NodeImpl)parentItem;
      InternalQName name = itemPath.getName().getInternalName();
View Full Code Here

      ItemImpl parentItem =
         dataManager.getItem(nodeData(), itemPath.makeParentPath().getInternalPath().getEntries(), false,
            ItemType.UNKNOWN);

      if (parentItem == null)
         throw new PathNotFoundException("Parent not found for " + itemPath.getAsString(true));
      if (!parentItem.isNode())
         throw new ConstraintViolationException("Parent item is not a node " + parentItem.getPath());
      NodeImpl parent = (NodeImpl)parentItem;

      InternalQName name = itemPath.getName().getInternalName();
View Full Code Here

      JCRPath itemPath = locationFactory.parseRelPath(relPath);

      ItemImpl node = dataManager.getItem(nodeData(), itemPath.getInternalPath().getEntries(), true, ItemType.NODE);
      if (node == null || !node.isNode())
      {
         throw new PathNotFoundException("Node not found " + (isRoot() ? "" : getLocation().getAsString(false)) + "/"
            + itemPath.getAsString(false));
      }

      return (NodeImpl)node;
   }
View Full Code Here

      if (LOG.isDebugEnabled())
         LOG.debug("getProperty() " + getLocation().getAsString(false) + " " + relPath);

      ItemImpl prop = dataManager.getItem(nodeData(), itemPath.getInternalPath().getEntries(), true, ItemType.PROPERTY);
      if (prop == null || prop.isNode())
         throw new PathNotFoundException("Property not found " + itemPath.getAsString(false));

      return (Property)prop;
   }
View Full Code Here

         QPath destPath = locationFactory.parseRelPath(relPath).getInternalPath();
         NodeImpl destParent =
            (NodeImpl)dataManager.getItem(nodeData(), destPath.makeParentPath().getEntries(), false, ItemType.NODE);
        
         if (destParent == null)
            throw new PathNotFoundException("Parent not found for " + relPath);

         if (!destParent.isNode())
            throw new ConstraintViolationException("Parent item is not a node. Rel path " + relPath);

         NodeImpl destNode =
View Full Code Here

      RepositoryException
   {
      PropertyImpl prop =
         (PropertyImpl)dataManager.getItem(nodeData(), new QPathEntry(name, 1), false, ItemType.PROPERTY);
      if (prop == null || prop.isNode())
         throw new PathNotFoundException("Property not found " + name);
      return prop;
   }
View Full Code Here

TOP

Related Classes of javax.jcr.PathNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.