Package nz.govt.natlib.meta.ui.tree

Examples of nz.govt.natlib.meta.ui.tree.ObjectFolderNode


    fileCount((BaseNode) fileList.getRoot());

    startTime = System.currentTimeMillis();
    RootNode root = (RootNode) fileList.getRoot();
    for (int i = 0; i < root.getChildCount() && !stopping; i++) {
      ObjectFolderNode object = (ObjectFolderNode) root.getChildAt(i);
      // work out what kind of harvester to use for each object...

      if (!FileModel.hasAFile(object)) {
        LogMessage msg = new LogMessage(LogMessage.DEBUG, object
            .getName(), "Object contains no files - skipping",
            "Add files to this object");
        LogManager.getInstance().logMessage(msg);
        continue;
      }

      String harvesterClass = config.getClassName();
      if (harvesterClass != null) {
        try {
          harvester = (Harvester) Class.forName(harvesterClass)
              .newInstance();
          // go to it...
          System.out.println("Harvesting " + object);
          harvester.harvest(config, object, new PropsManager(object,
              mainFrame), this);
        } catch (Throwable ex) {
          System.out.println("Exception Harvesting " + object);
          LogMessage msg = new LogMessage(LogMessage.ERROR, ex, ex
              .getMessage(), "");
          LogManager.getInstance().logMessage(msg);
          object.setStatus(HarvestStatus.ERROR, ex.getMessage()
              + " (logid=" + msg.getId() + ")");
          error = true;
        }
        System.gc();
      } else {
View Full Code Here


  private void openFiles(BaseNode candidate) {
    LogManager.getInstance().logMessage(LogMessage.WORTHLESS_CHATTER,
        "Adding files to :" + candidate.getName());
    // check if anything can be added to this folder...
    ObjectFolderNode into = null;
    boolean recurse = true;
    boolean flatten = false;
    if (candidate instanceof ObjectFolderNode) {
      into = (ObjectFolderNode) candidate;
      if (into.getType() == ObjectFolderNode.COMPLEX) {
        recurse = true;
        flatten = false;
      }
      if (into.getType() == ObjectFolderNode.SIMPLE) {
        recurse = true;
        flatten = true;
      }
    } else {
      return;
    }
    final ObjectFolderNode reallyInto = into;

    FileDialogUser listener = new FileDialogUser() {
      public void error(Throwable t) {
        Main.this.error(t);
      }
View Full Code Here

        .getLastPathComponent();
    LogManager.getInstance().logMessage(LogMessage.WORTHLESS_CHATTER,
        "Starting property editor for :" + selected.getName());

    if (selected instanceof ObjectFolderNode) {
      ObjectFolderNode node = (ObjectFolderNode) selected;

      // make a window for the property editor
      JDialog propFrame = new JDialog(this, "Properties", true);
      PropertyEditorController editor = new PropertyEditorController(node);
      propFrame.getContentPane().add(editor);
View Full Code Here

    CreateObjectWizard wizard = new CreateObjectWizard(this, newNode);
  }

  protected void addNewComplexObject() {
    resetStatus();
    ObjectFolderNode newNode = new ObjectFolderNode("new complex",
        ObjectFolderNode.COMPLEX);
    ((RootNode) fileList.getRoot()).addNode(newNode);
    beginWizard(newNode);
  }
View Full Code Here

    beginWizard(newNode);
  }

  protected void addNewSimpleObject() {
    resetStatus();
    ObjectFolderNode newNode = new ObjectFolderNode("new simple",
        ObjectFolderNode.SIMPLE);
    ((RootNode) fileList.getRoot()).addNode(newNode);
    beginWizard(newNode);
  }
View Full Code Here

TOP

Related Classes of nz.govt.natlib.meta.ui.tree.ObjectFolderNode

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.