Package org.exoplatform.services.jcr.datamodel

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


                        + (property.getType() == PropertyType.BINARY ? strVal : StringConverter.normalizeString(strVal,
                           true));

               }
               // encode node name
               InternalQName internalPropName = ISO9075.encode(property.getQPath().getName());

               currentAttr.addAttribute(internalPropName.getNamespace(), internalPropName.getName(), getExportName(
                        property, true), "CDATA", !strValue.equals("") ? strValue.substring(1) : strValue);
            }

            if (Constants.ROOT_PATH.equals(node.getQPath()))
               contentHandler.startElement(Constants.NS_JCR_URI, Constants.NS_JCR_PREFIX, JCR_ROOT, currentAttr);
View Full Code Here


   }

   protected NodeTypeData[] nodeTypes(NodeData node) throws RepositoryException
   {

      InternalQName primaryTypeName = node.getPrimaryTypeName();
      InternalQName[] mixinNames = node.getMixinTypeNames();
      NodeTypeData[] nodeTypes = new NodeTypeData[mixinNames.length + 1];

      NodeTypeDataManager ntm = session.getWorkspace().getNodeTypesHolder();
      nodeTypes[0] = ntm.getNodeType(primaryTypeName);
View Full Code Here

               QPath pathValue = locationFactory.parseJCRPath(value.getString()).getInternalPath();
               pvd = new TransientValueData(pathValue);
            }
            return pvd;
         case PropertyType.NAME :
            InternalQName nameValue = locationFactory.parseJCRName(value.getString()).getInternalName();
            return new TransientValueData(nameValue);
         case PropertyType.REFERENCE :
            Identifier identifier = new Identifier(value.getString());
            return new TransientValueData(identifier);
         case ExtendedPropertyType.PERMISSION :
View Full Code Here

    */
   private void initDefinitions(boolean multiple, NodeData parent) throws RepositoryException,
      ConstraintViolationException
   {

      InternalQName pname = getData().getQPath().getName();

      if (parent == null)
      {
         parent = parentData();
      }
View Full Code Here

      NodeData destParent = curParent();

      int destIndex; // index for path
      int destOrderNum; // order number

      InternalQName qname;
      if (level == 0)
      {
         qname = destNodeName;

         List<NodeData> destChilds = dataManager.getChildNodesData(destParent);
View Full Code Here

   @Override
   protected void entering(PropertyData property, int level) throws RepositoryException
   {

      InternalQName qname = property.getQPath().getName();

      List<ValueData> values;

      if (ntManager.isNodeType(Constants.MIX_REFERENCEABLE, curParent().getPrimaryTypeName(), curParent()
         .getMixinTypeNames())
         && qname.equals(Constants.JCR_UUID))
      {
         values = new ArrayList<ValueData>(1);
         values.add(new TransientValueData(curParent().getIdentifier()));
      }
      else
View Full Code Here

               versionStorageData.getOrderNumber(), versionStorageData.getParentIdentifier(), versionStorageData
                  .getACL());
      // .
      // JCR_VERSION_STORAGE_PATH

      InternalQName vhName = new InternalQName(null, versionHistoryIdentifier);

      TransientNodeData versionHistory =
         TransientNodeData.createNodeData(versionStorageData, vhName, Constants.NT_VERSIONHISTORY,
            versionHistoryIdentifier);
View Full Code Here

      int cptype = item.getInt(COLUMN_PTYPE);
      boolean cpmultivalued = item.getBoolean(COLUMN_PMULTIVALUED);

      try
      {
         InternalQName qname = InternalQName.parse(cname);

         QPath qpath = QPath.makeChildPath(parentPath == null ? traverseQPath(cpid) : parentPath, qname);

         PersistedPropertyData pdata =
            new PersistedPropertyData(getIdentifier(cid), qpath, getIdentifier(cpid), cversion, cptype, cpmultivalued,
View Full Code Here

            do
            {
               byte[] mxnb = mtrs.getBytes(COLUMN_VDATA);
               if (mxnb != null)
               {
                  InternalQName mxn = InternalQName.parse(new String(mxnb));
                  mts.add(mxn);

                  if (!privilegeable && Constants.EXO_PRIVILEGEABLE.equals(mxn))
                  {
                     privilegeable = true;
View Full Code Here

   protected PersistedNodeData loadNodeRecord(QPath parentPath, String cname, String cid, String cpid, int cindex,
      int cversion, int cnordernumb, AccessControlList parentACL) throws RepositoryException, SQLException
   {
      try
      {
         InternalQName qname = InternalQName.parse(cname);

         QPath qpath;
         String parentCid;
         if (parentPath != null)
         {
            // get by parent and name
            qpath = QPath.makeChildPath(parentPath, qname, cindex, cid);
            parentCid = cpid;
         }
         else
         {
            // get by id
            if (cpid.equals(Constants.ROOT_PARENT_UUID))
            {
               // root node
               qpath = Constants.ROOT_PATH;
               parentCid = null;
            }
            else
            {
               qpath = QPath.makeChildPath(traverseQPath(cpid), qname, cindex, cid);
               parentCid = cpid;
            }
         }

         // PRIMARY
         ResultSet ptProp = findPropertyByName(cid, Constants.JCR_PRIMARYTYPE.getAsString());
         try
         {

            if (!ptProp.next())
            {
               throw new PrimaryTypeNotFoundException("FATAL ERROR primary type record not found. Node "
                  + qpath.getAsString() + ", id " + cid + ", container " + this.containerName, null);
            }

            byte[] data = ptProp.getBytes(COLUMN_VDATA);
            InternalQName ptName = InternalQName.parse(new String((data != null ? data : new byte[]{})));

            // MIXIN
            MixinInfo mixins = readMixins(cid);

            // ACL
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.