Package nz.govt.natlib.meta.config

Examples of nz.govt.natlib.meta.config.Profile


        AdapterFactory.getInstance().addAdapter(adapterImpl);
        ArrayList profiles = Config.getInstance()
            .getAvailableProfiles();
        Iterator itp = profiles.iterator();
        while (itp.hasNext()) {
          Profile p = (Profile) itp.next();
          p.setAdapter(adapterImpl.getClass().getName(), true);
        }
        ArrayList editprofiles = Config.getEditInstance()
            .getAvailableProfiles();
        Iterator itp2 = editprofiles.iterator();
        while (itp2.hasNext()) {
          Profile p = (Profile) itp2.next();
          p.setAdapter(adapterImpl.getClass().getName(), true);
        }
        Config.getEditInstance().setJarForAdapter(adapterImpl,
            jarFile.getName());
        Config.getInstance().setJarForAdapter(adapterImpl,
            jarFile.getName());
View Full Code Here


  }

  private void createProfile(String name) {
    LogManager.getInstance().logMessage(LogMessage.INFO,
        "Creating profile [" + name + "]");
    Profile p = new Profile();
    p.setName(name);
    p.setInputDirectory(Config.getEditInstance().getBaseHarvestDir());
    p.setLogDirectory(Config.getEditInstance().getLogDirectory());
    Config.getEditInstance().addProfile(p);
    Config.getEditInstance().setCurrentProfile(p);
    refresh();
  }
View Full Code Here

  void profileSelect_itemStateChanged(ItemEvent e) {
    Object profile = profileSelect.getSelectedItem();
    if ((profile != null) && (profile instanceof Profile)
        && (e.getStateChange() == ItemEvent.SELECTED)) {
      Profile prof = (Profile) profile;
      Config.getInstance().setCurrentProfile(prof);
      LogManager.getInstance().logMessage(LogMessage.WORTHLESS_CHATTER,
          "Current profile set to :" + prof.getName());
    }
  }
View Full Code Here

    }
    tableModel.fireTableDataChanged();
  }

  public void saveChanges() {
    Profile curr = Config.getEditInstance().getCurrentProfile();
    for (int i = 0; i < adapters.length; i++) {
      String adapterClass = adapters[i].getClass().getName();
      curr.setAdapter(adapterClass, adaptersOn.containsKey(adapterClass));
    }
  }
View Full Code Here

      boolean recurse, boolean flatten) {
    boolean handled = false;

    ArrayList profiles = Config.getInstance().getAvailableProfiles();
    Iterator pf = profiles.iterator();
    Profile prof = null;
    while (pf.hasNext()) {
      Profile p = (Profile) pf.next();
      if (p.getName().equalsIgnoreCase(profile)) {
        prof = p;
        Config.getInstance().setCurrentProfile(p);
      }
    }
View Full Code Here

    } else if (PROFILE_PARAM.equalsIgnoreCase(param)) {
      System.out.println("Available Profiles");
      ArrayList profiles = Config.getInstance().getAvailableProfiles();
      Iterator it = profiles.iterator();
      while (it.hasNext()) {
        Profile p = (Profile) it.next();
        System.out.println("  Profile:");
        System.out.println("    Name: " + p.getName());
        System.out.println("    Input Directory: "
            + p.getInputDirectory());
        System.out.println("    Log Directory: " + p.getLogDirectory());
        System.out.println("    Adapters switched on:");
        Iterator adapters = p.getAdapterClasses();
        while (adapters.hasNext()) {
          String adClass = (String) adapters.next();
          DataAdapter da = AdapterFactory.getInstance().getAdapter(
              adClass);
          if (da != null) {
View Full Code Here

TOP

Related Classes of nz.govt.natlib.meta.config.Profile

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.