maltcms.datastructures.ms
Class Experiment1D

java.lang.Object
  extended by maltcms.datastructures.ms.Experiment1D
All Implemented Interfaces:
cross.datastructures.fragments.IFileFragment, cross.datastructures.fragments.IFragment, cross.datastructures.fragments.IGroupFragment, cross.datastructures.fragments.IIterableFragment, cross.IConfigurable, cross.io.xml.IXMLSerializable, Externalizable, Serializable, Comparable<Object>, Iterable<cross.datastructures.fragments.IVariableFragment>, Comparator<cross.datastructures.fragments.IFragment>, IExperiment, IExperiment1D
Direct Known Subclasses:
Experiment2D

public class Experiment1D
extends Object
implements IExperiment1D

Concrete implementation of an Experiment containing a 1-dimensional chromatogram.

Author:
Nils.Hoffmann@cebitec.uni-bielefeld.de
See Also:
Serialized Form

Constructor Summary
Experiment1D()
           
Experiment1D(cross.datastructures.fragments.IFileFragment ff1)
           
 
Method Summary
 void addAttribute(Attribute atrbt)
           
 void addChildren(cross.datastructures.fragments.IVariableFragment... fragments)
           
 void addDimensions(Dimension... dims1)
           
 void addSourceFile(Collection<cross.datastructures.fragments.IFileFragment> c)
           
 void addSourceFile(cross.datastructures.fragments.IFileFragment... ff)
           
 void appendXML(org.jdom.Element e)
           
 void clearArrays()
           
 int compare(cross.datastructures.fragments.IFragment arg0, cross.datastructures.fragments.IFragment arg1)
           
 int compareTo(Object arg0)
           
 void configure(org.apache.commons.configuration.Configuration cfg)
           
 boolean equals(Object obj)
           
 String getAbsolutePath()
           
 Attribute getAttribute(Attribute a)
           
 Attribute getAttribute(String name)
           
 List<Attribute> getAttributes()
           
 cross.datastructures.fragments.IVariableFragment getChild(String varname)
           
 cross.datastructures.fragments.IVariableFragment getChild(String varname, boolean loadStructureOnly)
           
 IChromatogram1D getChromatogram()
           
 cross.datastructures.fragments.IFileFragment getFileFragment()
           
 long getID()
           
 HashMap<String,String> getMetadata()
           
 String getMetadata(String key)
           
 String getName()
           
 cross.datastructures.fragments.IGroupFragment getParent()
           
 int getSize()
           
 Collection<cross.datastructures.fragments.IFileFragment> getSourceFiles()
           
 cross.datastructures.StatsMap getStats()
           
 boolean hasAttribute(Attribute a)
           
 boolean hasAttribute(String name)
           
 boolean hasChild(cross.datastructures.fragments.IVariableFragment vf)
           
 boolean hasChild(String varname)
           
 boolean hasChildren(cross.datastructures.fragments.IVariableFragment... vf)
           
 boolean hasChildren(String... s)
           
 boolean isModified()
           
 Iterator<cross.datastructures.fragments.IVariableFragment> iterator()
           
 long nextGID()
           
 void readExternal(ObjectInput in)
           
 void removeChild(cross.datastructures.fragments.IVariableFragment variableFragment)
           
 void removeSourceFile(cross.datastructures.fragments.IFileFragment ff)
           
 void removeSourceFiles()
           
 boolean save()
           
 void setAttributes(Attribute... a)
           
 void setChromatogram(IChromatogram1D c)
           
 void setFile(File f1)
           
 void setFile(String file)
           
 void setFileFragment(cross.datastructures.fragments.IFileFragment ff1)
           
 void setID(long id)
           
 void setMetadata(String key, String value)
           
 void setStats(cross.datastructures.StatsMap stats1)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Experiment1D

public Experiment1D()

Experiment1D

public Experiment1D(cross.datastructures.fragments.IFileFragment ff1)
Method Detail

addChildren

public void addChildren(cross.datastructures.fragments.IVariableFragment... fragments)
Specified by:
addChildren in interface cross.datastructures.fragments.IFileFragment
Specified by:
addChildren in interface cross.datastructures.fragments.IGroupFragment
Parameters:
fragments -
See Also:
IFileFragment.addChildren(cross.datastructures.fragments.IVariableFragment[])

addDimensions

public void addDimensions(Dimension... dims1)
Specified by:
addDimensions in interface cross.datastructures.fragments.IFileFragment
Parameters:
dims1 -
See Also:
IFileFragment.addDimensions(ucar.nc2.Dimension[])

addSourceFile

public void addSourceFile(Collection<cross.datastructures.fragments.IFileFragment> c)
Specified by:
addSourceFile in interface cross.datastructures.fragments.IFileFragment
Parameters:
c -
See Also:
IFileFragment.addSourceFile(java.util.Collection)

addSourceFile

public void addSourceFile(cross.datastructures.fragments.IFileFragment... ff)
Specified by:
addSourceFile in interface cross.datastructures.fragments.IFileFragment
Parameters:
ff -
See Also:
IFileFragment.addSourceFile(cross.datastructures.fragments.IFileFragment[])

