Examples of DefaultConfiguration


Examples of org.apache.any23.configuration.DefaultConfiguration

     * @return returns the {@link ExtractorRegistry} instance.
     */
    public static ExtractorRegistry getInstance() {
        // Thread-safe
        synchronized (ExtractorRegistry.class) {
            final DefaultConfiguration conf = DefaultConfiguration.singleton();
            if (instance == null) {
                instance = new ExtractorRegistry();
                instance.register(RDFXMLExtractor.factory);
                instance.register(TurtleExtractor.factory);
                instance.register(NTriplesExtractor.factory);
                instance.register(NQuadsExtractor.factory);
                instance.register(TriXExtractor.factory);
                if(conf.getFlagProperty("any23.extraction.rdfa.programmatic")) {
                    instance.register(RDFa11Extractor.factory);
                } else {
                    instance.register(RDFaExtractor.factory);
                }
                instance.register(HeadLinkExtractor.factory);
                instance.register(LicenseExtractor.factory);
                instance.register(TitleExtractor.factory);
                instance.register(XFNExtractor.factory);
                instance.register(ICBMExtractor.factory);
                instance.register(AdrExtractor.factory);
                instance.register(GeoExtractor.factory);
                instance.register(HCalendarExtractor.factory);
                instance.register(HCardExtractor.factory);
                instance.register(HListingExtractor.factory);
                instance.register(HResumeExtractor.factory);
                instance.register(HReviewExtractor.factory);
                instance.register(HRecipeExtractor.factory);
                instance.register(SpeciesExtractor.factory);
                instance.register(TurtleHTMLExtractor.factory);
                instance.register(MicrodataExtractor.factory);
                instance.register(CSVExtractor.factory);
                if(conf.getFlagProperty("any23.extraction.head.meta")) {
                    instance.register(HTMLMetaExtractor.factory);
                }
            }
        }
        return instance;
View Full Code Here

Examples of org.apache.avalon.framework.configuration.DefaultConfiguration

{
   public void testAvalonAcceptorManager()
      throws Exception
   {
      final AvalonAcceptorManager manager = new AvalonAcceptorManager();
      final DefaultConfiguration root = new DefaultConfiguration( "root", "" );
      final DefaultConfiguration configuration = new DefaultConfiguration( "shutdownTimeout", "" );
      configuration.setValue( "22" );
      root.addChild( configuration );

      final ConsoleLogger logger = new ConsoleLogger( ConsoleLogger.LEVEL_DISABLED );
      manager.enableLogging( logger );
      final AcceptorMonitor monitor = manager.getMonitor();
View Full Code Here

Examples of org.apache.cayenne.conf.DefaultConfiguration

    /**
     * Sets up Cayenne stack.
     */
    protected void initCayenneStack(Map properties) {
        Configuration cayenneConfig = new DefaultConfiguration(
                Configuration.DEFAULT_DOMAIN_FILE);

        try {
            cayenneConfig.initialize();
            cayenneConfig.didInitialize();
        }
        catch (Exception ex) {
            throw new CayenneRuntimeException("Error starting Cayenne", ex);
        }

        // TODO (Andrus 10/15/2005) this assumes that mapping has a single domain...
        // do something about multiple domains
        this.domain = cayenneConfig.getDomain();
    }
View Full Code Here

Examples of org.apache.harmony.auth.login.DefaultConfiguration

       
        String oldp = System.getProperty(LOGIN_CONFIG);
        try {
        System.setProperty(LOGIN_CONFIG,
                new File(otherConfFile).getCanonicalPath());
        DefaultConfiguration dc = new DefaultConfiguration();
        assertNotNull(dc);
       
        ents = dc.getAppConfigurationEntry("Login2");
        assertNotNull(ents);
        ents = dc.getAppConfigurationEntry("other");
        assertNotNull(ents);
        ents = dc.getAppConfigurationEntry("Login1");
        assertNotNull(ents);
        Map<String, String> m = new HashMap<String, String>();
        for (AppConfigurationEntry element : ents) {
            assertEquals("com.intel.security.auth.module.LoginModule1",
                    element.getLoginModuleName());
            m.clear();
            m.put("debug1", "true");
            m.put("test1", "false");
            assertEquals(m, element.getOptions());
            assertEquals("LoginModuleControlFlag: required", element
                    .getControlFlag().toString());
        }
       
        ents = dc.getAppConfigurationEntry("Login7");
        assertNotNull(ents);

       
        assertEquals("com.intel.security.auth.module.LoginModule1", ents[0].getLoginModuleName());
        assertEquals("com.intel.security.auth.module.LoginModule2", ents[1].getLoginModuleName());
View Full Code Here

Examples of org.apache.logging.log4j.core.config.DefaultConfiguration

    @Setup
    public void setup() {
        final Configuration config = ((LoggerContext) LogManager.getContext()).getConfiguration();
        if (!DefaultConfiguration.DEFAULT_NAME.equals(config.getName())) {
            System.out.println("Configuration was " + config.getName());
            ((LoggerContext) LogManager.getContext()).start(new DefaultConfiguration());
        }
        logger = LogManager.getLogger(SimpleBenchmark.class.getName());
    }
View Full Code Here

Examples of org.codehaus.dna.impl.DefaultConfiguration

    public void testToElementWithBasicConfiguration()
        throws Exception
    {
        final String name = "meep";
        final DefaultConfiguration configuration = new DefaultConfiguration( name, "", "" );
        final Element element = ConfigurationUtil.toElement( configuration );
        assertEquals( "element.getNodeName()", name, element.getNodeName() );

        final NodeList nodeList = element.getChildNodes();
        assertEquals( "nodeList.getLength()", 0, nodeList.getLength() );
View Full Code Here

Examples of org.codehaus.dna.impl.DefaultConfiguration

    public void testToElementWithConfigurationWithValue()
        throws Exception
    {
        final String name = "meep";
        final String value = "blah";
        final DefaultConfiguration configuration = new DefaultConfiguration( name, "", "" );
        configuration.setValue( value );
        final Element element = ConfigurationUtil.toElement( configuration );
        assertEquals( "element.getNodeName()", name, element.getNodeName() );

        final NodeList nodeList = element.getChildNodes();
        assertEquals( "nodeList.getLength()", 1, nodeList.getLength() );
View Full Code Here

Examples of org.codehaus.dna.impl.DefaultConfiguration

    {
        final String name = "meep";
        final String key = "key";
        final String value = "value";

        final DefaultConfiguration configuration = new DefaultConfiguration( name, "", "" );
        configuration.setAttribute( key, value );

        final Element element = ConfigurationUtil.toElement( configuration );
        assertEquals( "element.getNodeName()", name, element.getNodeName() );

        final NodeList nodeList = element.getChildNodes();
View Full Code Here

Examples of org.codehaus.dna.impl.DefaultConfiguration

        throws Exception
    {
        final String name = "meep";
        final String childName = "moop";

        final DefaultConfiguration configuration = new DefaultConfiguration( name, "", "" );
        final DefaultConfiguration child = new DefaultConfiguration( childName, "", "" );
        configuration.addChild( child );

        final Element element = ConfigurationUtil.toElement( configuration );
        assertEquals( "element.getNodeName()", name, element.getNodeName() );
View Full Code Here

Examples of org.codehaus.dna.impl.DefaultConfiguration

    public void testToElementWithSevereError()
        throws Exception
    {
        final String name = "meep";
        final DefaultConfiguration configuration = new DefaultConfiguration( name, "", "" );

        final String property = System.getProperty( DOC_FACTORY );
        try
        {
            System.setProperty( "javax.xml.parsers.DocumentBuilderFactory",
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.