Last update: 2011-06-23

org.proteios.io.mzdata
Class MzDataExpCommonAnnotation

java.lang.Object
  extended by org.proteios.io.mzdata.MzDataExpCommon
      extended by org.proteios.io.mzdata.MzDataExpCommonDc
          extended by org.proteios.io.mzdata.MzDataExpCommonAnnotation
Direct Known Subclasses:
MzDataExpCommonPeakList, MzDataExpCommonPeakListSet

public class MzDataExpCommonAnnotation
extends MzDataExpCommonDc

This class supports export of mzData files from Proteios. An mzData file contains information on a mass spectrometry experiment. Given a Proteios peakListSet, MzDataExporter fetches stored data related to this peakListSet and stores it in an mzData file.

Version:
2.0
Author:
Olle
Last modified
$Date: 2006-10-31 11:05:43 +0100 (Tue, 31 Oct 2006) $

Field Summary
 
Fields inherited from class org.proteios.io.mzdata.MzDataExpCommonDc
anna, dc, factory
 
Fields inherited from class org.proteios.io.mzdata.MzDataExpCommon
log
 
Constructor Summary
MzDataExpCommonAnnotation(SessionControl sc)
          Default constructor.
 
Method Summary
 AnnotationType createAddedParamAnnotationType(String atName, Type atType, Item atItem, String addedParamType, String addedParamName, String addedParamValue)
          Creates added parameter annotation type for storing variable values as annotations.
 AnnotationType createAnnotationType(String atName, Type atType, Item atItem)
          Creates annotation type for storing variable values as annotations.
 AnnotationType createCvLookupAnnotationType(String atName, Type atType, Item atItem, String lookupFullName, String lookupVersion)
          Creates cvLookup annotation type for storing variable values as annotations.
 AnnotationType createCvParamAnnotationType(String atName, Type atType, Item atItem, String cvLabel, String accession)
          Creates cvParam annotation type for storing variable values as annotations.
 AnnotationType createUserParamAnnotationType(String atName, Type atType, Item atItem)
          Creates userParam annotation type for storing variable values as annotations.
 AnnotationType fetchAddedParamAnnotationType(String atName, Type atType, Item atItem, String addedParamType, String addedParamName, String addedParamValue)
          Fetches added parameter annotation type for storing variable values as annotations.
 String fetchAnnotation(AnnotationSet as, String atName, Type atType, DbControl argDc)
          Fetches annotation value from annotation for given annotation type.
 CvLookup fetchCvLookupAnnotation(AnnotationSet as, String atName, Type atType, DbControl argDc)
          Fetches annotation value from annotation for given cvLookup annotation type.
 List<CvLookup> fetchCvLookupAnnotationList(AnnotationSet as, Type atType, DbControl argDc)
          Fetches list of cvLookup type annotations.
 AnnotationType fetchCvLookupAnnotationType(String atName, Type atType, Item atItem, String lookupFullName, String lookupVersion)
          Fetches cvLookup annotation type for storing variable values as annotations.
 CvParam fetchCvParamAnnotation(AnnotationSet as, String atName, Type atType, DbControl argDc)
          Fetches annotation value from annotation for given cvParam annotation type.
 List<CvParam> fetchCvParamAnnotationList(AnnotationSet as, Type atType, DbControl argDc)
          Fetches list of cvParam type annotations.
 UserParam fetchUserParamAnnotation(AnnotationSet as, String atName, Type atType, DbControl argDc)
          Fetches annotation value from annotation for given userParam annotation type.
 List<UserParam> fetchUserParamAnnotationList(AnnotationSet as, Type atType, DbControl argDc)
          Fetches list of userParam type annotations.
 AnnotationType obtainAddedParamAnnotationType(String atName, Type atType, Item atItem, String addedParamType, String addedParamName, String addedParamValue)
          Obtains added parameter annotation type for storing variable values as annotations.
 AnnotationType obtainCvLookupAnnotationType(String atName, Type atType, Item atItem, String lookupFullName, String lookupVersion)
          Obtains cvLookup annotation type for storing variable values as annotations.
 void storeAnnotation(AnnotationSet as, String atName, Type atType, Item atItem, String value)
          Stores variable value as annotation.
 void storeCvLookupAnnotation(AnnotationSet as, String lookupCvLabel, Type atType, Item atItem, String lookupFullName, String lookupVersion, String lookupAddress)
          Stores variable values as cvLookup annotation.
 void storeCvParamAnnotation(AnnotationSet as, String atName, Type atType, Item atItem, String value, String cvLabel, String accession)
          Stores variable values as cvParam annotation.
 void storeUserParamAnnotation(AnnotationSet as, String atName, Type atType, Item atItem, String value)
          Stores variable values as userParam annotation.
 
