Package java.util

Examples of java.util.Properties.propertyNames()


    Properties props = new Properties();

    addProperties(props, mPrefix, Constants.XBUS_ETC);
    addProperties(props, mPrefix, Constants.XBUS_PLUGIN_ETC);

    for (Enumeration e = props.propertyNames(); e.hasMoreElements();)
    {
      key = (String) e.nextElement();
      value = props.getProperty(key);
      cacheKeys = splitKey(key);
      cache = putCache(cache, cacheKeys, value);
View Full Code Here


      }
      finally {
        stream.close();
      }

      Enumeration<?> names = prop.propertyNames();
      while (names.hasMoreElements()) {
        String name = names.nextElement().toString();
        URL url = cl.getResource(name);
        if (url == null) {
          logger.warn("{} not found", name);
View Full Code Here

    Enumeration<URL> schemas = cl.getResources(resource);

    while (schemas.hasMoreElements()) {
      Properties prop = new Properties();
      prop.load(schemas.nextElement().openStream());
      Enumeration<?> names = prop.propertyNames();

      while (names.hasMoreElements()) {
        String name = names.nextElement().toString();

        URL url = cl.getResource(name);
View Full Code Here

    }

    protected String[] getDefaultExcludedNamespaces(String excludeProps) {
        List<String> result = new ArrayList<String>();
        Properties props = loadProperties(excludeProps);
        java.util.Enumeration nexcludes = props.propertyNames();

        while (nexcludes.hasMoreElements()) {
            result.add(props.getProperty((String)nexcludes.nextElement()));
        }
        return result.toArray(new String[result.size()]);
View Full Code Here

                        .getPersistenceProviderClassName());
            } else {
                logger.debug("Found a default configuration for the persistence provider {0}", jPersistenceunitInfo
                        .getPersistenceProviderClassName());
                Properties defaultProperties = providerDefaultConf.getProperties();
                Enumeration<?> providerPropertiesEnum = defaultProperties.propertyNames();
                while (providerPropertiesEnum.hasMoreElements()) {
                    String key = (String) providerPropertiesEnum.nextElement();
                    String value = defaultProperties.getProperty(key);
                    // set the value on the provider info
                    if (jPersistenceunitInfo.getProperties().getProperty(key) == null) {
View Full Code Here

                }
            }

            // Now extract configuration of each persistence provider
            Properties providersProperties = pInfo.getProperties();
            Enumeration<?> providerNames = providersProperties.propertyNames();
            while (providerNames.hasMoreElements()) {
                String providerName = (String) providerNames.nextElement();

                // check if there is an existing provider, else create it
                JPersistenceUnitInfo existingProviderInfo = providersInfo.get(providerName);
View Full Code Here

                    }
                    JPersistenceUnitInfo providerInfo = providerPersistenceunitInfos[0];

                    // get provider info and set values
                    Properties providerProperties = providerInfo.getProperties();
                    Enumeration<?> providerPropertiesEnum = providerProperties.propertyNames();
                    while (providerPropertiesEnum.hasMoreElements()) {
                        String key = (String) providerPropertiesEnum.nextElement();
                        String value = providerProperties.getProperty(key);
                        // set the value on the provider info
                        existingProviderInfo.getProperties().setProperty(key, value);
View Full Code Here

  try { props.load(new BufferedInputStream(new FileInputStream(Constants.DOCTYPES_FILE))); }
  catch ( IOException e) { ctRef.cleanUp("Could not open " + Constants.DOCTYPES_FILE + " " + e.getMessage()); }

  //*-- load the types of media from the docTypes properties file
  docTypes = new String[props.size()]; int i = 0; Integer integerZero = new Integer(0);
  for (Enumeration keys = props.propertyNames(); keys.hasMoreElements(); )
  { String key = (String) keys.nextElement(); stats.put(key, integerZero.toString() );
  docTypes[i++] = key; }
  stats.put("duplicates", integerZero.toString() );
  stats.put("indexed earlier", integerZero.toString() );

View Full Code Here

  catch ( IOException e) { logger.error("Could not open " + Constants.DOCTYPES_FILE + " " + e.getMessage()); }

  //*-- load the types of media from the docTypes properties file
  HashMapOfString stats = new HashMapOfString();
  String[] docTypes = new String[props.size()]; int j = 0;
  for (Enumeration keys = props.propertyNames(); keys.hasMoreElements(); )
  { String key = (String) keys.nextElement(); stats.put(key, "0" );
  docTypes[j++] = key; }

  //*-- scan the database by file name and keep track of the types of files in the index
  DbTools dbt = Constants.getDbt();  
View Full Code Here

        }
        else if ( action.equals( "properties" ) )
        {
            System.out.println( Main.getRes().getString( "Dump System Properties:" ) );
            Properties props = System.getProperties();
            for ( Enumeration en = props.propertyNames(); en.hasMoreElements(); )
            {
                String name = (String)en.nextElement();
                System.out.println( "  " + name + "=" + props.getProperty( name ) );
            }
            System.out.println();
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.