Package org.apache.jackrabbit.vault.fs.spi

Examples of org.apache.jackrabbit.vault.fs.spi.CNDReader


        for (File file: metaDir.listFiles()) {
            if (file.getName().endsWith(".cnd")) {
                Reader r = null;
                try {
                    r = new InputStreamReader(new FileInputStream(file), "utf8");
                    CNDReader reader = ServiceProviderFactory.getProvider().getCNDReader();
                    reader.read(r, file.getName(), null);
                    cnds.add(reader);
                } catch (IOException e) {
                    log.error("Error while reading CND: {}", e.toString());
                    IOException io = new IOException("Error while reading CND.");
                    io.initCause(e);
View Full Code Here


            in = getClass().getResourceAsStream(DEFAULT_NODETYPES);
            if (in == null) {
                throw new InternalError("Could not load " + DEFAULT_NODETYPES + " resource.");
            }
            NodeTypeInstaller installer = ServiceProviderFactory.getProvider().getDefaultNodeTypeInstaller(session);
            CNDReader types = ServiceProviderFactory.getProvider().getCNDReader();
            types.read(new InputStreamReader(in, "utf8"), DEFAULT_NODETYPES, null);
            installer.install(null, types);
        } catch (Throwable e) {
            log.warn("Error while registering nodetypes. Package installation might not work correctly.", e);
        } finally {
            IOUtils.closeQuietly(in);
View Full Code Here

                    inf.setHasDefinition(true);
                    log.debug("Contains package definition {}.", path);
                } else if (name.endsWith(".cnd")) {
                    try {
                        Reader r = new InputStreamReader(new CloseShieldInputStream(zin), "utf8");
                        CNDReader reader = ServiceProviderFactory.getProvider().getCNDReader();
                        reader.read(r, entry.getName(), null);
                        inf.getNodeTypes().add(reader);
                        log.debug("Loaded nodetypes from {}.", path);
                    } catch (IOException e1) {
                        log.error("Error while reading CND: {}", e1.toString());
                        if (strict) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.fs.spi.CNDReader

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.