Package org.apache.jackrabbit.name

Examples of org.apache.jackrabbit.name.QName


                        if (literal.getId() == JJTSTRINGLITERAL) {
                            String value = literal.getValue();
                            // strip quotes
                            value = value.substring(1, value.length() - 1);
                            if (!value.equals("*")) {
                                QName name = null;
                                try {
                                    name = ISO9075.decode(NameFormat.parse(value, resolver));
                                } catch (IllegalNameException e) {
                                    exceptions.add(new InvalidQueryException("Illegal name: " + value));
                                } catch (UnknownPrefixException e) {
View Full Code Here


            if (child.getId() == JJTQNAMELPAR) {
                // function name
                // cut off left parenthesis at end
                propName = propName.substring(0, propName.length() - 1);
            }
            QName name = ISO9075.decode(NameFormat.parse(propName, resolver));
            spec = new OrderQueryNode.OrderSpec(name, true);
            queryNode.addOrderSpec(spec);
        } catch (IllegalNameException e) {
            exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue()));
        } catch (UnknownPrefixException e) {
View Full Code Here

        OrderQueryNode.OrderSpec[] specs = node.getOrderSpecs();
        String comma = "";
        try {
            for (int i = 0; i < specs.length; i++) {
                sb.append(comma);
                QName prop = ISO9075.encode(specs[i].getProperty());
                sb.append(" @").append(NameFormat.format(prop, resolver));
                if (!specs[i].isAscending()) {
                    sb.append(" descending");
                }
                comma = ",";
View Full Code Here

    public Set getNodeTypes(NodeTypeManagerImpl ntMgr) {
        if (allTypes == null) {
            Set tmp = new HashSet();
            tmp.add(nodeType);
            for (Iterator it = mixins.iterator(); it.hasNext(); ) {
                QName mixinName = (QName) it.next();
                try {
                    tmp.add(ntMgr.getNodeType(mixinName));
                } catch (NoSuchNodeTypeException e) {
                    log.warn("Unknown node type: " + mixinName);
                }
View Full Code Here

                if (reordered.size() > 0) {
                    // create a node removed and a node added event for every
                    // reorder
                    for (Iterator ro = reordered.iterator(); ro.hasNext();) {
                        NodeState.ChildNodeEntry child = (NodeState.ChildNodeEntry) ro.next();
                        QName name = child.getName();
                        int index = (child.getIndex() != 1) ? child.getIndex() : 0;
                        Path parentPath = getPath(n.getNodeId(), hmgr);
                        Path.PathElement addedElem = Path.create(name, index).getNameElement();
                        // get removed index
                        NodeState overlayed = (NodeState) n.getOverlayedState();
View Full Code Here

            /**
             * first check if relPath is just a name (in which case we don't
             * have to build & resolve absolute path)
             */
            if (relPath.indexOf('/') == -1) {
                QName propName = NameFormat.parse(relPath, session.getNamespaceResolver());
                // check if property entry exists
                NodeState thisState = (NodeState) state;
                if (thisState.hasPropertyName(propName)) {
                    return new PropertyId(thisState.getNodeId(), propName);
                } else {
View Full Code Here

    protected PropertyImpl getOrCreateProperty(String name, int type,
                                               boolean multiValued,
                                               boolean exactTypeMatch,
                                               BitSet status)
            throws ConstraintViolationException, RepositoryException {
        QName qName;
        try {
            qName = NameFormat.parse(name, session.getNamespaceResolver());
        } catch (IllegalNameException ine) {
            throw new RepositoryException("invalid property name: " + name, ine);
        } catch (UnknownPrefixException upe) {
View Full Code Here

        NodeState thisState = (NodeState) getOrCreateTransientItemState();
        thisState.renameChildNodeEntry(oldName, index, newName);
    }

    protected void removeChildProperty(String propName) throws RepositoryException {
        QName qName;
        try {
            qName = NameFormat.parse(propName, session.getNamespaceResolver());
        } catch (IllegalNameException ine) {
            throw new RepositoryException("invalid property name: "
                    + propName, ine);
View Full Code Here

        // remove properties
        // use temp set to avoid ConcurrentModificationException
        HashSet tmp = new HashSet(thisState.getPropertyNames());
        for (Iterator iter = tmp.iterator(); iter.hasNext();) {
            QName propName = (QName) iter.next();
            // remove the property entry
            thisState.removePropertyName(propName);
            // remove property
            PropertyId propId = new PropertyId(thisState.getNodeId(), propName);
            itemMgr.getItem(propId).setRemoved();
View Full Code Here

    protected NodeImpl internalAddNode(String relPath, NodeTypeImpl nodeType,
                                       NodeId id)
            throws ItemExistsException, PathNotFoundException, VersionException,
            ConstraintViolationException, LockException, RepositoryException {
        Path nodePath;
        QName nodeName;
        Path parentPath;
        try {
            nodePath =
                    PathFormat.parse(getPrimaryPath(), relPath,
                            session.getNamespaceResolver()).getCanonicalPath();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.name.QName

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.