Exemple #1
0
  private void processColorScale(Session session, Element element, HashMap additionalInformation) {

    String trackType = getAttribute(element, SessionAttribute.TYPE.getText());
    String value = getAttribute(element, SessionAttribute.VALUE.getText());

    setColorScaleSet(session, trackType, value);

    NodeList elements = element.getChildNodes();
    process(session, elements, additionalInformation);
  }
Exemple #2
0
  private void processPreferences(Session session, Element element, HashMap additionalInformation) {

    NodeList elements = element.getChildNodes();
    for (int i = 0; i < elements.getLength(); i++) {
      Node child = elements.item(i);
      if (child.getNodeName().equalsIgnoreCase(SessionElement.PROPERTY.getText())) {
        Element childNode = (Element) child;
        String name = getAttribute(childNode, SessionAttribute.NAME.getText());
        String value = getAttribute(childNode, SessionAttribute.VALUE.getText());
        session.setPreference(name, value);
      }
    }
  }
Exemple #3
0
  private void processFilterElement(
      Session session, Element element, HashMap additionalInformation) {

    TrackFilter filter = (TrackFilter) additionalInformation.get(SessionElement.FILTER);
    String item = getAttribute(element, SessionAttribute.ITEM.getText());
    String operator = getAttribute(element, SessionAttribute.OPERATOR.getText());
    String value = getAttribute(element, SessionAttribute.VALUE.getText());
    String booleanOperator = getAttribute(element, SessionAttribute.BOOLEAN_OPERATOR.getText());

    TrackFilterElement trackFilterElement =
        new TrackFilterElement(
            filter,
            item,
            Operator.findEnum(operator),
            value,
            BooleanOperator.findEnum(booleanOperator));
    filter.add(trackFilterElement);

    NodeList elements = element.getChildNodes();
    process(session, elements, additionalInformation);
  }