Package org.exoplatform.services.jcr.datamodel

Examples of org.exoplatform.services.jcr.datamodel.InternalQName


      {
         throw new ConstraintViolationException("Parent item is not a node " + parentItem.getPath());
      }
      NodeImpl parent = (NodeImpl)parentItem;

      InternalQName name = itemPath.getName().getInternalName();
      InternalQName ptName = locationFactory.parseJCRName(nodeTypeName).getInternalName();

      // try to make new node
      return doAddNode(parent, name, ptName, null);
   }
View Full Code Here


      List<InternalQName> newMixin = new ArrayList<InternalQName>(mixinTypes.length + 1);
      List<ValueData> values = new ArrayList<ValueData>(mixinTypes.length + 1);

      for (int i = 0; i < mixinTypes.length; i++)
      {
         InternalQName cn = mixinTypes[i];
         newMixin.add(cn);
         values.add(new TransientValueData(cn));
      }
      newMixin.add(type.getName());
      values.add(new TransientValueData(type.getName()));
View Full Code Here

         { // root - no parent
            if (nodeDefinition == null)
            {
               NodeType required =
                  nodeTypeManager.getNodeType(locationFactory.createJCRName(Constants.NT_BASE).getAsString());
               InternalQName requiredName = sysLocFactory.parseJCRName(required.getName()).getInternalName();
               NodeDefinitionData ntData =
                  new NodeDefinitionData(null, null, true, true, OnParentVersionAction.ABORT, false,
                     new InternalQName[]{requiredName}, null, true);
               this.nodeDefinition =
                  new NodeDefinitionImpl(ntData, nodeTypesHolder, nodeTypeManager, sysLocFactory, session
View Full Code Here

   {

      checkValid();

      InternalQName[] mixinTypes = nodeData().getMixinTypeNames();
      InternalQName name = locationFactory.parseJCRName(mixinName).getInternalName();

      // find mixin
      InternalQName removedName = null;
      // Prepare mixin values
      List<InternalQName> newMixin = new ArrayList<InternalQName>();
      List<ValueData> values = new ArrayList<ValueData>();

      for (InternalQName mt : mixinTypes)
View Full Code Here

   {
      public int compare(P p1, P p2)
      {
         int r = 0;

         InternalQName qname1 = p1.getQPath().getName();
         InternalQName qname2 = p2.getQPath().getName();
         if (qname1.equals(Constants.JCR_PRIMARYTYPE))
         {
            r = Integer.MIN_VALUE;
         }
         else if (qname2.equals(Constants.JCR_PRIMARYTYPE))
         {
            r = Integer.MAX_VALUE;
         }
         else if (qname1.equals(Constants.JCR_MIXINTYPES))
         {
            r = Integer.MIN_VALUE + 1;
         }
         else if (qname2.equals(Constants.JCR_MIXINTYPES))
         {
            r = Integer.MAX_VALUE - 1;
         }
         else if (qname1.equals(Constants.JCR_UUID))
         {
            r = Integer.MIN_VALUE + 2;
         }
         else if (qname2.equals(Constants.JCR_UUID))
         {
            r = Integer.MAX_VALUE - 2;
         }
         else
         {
            r = qname1.getAsString().compareTo(qname2.getAsString());
         }

         return r;
      }
View Full Code Here

    *
    * {@inheritDoc}
    */
   protected void entering(PropertyData property, int level) throws RepositoryException
   {
      InternalQName propName = property.getQPath().getName();
      try
      {
         if (propName.equals(Constants.JCR_XMLCHARACTERS))
         {
            writer
               .writeCharacters(new String(property.getValues().get(0).getAsByteArray(), Constants.DEFAULT_ENCODING));
         }
         else
View Full Code Here

            // Sorting properties
            Collections.sort(properies, new PropertyDataOrderComparator());

            for (PropertyData data : properies)
            {
               InternalQName propName = data.getQPath().getName();

               // 7.3.3 Respecting Property Semantics
               // When an element or attribute representing such a property is
               // encountered, an implementation may either skip it or respect it.
               if (Constants.JCR_LOCKISDEEP.equals(propName) || Constants.JCR_LOCKOWNER.equals(propName))
View Full Code Here

         nodeName = JCR_ROOT;
      }
      else
      {

         InternalQName internalNodeName = itemPath.getName();
         if (encode)
         {
            internalNodeName = ISO9075.encode(itemPath.getName());
         }
         String prefix = namespaceRegistry.getPrefix(internalNodeName.getNamespace());
         nodeName = prefix.length() == 0 ? "" : prefix + ":";
         if ("".equals(itemPath.getName().getName()) && itemPath.isDescendantOf(Constants.EXO_NAMESPACES_PATH))
         {
            nodeName += DEFAULT_EMPTY_NAMESPACE_PREFIX; //NOSONAR
         }
         else
         {
            nodeName += internalNodeName.getName(); //NOSONAR
         }

      }
      return nodeName;
   }
View Full Code Here

   {

      final int nlen = mixinTypes != null ? mixinTypes.length : 0;
      for (int i = -1; i < nlen; i++)
      {
         InternalQName name;
         if (i < 0)
         {
            name = primaryType;
         }
         else
View Full Code Here

                           if (parents.size() > 0)
                           {
                              // path to a new node
                              SVNodeData parent = parents.peek();

                              InternalQName name = locationFactory.parseJCRName(svName).getInternalName();

                              int[] chi = parent.addChildNode(name);
                              orderNumber = chi[0];
                              int index = chi[1];
                              currentPath = QPath.makeChildPath(parent.getQPath(), name, index);
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.datamodel.InternalQName

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.