Package org.apache.jackrabbit.name

Examples of org.apache.jackrabbit.name.QName


            throw new RepositoryException(msg, e);
        }

        NodeDefinitionImpl def;
        try {
            QName nodeTypeName = null;
            if (nodeType != null) {
                nodeTypeName = nodeType.getQName();
            }
            def = getApplicableChildNodeDefinition(nodeName, nodeTypeName);
        } catch (RepositoryException re) {
View Full Code Here


        // defined by the specified mixin type

        // use temp set to avoid ConcurrentModificationException
        HashSet set = new HashSet(thisState.getPropertyNames());
        for (Iterator iter = set.iterator(); iter.hasNext();) {
            QName propName = (QName) iter.next();
            PropertyImpl prop = (PropertyImpl) itemMgr.getItem(
                    new PropertyId(thisState.getNodeId(), propName));
            // check if property has been defined by mixin type (or one of its supertypes)
            NodeTypeImpl declaringNT = (NodeTypeImpl) prop.getDefinition().getDeclaringNodeType();
            if (!entRemaining.includesNodeType(declaringNT.getQName())) {
View Full Code Here

        if (state.getParentId() == null) {
            // this is the root node
            return "";
        }

        QName name = session.getHierarchyManager().getName(id);
        try {
            return NameFormat.format(name, session.getNamespaceResolver());
        } catch (NoPrefixDeclaredException npde) {
            // should never get here...
            String msg = "internal error: encountered unregistered namespace "
                    + name.getNamespaceURI();
            log.debug(msg);
            throw new RepositoryException(msg, npde);
        }
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public boolean isNodeType(String nodeTypeName) throws RepositoryException {
        QName ntName;
        try {
            ntName = NameFormat.parse(nodeTypeName, session.getNamespaceResolver());
        } catch (IllegalNameException ine) {
            throw new RepositoryException("invalid node type name: " + nodeTypeName, ine);
        } catch (UnknownPrefixException upe) {
View Full Code Here

     * {@inheritDoc}
     */
    public void addMixin(String mixinName)
            throws NoSuchNodeTypeException, VersionException,
            ConstraintViolationException, LockException, RepositoryException {
        QName ntName;
        try {
            ntName = NameFormat.parse(mixinName, session.getNamespaceResolver());
        } catch (IllegalNameException ine) {
            throw new RepositoryException("invalid mixin type name: " + mixinName, ine);
        } catch (UnknownPrefixException upe) {
View Full Code Here

     * {@inheritDoc}
     */
    public void removeMixin(String mixinName)
            throws NoSuchNodeTypeException, VersionException,
            ConstraintViolationException, LockException, RepositoryException {
        QName ntName;
        try {
            ntName = NameFormat.parse(mixinName, session.getNamespaceResolver());
        } catch (IllegalNameException ine) {
            throw new RepositoryException("invalid mixin type name: " + mixinName, ine);
        } catch (UnknownPrefixException upe) {
View Full Code Here

            checkLock();
        } catch (LockException le) {
            return false;
        }

        QName ntName;
        try {
            ntName = NameFormat.parse(mixinName, session.getNamespaceResolver());
        } catch (IllegalNameException ine) {
            throw new RepositoryException("invalid mixin type name: "
                    + mixinName, ine);
View Full Code Here

        Query context = null;
        LocationStepQueryNode[] steps = node.getPathSteps();
        if (steps.length > 0) {
            if (node.isAbsolute() && !steps[0].getIncludeDescendants()) {
                // eat up first step
                QName nameTest = steps[0].getNameTest();
                if (nameTest == null) {
                    // this is equivalent to the root node
                    context = new TermQuery(new Term(FieldNames.PARENT, ""));
                } else if (nameTest.getLocalName().length() == 0) {
                    // root node
                    context = new TermQuery(new Term(FieldNames.PARENT, ""));
                } else {
                    // then this is a node != the root node
                    // will never match anything!
View Full Code Here

                                    if (entry == null) {
                                        // no such child node, probably deleted meanwhile
                                        hits.flip(i);
                                    } else {
                                        // only use the last one
                                        QName name = entry.getName();
                                        List childNodes = state.getChildNodeEntries(name);
                                        if (childNodes.size() == 0
                                                || !((NodeState.ChildNodeEntry) childNodes.get(childNodes.size() - 1))
                                                    .getId().equals(id)) {
                                            hits.flip(i);
View Full Code Here

            int len1 = names.length;
            int len2 = other.names.length;
            int len = Math.min(len1, len2);

            for (int i = 0; i < len; i++) {
                QName name1 = names[i];
                QName name2 = other.names[i];
                int result = name1.compareTo(name2);
                if (result != 0) {
                    return result;
                }
            }
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.