Package org.gumtree.data.interfaces

Examples of org.gumtree.data.interfaces.IGroup


  protected void displayNodeInfos(Object userObject) {
    String resultString = null;
    if (userObject != null) {
      if (userObject instanceof IGroup) {
        IGroup group = (IGroup) userObject;
        List<IAttribute> attributes = group.getAttributeList();
        String attributeString = getAttributesString(attributes);
        resultString = attributeString;
      }
      else if (userObject instanceof IDataItem) {
        IDataItem di = (IDataItem) userObject;
View Full Code Here


  private void buildFilteredTree(String filterKey, GumTreeNode fileNode) {

    fileNode.removeAllChildren();

    if ("".equals(filterKey)) {
      IGroup fileGroup = (IGroup) fileNode.getUserObject();

      // Get all groups directly belonging to the current node
      for (IGroup childGroup : fileGroup.getGroupList()) {
        addGroupNode(fileNode, childGroup);
      }

      // Get all data nodes (means NeXus dataset) sons of currently opened node
      GumTreeNode itemNode;
      for (IDataItem item : fileGroup.getDataItemList()) {
        itemNode = new GumTreeNode(item);
        fileNode.add(itemNode);
      }
    }
    else {
      IGroup fileGroup = (IGroup) fileNode.getUserObject();

      IDictionary dictionary = fileGroup.findDictionary();

      // TODO pas sûr, c'est pas encore implémenté
      String path;
      Object objectByPath;
      for (String key : dictionary.getAllKeys()) {
        if (key.contains(filterKey)) {
          path = dictionary.getPath(key);
          objectByPath = fileGroup.findObjectByPath(path);
          if (objectByPath instanceof IDataItem) {
            fileNode.add(new GumTreeNode(objectByPath));
          }
        }
      }
View Full Code Here

      // TODO Auto-generated catch block
      e.printStackTrace();
    }

    // Get the file root
    IGroup rootGroup = dataset.getRootGroup();

    GumTreeNode nodeRoot = (GumTreeNode) treeModel.getRoot();

    addGroupNode(nodeRoot, rootGroup);
View Full Code Here

TOP

Related Classes of org.gumtree.data.interfaces.IGroup

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.