Examples of JCRPath


Examples of org.exoplatform.services.jcr.impl.core.JCRPath

   {
      String str = "Inmemory WorkspaceContainer Data: \n";
      Iterator i = items.keySet().iterator();
      while (i.hasNext())
      {
         JCRPath d = (JCRPath)i.next();
         str += d.getInternalPath() + "\n";
      }
      return str;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

               Calendar cal = JCRDateFormat.parse(value);
               return createValue(cal);
            case PropertyType.PATH :
               try
               {
                  JCRPath path;
                  if (value.startsWith("/"))
                     path = locationFactory.parseAbsPath(value);
                  else
                     path = locationFactory.parseRelPath(value);
                  return createValue(path);
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

    * @throws RepositoryException
    */
   private JCRPathMatcher parsePathMatcher(LocationFactory locFactory, String path) throws RepositoryException
   {

      JCRPath knownPath = null;
      boolean forDescendants = false;
      boolean forAncestors = false;

      if (path.equals("*") || path.equals(".*"))
      {
         // any
         forDescendants = true;
         forAncestors = true;
      }
      else if (path.endsWith("*") && path.startsWith("*"))
      {
         forDescendants = true;
         forAncestors = true;
         knownPath = parsePath(path.substring(1, path.length() - 1), locFactory);
      }
      else if (path.endsWith("*"))
      {
         forDescendants = true;
         knownPath = parsePath(path.substring(0, path.length() - 1), locFactory);
      }
      else if (path.startsWith("*"))
      {
         forAncestors = true;
         knownPath = parsePath(path.substring(1), locFactory);
      }
      else
      {
         knownPath = parsePath(path, locFactory);
      }

      return new JCRPathMatcher(knownPath.getInternalPath(), forDescendants, forAncestors);

   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

      version.invalidate();
   }

   protected NodeData getVersionData(String versionName) throws VersionException, RepositoryException
   {
      JCRPath jcrPath = locationFactory.createJCRPath(getLocation(), versionName);

      NodeData version = getData().getVersionData(jcrPath.getName().getInternalName());

      if (version == null)
         throw new VersionException("Version is not found " + jcrPath.getAsString(false));

      return version;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

   public Node storeAsNode(String absPath) throws ItemExistsException, PathNotFoundException, VersionException,
      ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException
   {

      checkInitialized();
      JCRPath path = session.getLocationFactory().parseAbsPath(absPath);
      QPath qpath = path.getInternalPath();
      NodeImpl parent = (NodeImpl)session.getTransientNodesManager().getItem(qpath.makeParentPath(), false);
      if (parent == null)
         throw new PathNotFoundException("Parent not found for " + path.getAsString(false));

      // validate as on parent child node
      parent.validateChildNode(qpath.getName(), Constants.NT_QUERY);

      NodeData queryData =
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

               Calendar cal = JCRDateFormat.parse(value);
               return createValue(cal);
            case PropertyType.PATH :
               try
               {
                  JCRPath path;
                  if (value.startsWith("/"))
                     path = locationFactory.parseAbsPath(value);
                  else
                     path = locationFactory.parseRelPath(value);
                  return createValue(path);
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

      version.invalidate();
   }

   protected NodeData getVersionData(String versionName) throws VersionException, RepositoryException
   {
      JCRPath jcrPath = locationFactory.createJCRPath(getLocation(), versionName);

      NodeData version = getData().getVersionData(jcrPath.getName().getInternalName());

      if (version == null)
         throw new VersionException("Version is not found " + jcrPath.getAsString(false));

      return version;
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

               Calendar cal = JCRDateFormat.parse(value);
               return createValue(cal);
            case PropertyType.PATH :
               try
               {
                  JCRPath path;
                  if (value.startsWith("/"))
                     path = locationFactory.parseAbsPath(value);
                  else
                     path = locationFactory.parseRelPath(value);
                  return createValue(path);
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

   public Node storeAsNode(String absPath) throws ItemExistsException, PathNotFoundException, VersionException,
      ConstraintViolationException, LockException, UnsupportedRepositoryOperationException, RepositoryException
   {

      checkInitialized();
      JCRPath path = session.getLocationFactory().parseAbsPath(absPath);
      QPath qpath = path.getInternalPath();
      NodeImpl parent = (NodeImpl)session.getTransientNodesManager().getItem(qpath.makeParentPath(), false);
      if (parent == null)
         throw new PathNotFoundException("Parent not found for " + path.getAsString(false));

      // validate as on parent child node
      parent.validateChildNode(qpath.getName(), Constants.NT_QUERY);

      NodeData queryData =
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.JCRPath

   {
      try
      {
         NodeData node = (NodeData)dataManager.getItemData(Constants.ROOT_UUID);

         JCRPath path = lFactory.parseRelPath(nodePath.substring(1)); // let ignore root entry '[]:1'
         for (QPathEntry entry : path.getInternalPath().getEntries())
         {
            node = (NodeData)dataManager.getItemData(node, entry, ItemType.NODE, false);

            if (node == null) // may be already removed
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.