java.lang.Object
de.ipk_gatersleben.ag_nw.graffiti.plugins.gui.layout_control.helper_classes.XPathHelper
All Implemented Interfaces:
HelperClass

public class XPathHelper
extends Object
implements HelperClass
Author:
Christian Klukas (c) 2004 IPK-Gatersleben
Recent revisions:
2.7.0
  • Field Details

    • noGivenTimeStringConstant

      public static String noGivenTimeStringConstant
  • Constructor Details

    • XPathHelper

      public XPathHelper()
  • Method Details

    • getSampleCountForSubstanceNode

      public static int getSampleCountForSubstanceNode​(Node n)
    • getLineCountForSubstanceNode

      public static int getLineCountForSubstanceNode​(Node n)
    • getTimeCountForSubstanceNode

      public static int getTimeCountForSubstanceNode​(Node nn)
    • getTimes

      public static String[] getTimes​(Document experimentData)
      Get the possible time values that are stored in an experiment.
      Parameters:
      experimentData -
      Returns:
    • getPlants

      public static String[] getPlants​(Document experimentData)
      Get a list of analyzed plants for the experiment.
      Parameters:
      experimentData -
      Returns:
    • getPlantNodes

      public static ArrayList<Node> getPlantNodes​(Document experimentData)
    • getSubstanceNodes

      public static ArrayList<Node> getSubstanceNodes​(Document document)
    • getChildNode

      public static Node getChildNode​(Node node, String childNodeName)
    • getSumOfValues

      public static String getSumOfValues​(Document mydoc)
    • setTtestInfoSampleIsReference

      public static void setTtestInfoSampleIsReference​(Node sampleNode)
    • getDataList

      public static Double[] getDataList​(Node sampleNode)
    • getSampleTimeValueForComparison

      public static int getSampleTimeValueForComparison​(Node sampleNode)
    • getSampleTime

      public static String getSampleTime​(Node sampleNode)
      Parameters:
      sampleNode -
      Returns:
      The time and time unit from a sample. e.g. "day 1" or "week 2". Returns "" if no time information is avalilable.
    • getSampleTimeUnit

      public static String getSampleTimeUnit​(Node sampleNode)
      Parameters:
      sampleNode -
      Returns:
      The time and time unit from a sample. e.g. "day 1" or "week 2". Returns "" if no time information is avalilable.
    • tTestSetSampleAsReference

      public static void tTestSetSampleAsReference​(Node sampleNode)
      Parameters:
      sampleNode -
    • tTestSetSampleSignificane

      public static void tTestSetSampleSignificane​(Node sampleNode, boolean different)
    • setTTestSetSampleSignificane

      public static void setTTestSetSampleSignificane​(Node sampleNode, boolean different, double level)
    • tTestIsReference

      public static boolean tTestIsReference​(Node sampleNode)
      Parameters:
      samplenode -
      Returns:
    • getSeriesNameForLine

      public static String getSeriesNameForLine​(Node linenode)
      Parameters:
      linenode -
      Returns:
    • getSeriesNameFromSpeciesGenotypeAndTreatment

      public static String getSeriesNameFromSpeciesGenotypeAndTreatment​(String linename, String linegenotype, String linetreatment)
    • ttestIsH1

      public static boolean ttestIsH1​(Node sampleNode)
      Parameters:
      samplenode -
      Returns:
    • getExpAndSeriesName

      public static String getExpAndSeriesName​(String expName, String seriesName)
    • getExperimentNameFromLineNode

      public static String getExperimentNameFromLineNode​(Node linenode)
    • getCoordinatorFromLineNode

      public static String getCoordinatorFromLineNode​(Node linenode)
    • getStartDateFromLineNode

      public static String getStartDateFromLineNode​(Node linenode)
    • getSeriesIDforLine

      public static String getSeriesIDforLine​(Node linenode)
    • processAvailableStdDevSubstanceData

      public static int processAvailableStdDevSubstanceData​(Document mydoc, String substanceStdDevEndID)
      (1) search substance names which end with substanceStdDevEndID (2) for each substance get all experiment/genotype/line/time combinations enclosed extract average sample values (3) use average sample values as sample stddev for corresponding substance/sample data whose substance name is the same as the one mentioned above, but without the trailing substanceStdDevEndID id.
      Parameters:
      mydoc -
      substanceStdDevEndID -
      Returns:
      Number of processed "std-dev substances"
    • isReplicateDataMissing

      public static boolean isReplicateDataMissing​(Document mydoc)
    • getSampleNodes

      public static ArrayList<Node> getSampleNodes​(Document doc, Integer plantID, String substanceID)
    • getDataNodes

      public static ArrayList<Node> getDataNodes​(Document doc, Integer sampleID)
    • getDataVolumeNodes

      public static ArrayList<Node> getDataVolumeNodes​(Document doc, Integer sampleID)
    • getDataNetworkNodes

      public static ArrayList<Node> getDataNetworkNodes​(Document doc, Integer sampleID)
    • getDataImageNodes

      public static ArrayList<Node> getDataImageNodes​(Document doc, Integer sampleID)
    • getMaximumAlternativeIDidx

      public static int getMaximumAlternativeIDidx​(Node xmlSubstanceNode)
      Returns the highest index number of a alternative identifier. Processes all attributes and looks for attribute names that start with "name".
      Parameters:
      xmlSubstanceNode -
      Returns:
      The highest index of a alternative identifier attribute. Returns -1 in case no alternative identifier is currently assigned.
    • getAlternativeIdCount

      public static int getAlternativeIdCount​(Node xmlSubstanceNode, boolean includeEmpty)
    • getAlternativeIDs

      public static ArrayList<String> getAlternativeIDs​(Node xmlSubstanceNode)