Methods inherited from class org.proteios.io.mzdata.MzDataExpCommonDc
enableAnnotator, enableDbControl, enableDbControl, getDbControl, getSessionControl, setDbControl
 
Methods inherited from class org.proteios.io.mzdata.MzDataExpCommon
getBlockTagName, setBlockTagName, write, writeAttribute, writeEndTag, writeNamespace, writeSimpleElementPair, writeSimpleElementPair, writeSingleElementEnd, writeStartElement, writeStartElementEnd, writeStartListTag, writeStartTag, zeroPad, zeroPad, zeroPad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MzDataExpCommonAnnotation

public MzDataExpCommonAnnotation(SessionControl sc)
Default constructor.

Method Detail

createAnnotationType

public AnnotationType createAnnotationType(String atName,
                                           Type atType,
                                           Item atItem)
Creates annotation type for storing variable values as annotations.

Parameters:
atName - String the name of annotationType
atType - Type the type of the annotationType
atItem - Item the Item the annotationType should be enabled for
Returns:
at AnnotationType the created annotationType

createAddedParamAnnotationType

public AnnotationType createAddedParamAnnotationType(String atName,
                                                     Type atType,
                                                     Item atItem,
                                                     String addedParamType,
                                                     String addedParamName,
                                                     String addedParamValue)
Creates added parameter annotation type for storing variable values as annotations. An added parameter annotation is an annotation, tagged by having annotationtype AddedParameterType set to addedParamType, and where data for addedParamName and addedParamValue are stored as String attributes in the annotationType for the annotation.

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
addedParamType - String the annotation added parameter type as a String
addedParamName - String the annotation added parameter name as a String
addedParamValue - String the annotation added parameter value as a String
Returns:
at AnnotationType the created AnnotationType

fetchAddedParamAnnotationType

public AnnotationType fetchAddedParamAnnotationType(String atName,
                                                    Type atType,
                                                    Item atItem,
                                                    String addedParamType,
                                                    String addedParamName,
                                                    String addedParamValue)
Fetches added parameter annotation type for storing variable values as annotations. This method tries to find an existing added parameter AnnotationType with the desired specifications in the database. If one is found, it is returned, otherwise null. An added parameter annotation is an annotation, tagged by having annotationtype AddedParameterType set to addedParamType, and where data for addedParamName and addedParamValue are stored as String attributes in the annotationType for the annotation.

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
addedParamType - String the annotation added parameter type as a String
addedParamName - String the annotation added parameter name as a String
addedParamValue - String the annotation added parameter value as a String
Returns:
at AnnotationType the fetched annotationType, or null if none is found.

obtainAddedParamAnnotationType

public AnnotationType obtainAddedParamAnnotationType(String atName,
                                                     Type atType,
                                                     Item atItem,
                                                     String addedParamType,
                                                     String addedParamName,
                                                     String addedParamValue)
Obtains added parameter annotation type for storing variable values as annotations. This method tries to find an existing added parameter AnnotationType with the desired specifications in the database. If one is found, it is returned, otherwise one is created. An added parameter annotation is an annotation, tagged by having annotationtype AddedParameterType set to addedParamType, and where data for addedParamName and addedParamValue are stored as String attributes in the annotationType for the annotation.

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
addedParamType - String the annotation added parameter type as a String
addedParamName - String the annotation added parameter name as a String
addedParamValue - String the annotation added parameter value as a String
Returns:
at AnnotationType the obtained AnnotationType

storeAnnotation

public void storeAnnotation(AnnotationSet as,
                            String atName,
                            Type atType,
                            Item atItem,
                            String value)
Stores variable value as annotation.

