Esempio n. 1
0
  private void processHiddenAttributes(
      Session session, Element element, HashMap additionalInformation) {

    //        session.clearRegionsOfInterest();
    NodeList elements = element.getChildNodes();
    if (elements.getLength() > 0) {
      Set<String> attributes = new HashSet();
      for (int i = 0; i < elements.getLength(); i++) {
        Node childNode = elements.item(i);
        if (childNode.getNodeName().equals(IGVSessionReader.SessionElement.ATTRIBUTE.getText())) {
          attributes.add(
              ((Element) childNode).getAttribute(IGVSessionReader.SessionAttribute.NAME.getText()));
        }
      }
      session.setHiddenAttributes(attributes);
    }
  }
Esempio n. 2
0
  /**
   * For backward compatibility
   *
   * @param session
   * @param element
   * @param additionalInformation
   */
  private void processVisibleAttributes(
      Session session, Element element, HashMap additionalInformation) {

    //        session.clearRegionsOfInterest();
    NodeList elements = element.getChildNodes();
    if (elements.getLength() > 0) {
      Set<String> visibleAttributes = new HashSet();
      for (int i = 0; i < elements.getLength(); i++) {
        Node childNode = elements.item(i);
        if (childNode
            .getNodeName()
            .equals(IGVSessionReader.SessionElement.VISIBLE_ATTRIBUTE.getText())) {
          visibleAttributes.add(
              ((Element) childNode).getAttribute(IGVSessionReader.SessionAttribute.NAME.getText()));
        }
      }

      final List<String> attributeNames = AttributeManager.getInstance().getAttributeNames();
      Set<String> hiddenAttributes = new HashSet<String>(attributeNames);
      hiddenAttributes.removeAll(visibleAttributes);
      session.setHiddenAttributes(hiddenAttributes);
    }
  }