appendXML

public void appendXML(org.jdom.Element e)
Specified by:
appendXML in interface cross.datastructures.fragments.IFileFragment
Specified by:
appendXML in interface cross.io.xml.IXMLSerializable
Parameters:
e -
See Also:
IFileFragment.appendXML(org.jdom.Element)

clearArrays

public void clearArrays()
                 throws IllegalStateException
Specified by:
clearArrays in interface cross.datastructures.fragments.IFileFragment
Throws:
IllegalStateException

compare

public int compare(cross.datastructures.fragments.IFragment arg0,
                   cross.datastructures.fragments.IFragment arg1)
Specified by:
compare in interface cross.datastructures.fragments.IFragment
Specified by:
compare in interface Comparator<cross.datastructures.fragments.IFragment>
Parameters:
arg0 -
arg1 -
Returns:
See Also:
IFragment.compare(cross.datastructures.fragments.IFragment, cross.datastructures.fragments.IFragment)

compareTo

public int compareTo(Object arg0)
Specified by:
compareTo in interface cross.datastructures.fragments.IFragment
Specified by:
compareTo in interface Comparable<Object>
Parameters:
arg0 -
Returns:
See Also:
IFragment.compareTo(java.lang.Object)

configure

public void configure(org.apache.commons.configuration.Configuration cfg)
Specified by:
configure in interface cross.IConfigurable

equals

public boolean equals(Object obj)
Specified by:
equals in interface Comparator<cross.datastructures.fragments.IFragment>
Overrides:
equals in class Object
Parameters:
obj -
Returns:
See Also:
Comparator.equals(java.lang.Object)

getAbsolutePath

public String getAbsolutePath()
Specified by:
getAbsolutePath in interface cross.datastructures.fragments.IFileFragment
Returns:
See Also:
IFileFragment.getAbsolutePath()

getAttribute

public Attribute getAttribute(Attribute a)
Specified by:
getAttribute in interface cross.datastructures.fragments.IFragment
Parameters:
a -
Returns:
See Also:
IFragment.getAttribute(ucar.nc2.Attribute)

getAttribute

public Attribute getAttribute(String name)
Specified by:
getAttribute in interface cross.datastructures.fragments.IFragment
Parameters:
name -
Returns:
See Also:
IFragment.getAttribute(java.lang.String)

getAttributes

public List<Attribute> getAttributes()
Specified by:
getAttributes in interface cross.datastructures.fragments.IFragment
Returns:
See Also:
IFragment.getAttributes()

getChild

public cross.datastructures.fragments.IVariableFragment getChild(String varname)
Specified by:
getChild in interface cross.datastructures.fragments.IFileFragment
Specified by:
getChild in interface cross.datastructures.fragments.IGroupFragment
Parameters:
varname -
Returns:
See Also:
IGroupFragment.getChild(java.lang.String)

getChild

public cross.datastructures.fragments.IVariableFragment getChild(String varname,
                                                                 boolean loadStructureOnly)
Specified by:
getChild in interface cross.datastructures.fragments.IFileFragment
Parameters:
varname -
loadStructureOnly -
Returns:
See Also:
IGroupFragment.getChild(String)

getChromatogram

public IChromatogram1D getChromatogram()
Specified by:
getChromatogram in interface IExperiment1D

getFileFragment

public cross.datastructures.fragments.IFileFragment getFileFragment()
Specified by:
getFileFragment in interface IExperiment

getID

public long getID()
Specified by:
getID in interface cross.datastructures.fragments.IFileFragment
Returns:
See Also:
IFileFragment.getID()

getMetadata

public HashMap<String,String> getMetadata()
Specified by:
getMetadata in interface IExperiment

getName

public String getName()
Specified by:
getName in interface cross.datastructures.fragments.IFileFragment
Specified by:
getName in interface cross.datastructures.fragments.IGroupFragment
Returns:
See Also:
IFileFragment.getName()

getParent

public cross.datastructures.fragments.IGroupFragment getParent()
Specified by:
getParent in interface cross.datastructures.fragments.IFileFragment
Specified by:
getParent in interface cross.datastructures.fragments.IGroupFragment
Returns:
See Also:
IFileFragment.getParent()

getSize

public int getSize()
Specified by:
getSize in interface cross.datastructures.fragments.IFileFragment
Specified by:
getSize in interface cross.datastructures.fragments.IGroupFragment
Returns:
See Also:
IFileFragment.getSize()

getSourceFiles

public Collection<cross.datastructures.fragments.IFileFragment> getSourceFiles()
Specified by:
getSourceFiles in interface cross.datastructures.fragments.IFileFragment
Returns:
See Also:
IFileFragment.getSourceFiles()

getStats

public cross.datastructures.StatsMap getStats()
Specified by:
getStats in interface cross.datastructures.fragments.IFragment
Returns:
See Also:
IFragment.getStats()

hasAttribute

