Package org.apache.jackrabbit.commons.cnd

Examples of org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter$DefaultNamespaceMapping


     * @param def the node type definition
     * @return the CND
     */
    private static String getCnd(NodeTypeDefinition def) {
        StringWriter out = new StringWriter();
        CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(out, new CompactNodeTypeDefWriter.NamespaceMapping(){
            @Override
            public String getNamespaceURI(String s) {
                return s;
            }
        }, false);
        try {
            cndWriter.write(def);
        } catch (IOException e) {
            // should never occur
            log.error("Error generating CND of " + def, e);
            throw new IllegalStateException(e);
        }
View Full Code Here


        if (prop == null && ItemResourceConstants.JCR_NODETYPES_CND.equals(name)) {
            StringWriter writer = new StringWriter();
            try {
                Session s = getRepositorySession();

                CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(writer, s, true);
                NodeTypeIterator ntIterator = s.getWorkspace().getNodeTypeManager().getAllNodeTypes();
                while (ntIterator.hasNext()) {
                    cndWriter.write(ntIterator.nextNodeType());
                }
                cndWriter.close();
                /*
                NOTE: avoid having JCR_NODETYPES_CND exposed upon allprop
                      PROPFIND request since it needs to be calculated.
                      nevertheless, this property can be altered using
                      PROPPATCH, which is not consistent with the specification
View Full Code Here

     * @param def the node type definition
     * @return the CND
     */
    private static String getCnd(NodeTypeDefinition def) {
        StringWriter out = new StringWriter();
        CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(out, new CompactNodeTypeDefWriter.NamespaceMapping(){
            @Override
            public String getNamespaceURI(String s) {
                return s;
            }
        }, false);
        try {
            cndWriter.write(def);
        } catch (IOException e) {
            // should never occur
            log.error("Error generating CND of " + def, e);
            throw new IllegalStateException(e);
        }
View Full Code Here

        if (prop == null && ItemResourceConstants.JCR_NODETYPES_CND.equals(name)) {
            StringWriter writer = new StringWriter();
            try {
                Session s = getRepositorySession();

                CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(writer, s, true);
                NodeTypeIterator ntIterator = s.getWorkspace().getNodeTypeManager().getAllNodeTypes();
                while (ntIterator.hasNext()) {
                    cndWriter.write(ntIterator.nextNodeType());
                }
                cndWriter.close();
                /*
                NOTE: avoid having JCR_NODETYPES_CND exposed upon allprop
                      PROPFIND request since it needs to be calculated.
                      nevertheless, this property can be altered using
                      PROPPATCH, which is not consistent with the specification
View Full Code Here

        if (prop == null && ItemResourceConstants.JCR_NODETYPES_CND.equals(name)) {
            StringWriter writer = new StringWriter();
            try {
                Session s = getRepositorySession();

                CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(writer, s, true);
                NodeTypeIterator ntIterator = s.getWorkspace().getNodeTypeManager().getAllNodeTypes();
                while (ntIterator.hasNext()) {
                    cndWriter.write(ntIterator.nextNodeType());
                }
                cndWriter.close();
                /*
                NOTE: avoid having JCR_NODETYPES_CND exposed upon allprop
                      PROPFIND request since it needs to be calculated.
                      nevertheless, this property can be altered using
                      PROPPATCH, which is not consistent with the specification
View Full Code Here

        if (prop == null && ItemResourceConstants.JCR_NODETYPES_CND.equals(name)) {
            StringWriter writer = new StringWriter();
            try {
                Session s = getRepositorySession();

                CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(writer, s, true);
                NodeTypeIterator ntIterator = s.getWorkspace().getNodeTypeManager().getAllNodeTypes();
                while (ntIterator.hasNext()) {
                    cndWriter.write(ntIterator.nextNodeType());
                }
                cndWriter.close();
                /*
                NOTE: avoid having JCR_NODETYPES_CND exposed upon allprop
                      PROPFIND request since it needs to be calculated.
                      nevertheless, this property can be altered using
                      PROPPATCH, which is not consistent with the specification
View Full Code Here

     * @param def the node type definition
     * @return the CND
     */
    private static String getCnd(NodeTypeDefinition def) {
        StringWriter out = new StringWriter();
        CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(out, new CompactNodeTypeDefWriter.NamespaceMapping(){
            @Override
            public String getNamespaceURI(String s) {
                return s;
            }
        }, false);
        try {
            cndWriter.write(def);
        } catch (IOException e) {
            // should never occur
            log.error("Error generating CND of " + def, e);
            throw new IllegalStateException(e);
        }
View Full Code Here

     * @param def the node type definition
     * @return the CND
     */
    private static String getCnd(NodeTypeDefinition def) {
        StringWriter out = new StringWriter();
        CompactNodeTypeDefWriter cndWriter = new CompactNodeTypeDefWriter(out, new CompactNodeTypeDefWriter.NamespaceMapping(){
            @Override
            public String getNamespaceURI(String s) {
                return s;
            }
        }, false);
        try {
            cndWriter.write(def);
        } catch (IOException e) {
            // should never occur
            log.error("Error generating CND of " + def, e);
            throw new IllegalStateException(e);
        }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefWriter$DefaultNamespaceMapping

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.