Examples of buildFromFile()


Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

    Hierarchy hier = Hierarchy.getDefaultHierarchy();
    LogKitLoggerManager manager = new LogKitLoggerManager(null, hier, null, null);

    DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
    try {
      Configuration c = builder.buildFromFile(cfg);
      Context ctx = new DefaultContext();
      manager.contextualize(ctx);
      manager.configure(c);
    } catch (IllegalArgumentException e) {
      // This happens if the default log-target id-ref specifies a non-existent target
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        String pathMapperClassName = null;
        String documentBuilderClassName = null;

        try {
            config = builder.buildFromFile(configFile);

            try {
                pathMapperClassName = config.getChild(ELEMENT_PATH_MAPPER).getValue();
                Class pathMapperClass = Class.forName(pathMapperClassName);
                this.mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance();
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        getLogger().debug(".act(): Creator : " + creator.getClass().getName());

        // Init creator
        // "Read" the configuration from the DOM node
        DefaultConfigurationBuilder defaultConfigBuilder = new DefaultConfigurationBuilder();
        Configuration[] docTypeConfigs = defaultConfigBuilder.buildFromFile(absoluteDoctypesPath +
                "doctypes.xconf").getChildren();

        Configuration doctypeConf = null;

        for (int i = 0; i < docTypeConfigs.length; i++) {
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

                String logKitLogCategory = child.getAttribute("category", "cocoon");

                if (logKit != null) {
                    try {
                        final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
                        final Configuration logKitConf = builder.buildFromFile(logKit);
                        this.logKitLoggerManager = new LogKitLoggerManager(Hierarchy.getDefaultHierarchy());

                        final DefaultContext subcontext = new DefaultContext(this.ctx);
                        File contextDir = (File) this.ctx.get("context-root");
                        subcontext.put("context-root", contextDir);
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        Configuration config;

        String pathMapperClassName = null;

        try {
            config = builder.buildFromFile(configFile);

            this.name = config.getChild(ELEMENT_NAME).getValue();

            try {
                // one sanity check for the proper namespace. we should really
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        Hierarchy hier = Hierarchy.getDefaultHierarchy();
        LogKitLoggerManager manager = new LogKitLoggerManager(null, hier, null, null);

        DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        try {
            Configuration c = builder.buildFromFile(cfg);
            Context ctx = new DefaultContext();
            manager.contextualize(ctx);
            manager.configure(c);
        } catch (IllegalArgumentException e) {
            // This happens if the default log-target id-ref specifies a non-existent target
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

    // Called by ResultCollector#loadExistingFile() if XStream loading fails
    public static void processSamples(String filename, Visualizer visualizer, ResultCollector rc)
    throws SAXException, IOException, ConfigurationException
    {
        DefaultConfigurationBuilder cfgbuilder = new DefaultConfigurationBuilder();
        Configuration savedSamples = cfgbuilder.buildFromFile(filename);
        Configuration[] samples = savedSamples.getChildren();
        final boolean errorsOnly = rc.isErrorLogging();
        final boolean successOnly = rc.isSuccessOnlyLogging();
        for (int i = 0; i < samples.length; i++) {
            SampleResult result = OldSaveService.getSampleResult(samples[i]);
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        builder.setEntityResolver( new MyEntityResolver() );
        File basedir = getWorkDir();
        File testFile = new File( basedir, TEST_PATH );
        File external = new File( testFile, EXTERNAL_FILE_NAME );
        Configuration conf = builder.buildFromFile( external  );
        simpleAssertions( conf );
    }
   
    /**
     * Mock implementation for EntityResolver
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

   * @return the configuration value
   */
  private Configuration getConfiguration(String filename) throws SAXException, IOException, ConfigurationException {
    DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();

    return builder.buildFromFile(filename);
  }

  public void clearVisualizer() {
    // current = -1;
    if (getVisualizer() != null && getVisualizer() instanceof Clearable) {
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.buildFromFile()

        String pathMapperClassName = null;
        String documentBuilderClassName = null;

        try {
            config = builder.buildFromFile(configFile);

            try {
                pathMapperClassName = config.getChild(ELEMENT_PATH_MAPPER).getValue();
                Class pathMapperClass = Class.forName(pathMapperClassName);
                this.mapper = (DocumentIdToPathMapper) pathMapperClass.newInstance();
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.