Package java.util

Examples of java.util.Properties.propertyNames()


    catch (Exception e) {
      props = new Properties();
      e.printStackTrace();
    }
   
    enm = props.propertyNames();
    while (enm.hasMoreElements()) {
      name  = enm.nextElement().toString();
      value = props.getProperty(name, "");
     
      registerEditor(name, value);
View Full Code Here


      BufferedInputStream bi = new BufferedInputStream(new FileInputStream(propsFile));
      editorProps.load(bi);
      bi.close();
      bi = null;
     
      Enumeration enm = editorProps.propertyNames();
      while (enm.hasMoreElements()) {
        String name = enm.nextElement().toString();
        String value = editorProps.getProperty(name, "");
        System.err.println("Registering " + name + " " +value);
        GenericObjectEditor.registerEditor(name, value);
View Full Code Here

       
        VISIBLE_PERSPECTIVES = new TreeSet<String>();
        try {

          Properties visible = Utils.readProperties(VISIBLE_PERSPECTIVES_PROPERTIES_FILE);
          Enumeration keys = (java.util.Enumeration)visible.propertyNames();
          if (keys.hasMoreElements()) {
            String listedPerspectives =
              visible.getProperty("weka.gui.beans.KnowledgeFlow.SelectedPerspectives");
            if (listedPerspectives != null && listedPerspectives.length() > 0) {
              // split up the list of user selected perspectives and populate
View Full Code Here

        } else {
          // Read the static information from the GenericObjectEditor.props
          GEOProps = Utils.readProperties("weka/gui/GenericObjectEditor.props");
        }
      }
      Enumeration en = GEOProps.propertyNames();
      while (en.hasMoreElements()) {
        String geoKey = (String)en.nextElement();
        //  System.err.println("GEOKey " + geoKey);

        // try to match this key with one in the Beans.props file
View Full Code Here

      m_configAndPerspectives.setLayout(new BorderLayout());
      m_configAndPerspectives.add(m_perspectiveToolBar, BorderLayout.CENTER);
     
      try {
        Properties visible = Utils.readProperties(VISIBLE_PERSPECTIVES_PROPERTIES_FILE);
        Enumeration keys = (java.util.Enumeration)visible.propertyNames();
        if (keys.hasMoreElements()) {

          String toolBarIsVisible =
            visible.getProperty("weka.gui.beans.KnowledgeFlow.PerspectiveToolBarVisisble");
          if (toolBarIsVisible != null && toolBarIsVisible.length() > 0) {
View Full Code Here

        }

        Properties namespaceDeclarations = descriptor.getNamespaceURIs();
        if (namespaceDeclarations != null){
            str.append(" (namespaces "); //$NON-NLS-1$
            Enumeration e = namespaceDeclarations.propertyNames();
            while (e.hasMoreElements()){
                String prefix = (String)e.nextElement();
                str.append(prefix);
                str.append("=>"); //$NON-NLS-1$
                str.append(namespaceDeclarations.getProperty(prefix));
View Full Code Here

        }

        Properties namespaceDeclarations = descriptor.getNamespaceURIs();
        if(namespaceDeclarations != null) {
            List<String> nsDecl = new ArrayList<String>(namespaceDeclarations.size());
            Enumeration e = namespaceDeclarations.propertyNames();
            while (e.hasMoreElements()){
                String prefix = (String)e.nextElement();
                String ns = namespaceDeclarations.getProperty(prefix);
                nsDecl.add(prefix + "=\"" + ns + "\""); //$NON-NLS-1$ //$NON-NLS-2$
            }
View Full Code Here

          bundle.load(is);
          is.close();
        } else {
          throw new IOException("Properties file " + propertyName  + " not available");
        }
        Enumeration<?> propertyNames = bundle.propertyNames();
        while (propertyNames.hasMoreElements()) {
          String key = (String) propertyNames.nextElement();
          String value = bundle.getProperty(key);
          groupListMap.put(key, Arrays.asList(value.split(",")));
          System.out.print("Loaded user " + key + ":");
View Full Code Here

    public static Context getInitialContext(JMSAddressPolicyType addrType) throws NamingException {
        Properties env = new Properties();
        populateContextEnvironment(addrType, env);

        if (LOG.isLoggable(Level.FINE)) {
            Enumeration props = env.propertyNames();

            while (props.hasMoreElements()) {
                String name = (String)props.nextElement();
                String value = env.getProperty(name);
                LOG.log(Level.FINE, "Context property: " + name + " | " + value);
View Full Code Here

         }

        // 2. Read system environment, e.g. java -Dname=joe
        if (scanSystemProperties == true) {
         Properties env = System.getProperties();
         for (Enumeration e = env.propertyNames(); e.hasMoreElements();) {
            String key = (String) e.nextElement();
            String value = System.getProperty(key);
            properties.put(key, value);
            fireChangeEvent(key, null, value);
         }
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.