uk.ac.ebi.adfconverter.tools.filestructure
Class FileStructureDescription

java.lang.Object
  extended byuk.ac.ebi.adfconverter.tools.filestructure.FileStructureDescription

public class FileStructureDescription
extends java.lang.Object

class used to manipulated the data/ tabular file structure description contained in an XML file

Since:
14 sept. 2004
Version:
1
Author:
Pierre MARGUERITE

Constructor Summary
FileStructureDescription()
          default Constructor
 
Method Summary
 CorrectableHeaderItem createItem(ItemType itemType)
          Create a correctableHeaderITem corresponding to a itemType
 CorrectableHeaderItem createItem(java.lang.String type)
          Create an item object of a given type.
 CorrectableHeaderItem createItem(java.lang.String type, int columnNumber)
          Create a CorrectableHeaderItem object with a given type
 FileType FileType(java.lang.String filename)
          Retrieves the FileType associated to a given filename in the file structure definition.
 CorrectableHeaderItem getAssociatedSimpleMicroArrayLayoutItem(CorrectableHeaderItem item)
          Retrieves the associated Simple Microarray layout item associated to a given item in the structure definition.
 CorrectableHeaderItem getAssociatedSimpleMicroArrayLayoutItem(CorrectableHeaderItem item, int columnNumber)
          Retrieves the associated Simple Microarray layout item associated to a given item in the structure definition.
 DataType getDataType(java.lang.String dataName)
          Retrieves the DataType object with a given dataname.
 FileType getFileType()
          Retrieves the fileType attribut
 HeaderType getHeaderType()
          Retrieves the headerType attribut
 DataType getNextDataType()
          Retrieves the next DataType object in the structure definition
 FileType getNextFileType()
          Retrieves the next FileType object from the structure definition (XML)
 TableType getNextTable()
          Retrieves the next table object in the structure definition hierarchy/tree
 DataType getPreviousData()
          Retrieves the previous DataType object in the structure definition
 TableType getPreviousTable()
          Retrieves the previous table object in the structure definition hierarchy/tree
 TableType getTableType(java.lang.String tableName)
          Retrieves the TableType object with a given name.
 void openStructure(java.lang.String _structureFile)
          Open a file structure
 void setCurrentHeaderType(HeaderType _headerType)
          Set the current HeaderType object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileStructureDescription

public FileStructureDescription()
default Constructor

Method Detail

createItem

public CorrectableHeaderItem createItem(ItemType itemType)
Create a correctableHeaderITem corresponding to a itemType

Parameters:
itemType - the itemType describing an header item
Returns:
a corresponding correctableHeaderITem , if the itemType is correct,. null otherwise

createItem

public CorrectableHeaderItem createItem(java.lang.String type)
                                 throws IncorrectFileStructure
Create an item object of a given type.

Parameters:
type - the type of the item to create
Returns:
the created item of the given type
Throws:
IncorrectFileStructure - if the structure definition is incorrect.

createItem

public CorrectableHeaderItem createItem(java.lang.String type,
                                        int columnNumber)
                                 throws IncorrectFileStructure
Create a CorrectableHeaderItem object with a given type

Parameters:
type - the type of the item to createz
columnNumber - the column of the item in the file header
Returns:
a CorrectableHeaderItem object with the given type, if the type has been retrieved from the file structure description. null, otherwise
Throws:
IncorrectFileStructure - if description file is incorrect

FileType

public FileType FileType(java.lang.String filename)
Retrieves the FileType associated to a given filename in the file structure definition.

Parameters:
filename - the filename to which the associated FileType is looked for.
Returns:
the FileType object associated to the filename, if existing. null otherwise

getAssociatedSimpleMicroArrayLayoutItem

public CorrectableHeaderItem getAssociatedSimpleMicroArrayLayoutItem(CorrectableHeaderItem item)
                                                              throws IncorrectFileStructure
Retrieves the associated Simple Microarray layout item associated to a given item in the structure definition. only currently useable with ADF definition

Parameters:
item - the item to which the associated item is looked for
Returns:
a corresponding correctableHeaderITem , if the associated item exists. null, otherwise.
Throws:
IncorrectFileStructure - if the structure definition is incorrect.

getAssociatedSimpleMicroArrayLayoutItem

public CorrectableHeaderItem getAssociatedSimpleMicroArrayLayoutItem(CorrectableHeaderItem item,
                                                                     int columnNumber)
                                                              throws IncorrectFileStructure
Retrieves the associated Simple Microarray layout item associated to a given item in the structure definition. only currently useable with ADF definition

Parameters:
item - the item to which the associated item is looked for
columnNumber - the item column../not used...
Returns:
a corresponding correctableHeaderITem , if the associated item exists. null, otherwise.
Throws:
IncorrectFileStructure - if the structure definition is incorrect.

getDataType

public DataType getDataType(java.lang.String dataName)
                     throws IncorrectFileStructure
Retrieves the DataType object with a given dataname.

Parameters:
dataName - the dataname of the DataType looked for.
Returns:
the DataType object with the given data name.
Throws:
IncorrectFileStructure - if the structure definition file /xml tree, is incorrect

getFileType

public FileType getFileType()
Retrieves the fileType attribut

Returns:
Returns the fileType.

getHeaderType

public HeaderType getHeaderType()
                         throws IncorrectFileStructure
Retrieves the headerType attribut

Returns:
Returns the headerType.
Throws:
IncorrectFileStructure - the structure definition is incorrect.

getNextDataType

public DataType getNextDataType()
                         throws IncorrectFileStructure
Retrieves the next DataType object in the structure definition

Returns:
the next DataType object, if existing. null, otherwise
Throws:
IncorrectFileStructure - if the file structure definition file is incorrect.

getNextFileType

public FileType getNextFileType()
Retrieves the next FileType object from the structure definition (XML)

Returns:
the next FileType object, if existing. null, otherwise.

getNextTable

public TableType getNextTable()
                       throws IncorrectFileStructure
Retrieves the next table object in the structure definition hierarchy/tree

Returns:
the next TableType object, if existing. null, otherwise.
Throws:
IncorrectFileStructure - if the structur definition is incorrect.

getPreviousData

public DataType getPreviousData()
                         throws IncorrectFileStructure
Retrieves the previous DataType object in the structure definition

Returns:
the previous DataType object, if existing. null, otherwise
Throws:
IncorrectFileStructure - if the file structure definition file is incorrect.

getPreviousTable

public TableType getPreviousTable()
                           throws IncorrectFileStructure
Retrieves the previous table object in the structure definition hierarchy/tree

Returns:
the previous TableType object, if existing. null, otherwise.
Throws:
IncorrectFileStructure - if the structur definition is incorrect.

getTableType

public TableType getTableType(java.lang.String tableName)
                       throws IncorrectFileStructure
Retrieves the TableType object with a given name.

Parameters:
tableName - the name of the table looked for.
Returns:
the TableType with the given name.
Throws:
IncorrectFileStructure - the structure definition is incorrect.

openStructure

public void openStructure(java.lang.String _structureFile)
                   throws java.io.IOException
Open a file structure

Parameters:
_structureFile - the XML file contained a data file description
Throws:
java.io.IOException - if an error occurs file access

setCurrentHeaderType

public void setCurrentHeaderType(HeaderType _headerType)
Set the current HeaderType object.

Parameters:
_headerType - the HeaderType object to set as current.


European Bioinformatics InstituteMicroarray Informatics Team