Package org.jboss.dna.cnd

Examples of org.jboss.dna.cnd.CndImporter$Parser


        super.setUp();
        WorkspaceImpl wsp = (WorkspaceImpl) superuser.getWorkspace();
        QueryManagerImpl qm = (QueryManagerImpl) wsp.getQueryManager();
        QueryObjectModelFactoryImpl factory = (QueryObjectModelFactoryImpl) qm
                .getQOMFactory();
        parser = new Parser(factory, superuser.getValueFactory());
    }
View Full Code Here


  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

  private ManifestParseTree parse(InputStream inputStream) throws IOException, TokenizerException, ParserException {
    Preprocessor preprocessor = new ManifestPreprocessor();
    List<InputLine> contents = preprocessor.process(inputStream);
    Tokenizer tokenizer = new ManifestTokenizer(contents);

    Parser parser = new ManifestParser();
    return parser.parse(tokenizer);
  }
View Full Code Here

        }

        public RepositoryDefinition<ReturnType> addNodeTypes( File file ) {
            CheckArg.isNotNull(file, "file");
            if (file.exists() && file.canRead()) {
                CndImporter importer = createCndImporter();
                try {
                    Set<Namespace> namespacesBefore = batch.getGraph().getContext().getNamespaceRegistry().getNamespaces();
                    importer.importFrom(file, getProblems());

                    // Record any new namespaces added by this import ...
                    registerNewNamespaces(namespacesBefore);
                } catch (IOException e) {
                    throw new DnaConfigurationException(e);
View Full Code Here

            InputStream stream = null;
            boolean foundError = false;
            try {
                Set<Namespace> namespacesBefore = batch.getGraph().getContext().getNamespaceRegistry().getNamespaces();
                stream = url.openStream();
                CndImporter importer = createCndImporter();
                importer.importFrom(stream, getProblems(), url.toString());

                // Record any new namespaces added by this import ...
                registerNewNamespaces(namespacesBefore);
            } catch (IOException e) {
                foundError = true;
View Full Code Here

            }
            return this;
        }

        public RepositoryDefinition<ReturnType> addNodeTypes( InputStream cndContent ) {
            CndImporter importer = createCndImporter();
            try {
                Set<Namespace> namespacesBefore = batch.getGraph().getContext().getNamespaceRegistry().getNamespaces();
                importer.importFrom(cndContent, getProblems(), "stream");

                // Record any new namespaces added by this import ...
                registerNewNamespaces(namespacesBefore);
            } catch (IOException e) {
                throw new DnaConfigurationException(e);
View Full Code Here

            // Now set up the destination, but make it so that ...
            Destination destination = new GraphBatchDestination(batch, true); // will NOT be executed

            // And create the importer that will load the CND content into the repository ...
            return new CndImporter(destination, nodeTypesPath);
        }
View Full Code Here

        }

        public RepositoryDefinition<ReturnType> addNodeTypes( File file ) {
            CheckArg.isNotNull(file, "file");
            if (file.exists() && file.canRead()) {
                CndImporter importer = createCndImporter();
                try {
                    Set<Namespace> namespacesBefore = batch.getGraph().getContext().getNamespaceRegistry().getNamespaces();
                    importer.importFrom(file, getProblems());

                    // Record any new namespaces added by this import ...
                    registerNewNamespaces(namespacesBefore);
                } catch (IOException e) {
                    throw new DnaConfigurationException(e);
View Full Code Here

            InputStream stream = null;
            boolean foundError = false;
            try {
                Set<Namespace> namespacesBefore = batch.getGraph().getContext().getNamespaceRegistry().getNamespaces();
                stream = url.openStream();
                CndImporter importer = createCndImporter();
                importer.importFrom(stream, getProblems(), url.toString());

                // Record any new namespaces added by this import ...
                registerNewNamespaces(namespacesBefore);
            } catch (IOException e) {
                foundError = true;
View Full Code Here

            }
            return this;
        }

        public RepositoryDefinition<ReturnType> addNodeTypes( InputStream cndContent ) {
            CndImporter importer = createCndImporter();
            try {
                Set<Namespace> namespacesBefore = batch.getGraph().getContext().getNamespaceRegistry().getNamespaces();
                importer.importFrom(cndContent, getProblems(), "stream");

                // Record any new namespaces added by this import ...
                registerNewNamespaces(namespacesBefore);
            } catch (IOException e) {
                throw new DnaConfigurationException(e);
View Full Code Here

TOP

Related Classes of org.jboss.dna.cnd.CndImporter$Parser

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.