Parameters:
as - AnnotationSet the AnnotationSet to use
atName - String the name of the annotationType
atType - Type the type of the annotationType
atItem - Item the Item the annotationType should be enabled for
value - String the annotation value as a String

fetchAnnotation

public String fetchAnnotation(AnnotationSet as,
                              String atName,
                              Type atType,
                              DbControl argDc)
Fetches annotation value from annotation for given annotation type.

Parameters:
as - AnnotationSet the AnnotationSet to use
atName - String the name of annotationType
atType - Type the type of the annotationType
argDc - DbControl the DbControl object to use
Returns:
String the annotation value as a String

createCvLookupAnnotationType

public AnnotationType createCvLookupAnnotationType(String atName,
                                                   Type atType,
                                                   Item atItem,
                                                   String lookupFullName,
                                                   String lookupVersion)
Creates cvLookup annotation type for storing variable values as annotations. A cvLookup annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvLookup", and where data for fullName and version are stored as String attributes in the annotationType for the annotation. Data for cvLabel and address are used as name and value for the annotation, as this information is viewable by the user.

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
lookupFullName - String the annotation added parameter name as a String
lookupVersion - String the annotation added parameter value as a String
Returns:
at AnnotationType the created AnnotationType

fetchCvLookupAnnotationType

public AnnotationType fetchCvLookupAnnotationType(String atName,
                                                  Type atType,
                                                  Item atItem,
                                                  String lookupFullName,
                                                  String lookupVersion)
Fetches cvLookup annotation type for storing variable values as annotations. A cvLookup annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvLookup", and where data for fullName and version are stored as String attributes in the annotationType for the annotation. Data for cvLabel and address are used as name and value for the annotation, as this information is viewable by the user.

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
lookupFullName - String the annotation added parameter name as a String
lookupVersion - String the annotation added parameter value as a String
Returns:
at AnnotationType the fetched AnnotationType

obtainCvLookupAnnotationType

public AnnotationType obtainCvLookupAnnotationType(String atName,
                                                   Type atType,
                                                   Item atItem,
                                                   String lookupFullName,
                                                   String lookupVersion)
Obtains cvLookup annotation type for storing variable values as annotations. A cvLookup annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvLookup", and where data for fullName and version are stored as String attributes in the annotationType for the annotation. Data for cvLabel and address are used as name and value for the annotation, as this information is viewable by the user.

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
lookupFullName - String the annotation added parameter name as a String
lookupVersion - String the annotation added parameter value as a String
Returns:
at AnnotationType the obtained AnnotationType

storeCvLookupAnnotation

public void storeCvLookupAnnotation(AnnotationSet as,
                                    String lookupCvLabel,
                                    Type atType,
                                    Item atItem,
                                    String lookupFullName,
                                    String lookupVersion,
                                    String lookupAddress)
Stores variable values as cvLookup annotation. A cvLookup annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvLookup", and where data for fullName and version are stored as String attributes in the annotationType for the annotation. Data for cvLabel and address are used as name and value for the annotation, as this information is viewable by the user.

Parameters:
as - AnnotationSet the AnnotationSet to use
lookupCvLabel - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
lookupFullName - String the annotation added parameter name as a String
lookupVersion - String the annotation added parameter value as a String
lookupAddress - String the annotation value as a String

fetchCvLookupAnnotation

public CvLookup fetchCvLookupAnnotation(AnnotationSet as,
                                        String atName,
                                        Type atType,
                                        DbControl argDc)
Fetches annotation value from annotation for given cvLookup annotation type. A cvLookup annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvLookup", and where data for fullName and version are stored as String attributes in the annotationType for the annotation. Data for cvLabel and address are used as name and value for the annotation, as this information is viewable by the user.

Parameters:
as - AnnotationSet the AnnotationSet to use
atName - String the name of annotationType
atType - Type the type of the annotationType
argDc - DbControl the DbControl object to use
Returns:
CvLookup A CvLookup object with annotation values, or null if not found

fetchCvLookupAnnotationList

public List<CvLookup> fetchCvLookupAnnotationList(AnnotationSet as,
                                                  Type atType,
                                                  DbControl argDc)
Fetches list of cvLookup type annotations. A cvLookup annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvLookup", and where data for fullName and version are stored as String attributes in the annotationType for the annotation. Data for cvLabel and address are used as name and value for the annotation, as this information is viewable by the user.

