Record Class MzQC

java.lang.Object
java.lang.Record
org.lifstools.jmzqc.MzQC

public record MzQC(String contactAddress, String contactName, List<ControlledVocabulary> controlledVocabularies, OffsetDateTime creationDate, String description, List<BaseQuality> runQualities, List<BaseQuality> setQualities, String version) extends Record
Root element of an mzQC file.
  • Constructor Details

    • MzQC

      public MzQC(String contactAddress, String contactName, List<ControlledVocabulary> controlledVocabularies, OffsetDateTime creationDate, String description, List<BaseQuality> runQualities, List<BaseQuality> setQualities, String version)
      Creates an instance of a MzQC record class.
      Parameters:
      contactAddress - the value for the contactAddress record component
      contactName - the value for the contactName record component
      controlledVocabularies - the value for the controlledVocabularies record component
      creationDate - the value for the creationDate record component
      description - the value for the description record component
      runQualities - the value for the runQualities record component
      setQualities - the value for the setQualities record component
      version - the value for the version record component
  • Method Details

    • getRunQualityMetrics

      public List<QualityMetric> getRunQualityMetrics(int index)
      Returns a reference to the internal list of quality metrics for the given run. Modifications are reflected in the object graph.
      Parameters:
      index - the zero-based array index of a run.
      Returns:
      the underlying list of qc metrics
      Throws:
      IllegalArgumentException - if arguments are invalid
    • getRunQualityMetricsByAccession

      public List<QualityMetric> getRunQualityMetricsByAccession(int index, String accession)
      Returns a reference to the internal list of quality metrics for the given run. Modifications are reflected in the object graph.
      Parameters:
      index - the zero-based array index of a run.
      accession - the cv accession for qc metrics to return
      Returns:
      the underlying list of qc metrics, filtered for accession
      Throws:
      IllegalArgumentException - if arguments are invalid
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • contactAddress

      public String contactAddress()
      Returns the value of the contactAddress record component.
      Returns:
      the value of the contactAddress record component
    • contactName

      public String contactName()
      Returns the value of the contactName record component.
      Returns:
      the value of the contactName record component
    • controlledVocabularies

      public List<ControlledVocabulary> controlledVocabularies()
      Returns the value of the controlledVocabularies record component.
      Returns:
      the value of the controlledVocabularies record component
    • creationDate

      public OffsetDateTime creationDate()
      Returns the value of the creationDate record component.
      Returns:
      the value of the creationDate record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • runQualities

      public List<BaseQuality> runQualities()
      Returns the value of the runQualities record component.
      Returns:
      the value of the runQualities record component
    • setQualities

      public List<BaseQuality> setQualities()
      Returns the value of the setQualities record component.
      Returns:
      the value of the setQualities record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component