Package org.exoplatform.services.jcr.impl.core

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


                  throw new ValueFormatException("Path '" + value + "' is invalid");
               }
            case PropertyType.NAME :
               try
               {
                  JCRName name = locationFactory.parseJCRName(value);
                  return createValue(name);
               }
               catch (RepositoryException e)
               {
                  throw new ValueFormatException("Name '" + value + "' is invalid", e);
View Full Code Here


    * @throws RepositoryException
    */

   protected String getAttribute(Map<String, String> attributes, InternalQName name) throws RepositoryException
   {
      JCRName jname = locationFactory.createJCRName(name);
      return attributes.get(jname.getAsString());
   }
View Full Code Here

    * @throws RepositoryException
    */

   protected String getAttribute(Map<String, String> attributes, InternalQName name) throws RepositoryException
   {
      JCRName jname = locationFactory.createJCRName(name);
      return attributes.get(jname.getAsString());
   }
View Full Code Here

                  throw new ValueFormatException("Path '" + value + "' is invalid");
               }
            case PropertyType.NAME :
               try
               {
                  JCRName name = locationFactory.parseJCRName(value);
                  return createValue(name);
               }
               catch (RepositoryException e)
               {
                  throw new ValueFormatException("Name '" + value + "' is invalid", e);
View Full Code Here

    * @throws RepositoryException
    */

   protected String getAttribute(Map<String, String> attributes, InternalQName name) throws RepositoryException
   {
      JCRName jname = locationFactory.createJCRName(name);
      return attributes.get(jname.getAsString());
   }
View Full Code Here

                  throw new ValueFormatException("Path '" + value + "' is invalid");
               }
            case PropertyType.NAME :
               try
               {
                  JCRName name = locationFactory.parseJCRName(value);
                  return createValue(name);
               }
               catch (RepositoryException e)
               {
                  throw new ValueFormatException("Name '" + value + "' is invalid", e);
View Full Code Here

   public boolean accept(ItemData item)
   {
      try
      {
         JCRName name = session.getLocationFactory().createJCRName(item.getQPath().getName());
         for (String expr : expressions)
         {
            if (estimate(name.getAsString(), expr))
            {
               return true;
            }
         }
      }
View Full Code Here

    * @throws RepositoryException
    */

   protected String getAttribute(Map<String, String> attributes, InternalQName name) throws RepositoryException
   {
      JCRName jname = locationFactory.createJCRName(name);
      return attributes.get(jname.getAsString());
   }
View Full Code Here

      LocationFactory lFactory = parent.getSession().getLocationFactory();

      for (Entry entry : props.entrySet())
      {
         QName qname = (QName)entry.getKey();
         JCRName jcrName = lFactory.createJCRName(new InternalQName(qname.getNamespace(), qname.getName()));

         PropertyDefinitionData definition =
            parent
               .getSession()
               .getWorkspace()
               .getNodeTypesHolder()
               .getPropertyDefinitions(jcrName.getInternalName(), ((NodeData)parent.getData()).getPrimaryTypeName(),
                  ((NodeData)parent.getData()).getMixinTypeNames()).getAnyDefinition();

         if (definition != null)
         {
            if (definition.isMultiple())
            {
               Value[] values = {createValue(entry.getValue(), vFactory)};
               parent.setProperty(jcrName.getAsString(), values);
            }
            else
            {
               Value value = createValue(entry.getValue(), vFactory);
               parent.setProperty(jcrName.getAsString(), value);
            }
         }
      }
   }
View Full Code Here

         Iterator entries = props.entrySet().iterator();
         while (entries.hasNext())
         {
            Entry entry = (Entry)entries.next();
            QName qname = (QName)entry.getKey();
            JCRName jcrName =
               property.getSession().getLocationFactory().createJCRName(
                  new InternalQName(qname.getNamespace(), qname.getName()));

            PropertyDefinitionDatas pds =
               parent.getSession().getWorkspace().getNodeTypesHolder().findPropertyDefinitions(
                  jcrName.getInternalName(), ((NodeData)parent.getData()).getPrimaryTypeName(),
                  ((NodeData)parent.getData()).getMixinTypeNames());
            if (pds.getDefinition(true) != null)
            {
               Value[] values = {createValue(entry.getValue(), property.getSession().getValueFactory())};
               parent.setProperty(jcrName.getAsString(), values);
            }
            else
            {
               parent.setProperty(jcrName.getAsString(), createValue(entry.getValue(), property.getSession()
                  .getValueFactory()));
            }
         }

         return false;
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.core.JCRName

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.