public boolean hasAttribute(Attribute a)
Specified by:
hasAttribute in interface cross.datastructures.fragments.IFragment
Parameters:
a -
Returns:
See Also:
IFragment.hasAttribute(ucar.nc2.Attribute)

hasAttribute

public boolean hasAttribute(String name)
Specified by:
hasAttribute in interface cross.datastructures.fragments.IFragment
Parameters:
name -
Returns:
See Also:
IFragment.hasAttribute(java.lang.String)

hasChild

public boolean hasChild(cross.datastructures.fragments.IVariableFragment vf)
Specified by:
hasChild in interface cross.datastructures.fragments.IGroupFragment
Parameters:
vf -
Returns:
See Also:
IGroupFragment.hasChild(cross.datastructures.fragments.IVariableFragment)

hasChild

public boolean hasChild(String varname)
Specified by:
hasChild in interface cross.datastructures.fragments.IGroupFragment
Parameters:
varname -
Returns:
See Also:
IGroupFragment.hasChild(java.lang.String)

hasChildren

public boolean hasChildren(cross.datastructures.fragments.IVariableFragment... vf)
Specified by:
hasChildren in interface cross.datastructures.fragments.IFileFragment
Parameters:
vf -
Returns:
See Also:
IFileFragment.hasChildren(cross.datastructures.fragments.IVariableFragment[])

hasChildren

public boolean hasChildren(String... s)
Specified by:
hasChildren in interface cross.datastructures.fragments.IFileFragment
Parameters:
s -
Returns:
See Also:
IFileFragment.hasChildren(java.lang.String[])

isModified

public boolean isModified()
Specified by:
isModified in interface cross.datastructures.fragments.IFileFragment

iterator

public Iterator<cross.datastructures.fragments.IVariableFragment> iterator()
Specified by:
iterator in interface cross.datastructures.fragments.IFileFragment
Specified by:
iterator in interface Iterable<cross.datastructures.fragments.IVariableFragment>
Returns:
See Also:
IFileFragment.iterator()

nextGID

public long nextGID()
Specified by:
nextGID in interface cross.datastructures.fragments.IGroupFragment
Returns:
See Also:
IGroupFragment.nextGID()

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

removeChild

public void removeChild(cross.datastructures.fragments.IVariableFragment variableFragment)
Specified by:
removeChild in interface cross.datastructures.fragments.IFileFragment
Parameters:
variableFragment -
See Also:
IFileFragment.removeChild(cross.datastructures.fragments.IVariableFragment)

removeSourceFile

public void removeSourceFile(cross.datastructures.fragments.IFileFragment ff)
Specified by:
removeSourceFile in interface cross.datastructures.fragments.IFileFragment
Parameters:
ff -
See Also:
IFileFragment.removeSourceFile(cross.datastructures.fragments.IFileFragment)

removeSourceFiles

public void removeSourceFiles()
Specified by:
removeSourceFiles in interface cross.datastructures.fragments.IFileFragment
See Also:
IFileFragment.removeSourceFiles()

save

public boolean save()
Specified by:
save in interface cross.datastructures.fragments.IFileFragment
Returns:
See Also:
IFileFragment.save()

setAttributes

public void setAttributes(Attribute... a)
Specified by:
setAttributes in interface cross.datastructures.fragments.IFragment
Parameters:
a -
See Also:
IFragment.setAttributes(ucar.nc2.Attribute[])

setChromatogram

public void setChromatogram(IChromatogram1D c)
Specified by:
setChromatogram in interface IExperiment1D

setFile

public void setFile(File f1)
Specified by:
setFile in interface cross.datastructures.fragments.IFileFragment
Parameters:
f1 -
See Also:
IFileFragment.setFile(java.io.File)

setFile

public void setFile(String file)
Specified by:
setFile in interface cross.datastructures.fragments.IFileFragment
Parameters:
file -
See Also:
IFileFragment.setFile(java.lang.String)

setFileFragment

public void setFileFragment(cross.datastructures.fragments.IFileFragment ff1)
Specified by:
setFileFragment in interface IExperiment

setID

public void setID(long id)
Specified by:
setID in interface cross.datastructures.fragments.IGroupFragment
Parameters:
id -
See Also:
IGroupFragment.setID(long)

setMetadata

public void setMetadata(String key,
                        String value)
Specified by:
setMetadata in interface IExperiment

setStats

public void setStats(cross.datastructures.StatsMap stats1)
Specified by:
setStats in interface cross.datastructures.fragments.IFragment
Parameters:
stats1 -
See Also:
IFragment.setStats(cross.datastructures.StatsMap)

toString

public String toString()
Specified by:
toString in interface cross.datastructures.fragments.IFileFragment
Overrides:
toString in class Object
Returns:
See Also:
IFileFragment.toString()

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getMetadata

public String getMetadata(String key)
                   throws cross.exception.ResourceNotAvailableException
Specified by:
getMetadata in interface IExperiment
Throws:
cross.exception.ResourceNotAvailableException

addAttribute

public void addAttribute(Attribute atrbt)
Specified by:
addAttribute in interface cross.datastructures.fragments.IFragment


Copyright © 2007-2012. All Rights Reserved.