Parameters:
as - AnnotationSet the AnnotationSet to use
atType - Type the type of the annotationType
argDc - DbControl the DbControl object to use
Returns:
List A list of CvLookup objects with annotation values.

createCvParamAnnotationType

public AnnotationType createCvParamAnnotationType(String atName,
                                                  Type atType,
                                                  Item atItem,
                                                  String cvLabel,
                                                  String accession)
Creates cvParam annotation type for storing variable values as annotations. A cvParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvParam", and where data for cvLabel and accession are stored as String attributes in the annotationType for the annotation.

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
cvLabel - String the annotation cvLabel as a String
accession - String the annotation accession as a String
Returns:
at AnnotationType the created AnnotationType

storeCvParamAnnotation

public void storeCvParamAnnotation(AnnotationSet as,
                                   String atName,
                                   Type atType,
                                   Item atItem,
                                   String value,
                                   String cvLabel,
                                   String accession)
Stores variable values as cvParam annotation. A cvParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvParam", and where data for cvLabel and accession are stored as String attributes in the annotationType for the annotation.

Parameters:
as - AnnotationSet the AnnotationSet to use
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
value - String the annotation value as a String
cvLabel - String the annotation cvLabel as a String
accession - String the annotation accession as a String

fetchCvParamAnnotation

public CvParam fetchCvParamAnnotation(AnnotationSet as,
                                      String atName,
                                      Type atType,
                                      DbControl argDc)
Fetches annotation value from annotation for given cvParam annotation type. A cvParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvParam", and where data for cvLabel and accession are stored as String attributes in the annotationType for the annotation.

Parameters:
as - AnnotationSet the AnnotationSet to use
atName - String the name of annotationType
atType - Type the type of the annotationType
argDc - DbControl the DbControl object to use
Returns:
CvParam A CvParam object with annotation values, or null if not found

fetchCvParamAnnotationList

public List<CvParam> fetchCvParamAnnotationList(AnnotationSet as,
                                                Type atType,
                                                DbControl argDc)
Fetches list of cvParam type annotations. A cvParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "cvParam", and where data for cvLabel and accession are stored as String attributes in the annotationType for the annotation.

Parameters:
as - AnnotationSet the AnnotationSet to use
atType - Type the type of the annotationType
argDc - DbControl the DbControl object to use
Returns:
List A list of CvParam objects with annotation values.

createUserParamAnnotationType

public AnnotationType createUserParamAnnotationType(String atName,
                                                    Type atType,
                                                    Item atItem)
Creates userParam annotation type for storing variable values as annotations. A userParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "userParam".

Parameters:
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
Returns:
at AnnotationType the created AnnotationType

storeUserParamAnnotation

public void storeUserParamAnnotation(AnnotationSet as,
                                     String atName,
                                     Type atType,
                                     Item atItem,
                                     String value)
Stores variable values as userParam annotation. A userParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "userParam".

Parameters:
as - AnnotationSet the AnnotationSet to use
atName - String the name of the AnnotationType
atType - Type the type of the AnnotationType
atItem - Item the Item the AnnotationType should be enabled for
value - String the annotation value as a String

fetchUserParamAnnotation

public UserParam fetchUserParamAnnotation(AnnotationSet as,
                                          String atName,
                                          Type atType,
                                          DbControl argDc)
Fetches annotation value from annotation for given userParam annotation type. A userParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "userParam".

Parameters:
as - AnnotationSet the AnnotationSet to use
atName - String the name of annotationType
atType - Type the type of the annotationType
argDc - DbControl the DbControl object to use
Returns:
UserParam A UserParam object with annotation values, or null if not found

fetchUserParamAnnotationList

public List<UserParam> fetchUserParamAnnotationList(AnnotationSet as,
                                                    Type atType,
                                                    DbControl argDc)
Fetches list of userParam type annotations. A userParam annotation is an annotation, tagged by having annotationtype AddedParameterType set to "userParam".

Parameters:
as - AnnotationSet the AnnotationSet to use
atType - Type the type of the annotationType
argDc - DbControl the DbControl object to use
Returns:
List A list of UserParam objects with annotation values.

Last update: 2011-06-23