|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpeakml.Annotatable
peakml.io.Header
public class Header
Central header class, collecting all information about the header stored in a mass
spectrometry related file. It acts as a repository for instances of SetInfo,
MeasurementInfo, FileInfo, and SampleInfo. For keeping track
of this information convenience functions are provided. Additionally, the class tracks
the number of peaks, owner, and annotation at the file level.
| Constructor Summary | |
|---|---|
Header()
Constructs a new, empty instance of the header class. |
|
| Method Summary | |
|---|---|
void |
addApplicationInfo(ApplicationInfo application)
Adds the given application information to the header. |
void |
addMeasurementInfo(MeasurementInfo measurement)
Adds the given measurement information to the header. |
void |
addMeasurementInfos(java.util.Collection<MeasurementInfo> measurements)
Adds the given measurement informations to the header. |
void |
addSampleInfo(SampleInfo sample)
Adds the given sample information instance to the header. |
void |
addSetInfo(SetInfo set)
Adds the given set information to the header. |
void |
addSetInfos(java.util.Collection<SetInfo> sets)
Adds the given set informations to the header. |
void |
addVocabulary(Vocabulary vocabulary)
Adds the given vocabulary to the list of vocabularies associated with the header. |
ApplicationInfo |
getApplicationInfo(int index)
Returns the application information with the given id. |
java.util.Vector<ApplicationInfo> |
getApplicationInfos()
Returns the vector with all the application information instances. |
java.util.Date |
getDate()
Returns the date at which the file was created. |
java.lang.String |
getDateAsString()
Returns the date at which the file was created in string format. |
java.lang.String |
getDescription()
Returns an optional description for the information stored in the file. |
MeasurementInfo |
getMeasurementInfo(int id)
Returns the measurement information with the given id. |
java.util.Vector<MeasurementInfo> |
getMeasurementInfos()
Returns the list of measurement informations associated with the header. |
java.util.Vector<MeasurementInfo> |
getMeasurementInfos(SetInfo set)
Returns the list of measurement informations associated to the given set. |
int |
getNrApplicationInfos()
Returns the number of application information instances stored in the header. |
int |
getNrMeasurementInfos()
Returns the number of measurement informations associated with the header. |
int |
getNrPeaks()
Returns the number of peaks associated with this header. |
int |
getNrSampleInfos()
Returns the number of sample information instances associated with the header. |
int |
getNrSetInfos()
Returns the number of set informations stored in the header. |
int |
getNrVocabularies()
Returns the number of vocabularies associated with the header. |
java.lang.String |
getOwner()
Returns the owner of the file. |
SampleInfo |
getSampleInfo(java.lang.String id)
Returns the sample information with the given id. |
java.util.Vector<SampleInfo> |
getSampleInfos()
Returns a list of all the sample information instances associated with the header. |
SetInfo |
getSetInfo(java.lang.String id)
Returns the set information with the given id. |
SetInfo |
getSetInfoForMeasurementID(int measurementid)
Returns the set information which contains the given measurement id. |
java.util.Vector<SetInfo> |
getSetInfos()
Returns all the set informations stored in the header. |
java.util.Vector<Vocabulary> |
getVocabularies()
Returns a list of all vocabularies associated with the header. |
Vocabulary |
getVocabulary(java.lang.String namespace)
Returns the vocabulary of the given namespace. |
int |
indexOfMeasurementInfo(int id)
Returns the index of the measurement information with the given id. |
int |
indexOfMeasurementInfo(java.lang.String label)
Returns the index of the measurement information with the given label. |
int |
indexOfSetInfo(SetInfo setinfo)
Returns the index of the set information with the given id. |
int |
indexOfSetInfo(java.lang.String id)
Returns the index of the set information with the given id. |
void |
setDate(java.util.Date date)
Sets the new date of the file to the given value. |
void |
setDate(java.lang.String date)
Sets the new date of the file to the given value. |
void |
setDescription(java.lang.String description)
Sets an optional description for the information stored in the file. |
void |
setNrPeaks(int nrpeaks)
Sets the number of peaks associated with this header. |
void |
setOwner(java.lang.String owner)
Sets the new owner of the file. |
| Methods inherited from class peakml.Annotatable |
|---|
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotation, addAnnotations, getAnnotation, getAnnotations, removeAllAnnotations, removeAnnotation |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Header()
| Method Detail |
|---|
public int getNrPeaks()
ParserProgressListener and
WriterProgressListener.
public void setNrPeaks(int nrpeaks)
getNrPeaks()
for more information.
nrpeaks - The number of peaks.public java.util.Date getDate()
public java.lang.String getDateAsString()
setDate(Date) for a description of the format used.
public void setDate(java.util.Date date)
date - The new date at which the file was created.
public void setDate(java.lang.String date)
throws java.text.ParseException
date - String representation of the new date
ParseException - Thrown when the string is not encoded in the US (long) localepublic java.lang.String getOwner()
public void setOwner(java.lang.String owner)
owner - The new owner of the PeakML file.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - Optional description of the file contents.public Vocabulary getVocabulary(java.lang.String namespace)
namespace - The namespace of the vocabulary to be retrieved.
public int getNrVocabularies()
public java.util.Vector<Vocabulary> getVocabularies()
public void addVocabulary(Vocabulary vocabulary)
Vocabulary.getDefaultNamespace()). If the namespace has already been registered
the old vocabulary is overwritten.
vocabulary - The vocabulary to be added to the header.public SampleInfo getSampleInfo(java.lang.String id)
id - The id of the sample information.
public int getNrSampleInfos()
public java.util.Vector<SampleInfo> getSampleInfos()
public void addSampleInfo(SampleInfo sample)
SampleInfo.getID()) has already been registered, the old instance
is overwritten.
sample - The sample information to be stored.public MeasurementInfo getMeasurementInfo(int id)
id - The id of the measurement information to be retrieved.public int indexOfMeasurementInfo(int id)
id - The id of the measurement information.
public int indexOfMeasurementInfo(java.lang.String label)
label - The label of the measurement information.
public int getNrMeasurementInfos()
public java.util.Vector<MeasurementInfo> getMeasurementInfos()
public java.util.Vector<MeasurementInfo> getMeasurementInfos(SetInfo set)
public void addMeasurementInfo(MeasurementInfo measurement)
measurement - The measurement information to be added.public void addMeasurementInfos(java.util.Collection<MeasurementInfo> measurements)
measurements - The measurement informations to be added.public void addSetInfo(SetInfo set)
set - The set information to be added.public SetInfo getSetInfo(java.lang.String id)
public int getNrSetInfos()
public java.util.Vector<SetInfo> getSetInfos()
public SetInfo getSetInfoForMeasurementID(int measurementid)
public int indexOfSetInfo(java.lang.String id)
public int indexOfSetInfo(SetInfo setinfo)
public void addSetInfos(java.util.Collection<SetInfo> sets)
sets - The set informations to be added.public void addApplicationInfo(ApplicationInfo application)
application - The application information to be added.public ApplicationInfo getApplicationInfo(int index)
public java.util.Vector<ApplicationInfo> getApplicationInfos()
public int getNrApplicationInfos()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||