Examples of toJCRName()


Examples of org.apache.jackrabbit.name.QName.toJCRName()

       
        //Skip the first
        for (int i = 1; i < pathElements.length; i++) {
            PathElement currentPathElement = pathElements[i];
            QName qName = ISO9075.encode(currentPathElement.getName());
            String name = qName.toJCRName((NamespaceRegistryImpl) node.getSession().getWorkspace().getNamespaceRegistry());
            System.out.println(name);
           
            buffer.append("/" + name);
        }
       
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

        // primary item name
        QName item = def.getPrimaryItemName();
        if (item != null) {
            builder.setAttribute(
                    Constants.PRIMARYITEMNAME_ATTRIBUTE,
                    item.toJCRName(resolver));
        } else {
            builder.setAttribute(Constants.PRIMARYITEMNAME_ATTRIBUTE, "");
        }

        // supertype declarations
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

        // default primary type
        QName type = def.getDefaultPrimaryType();
        if (type != null) {
            builder.setAttribute(
                    Constants.DEFAULTPRIMARYTYPE_ATTRIBUTE,
                    type.toJCRName(resolver));
        } else {
            builder.setAttribute(Constants.DEFAULTPRIMARYTYPE_ATTRIBUTE, "");
        }

        // required primary types
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

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

Examples of org.apache.jackrabbit.name.QName.toJCRName()

     */
    public String getPrimaryItemName() {
        try {
            QName piName = ntd.getPrimaryItemName();
            if (piName != null) {
                return piName.toJCRName(nsResolver);
            } else {
                return null;
            }
        } catch (NoPrefixDeclaredException npde) {
            // should never get here
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

                } else {
                    // then this is a node != the root node
                    // will never match anything!
                    String name = "";
                    try {
                        name = nameTest.toJCRName(nsMappings);
                    } catch (NoPrefixDeclaredException e) {
                        exceptions.add(e);
                    }
                    BooleanQuery and = new BooleanQuery();
                    and.add(new TermQuery(new Term(FieldNames.PARENT, "")), true, false);
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

     */
    public String translatePropertyName(String name, NamespaceResolver resolver)
            throws IllegalNameException, UnknownPrefixException {
        QName qName = QName.fromJCRName(name, resolver);
        try {
            return qName.toJCRName(this);
        } catch (NoPrefixDeclaredException e) {
            // should never happen actually, because we create yet unknown
            // uri mappings on the fly.
            throw new IllegalNameException("Internal error.", e);
        }
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

     */
    public String getPrimaryItemName() {
        try {
            QName piName = ntd.getPrimaryItemName();
            if (piName != null) {
                return piName.toJCRName(nsResolver);
            } else {
                return null;
            }
        } catch (NoPrefixDeclaredException npde) {
            // should never get here
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

        // primary item name
        QName item = def.getPrimaryItemName();
        if (item != null) {
            builder.setAttribute(
                    Constants.PRIMARYITEMNAME_ATTRIBUTE,
                    item.toJCRName(resolver));
        } else {
            builder.setAttribute(Constants.PRIMARYITEMNAME_ATTRIBUTE, "");
        }

        // supertype declarations
View Full Code Here

Examples of org.apache.jackrabbit.name.QName.toJCRName()

        // default primary type
        QName type = def.getDefaultPrimaryType();
        if (type != null) {
            builder.setAttribute(
                    Constants.DEFAULTPRIMARYTYPE_ATTRIBUTE,
                    type.toJCRName(resolver));
        } else {
            builder.setAttribute(Constants.DEFAULTPRIMARYTYPE_ATTRIBUTE, "");
        }

        // required primary types
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.