org.tridas.io.formats.ooxml
Class OOXMLReader

java.lang.Object
  extended by org.tridas.io.AbstractDendroFileReader
      extended by org.tridas.io.formats.ooxml.OOXMLReader

public class OOXMLReader
extends AbstractDendroFileReader


Constructor Summary
OOXMLReader()
           
 
Method Summary
 int getCurrentLineNumber()
          Gets the current line number of the reader.
 IMetadataFieldSet getDefaults()
          Get the default values for this reader that were given in loading the file.
 DendroFileFilter getDendroFileFilter()
           
 String getDescription()
          Get the description of the format
 String[] getFileExtensions()
          Returns a list of the file extensions for this file
 String getFullName()
          Get the full name of the format
 org.tridas.schema.TridasProject[] getProjects()
          Gets the parsed projects after they are loaded.
 String getShortName()
          Get the short name of the format
 org.tridas.schema.TridasTridas getTridasContainer()
           
 void loadFile(String[] argFileStrings)
          Loads a file just from the strings, using the default metadata
 void loadFile(String argFilename, IMetadataFieldSet argDefaultFields)
          Load a file from the given filename or url, and the given defaults.
 void loadFile(String argPath, String argFilename, IMetadataFieldSet argDefaultFields)
          Loads a file from the given path, filename, and defaults.
protected  void parseFile(String[] argFileString, IMetadataFieldSet argDefaultFields)
          Parse the file from the given metadata and strings
protected  void parseFile(org.apache.poi.ss.usermodel.Workbook wb)
          Check this is a valid Excel file
protected  void resetReader()
          Reset the reader
 
Methods inherited from class org.tridas.io.AbstractDendroFileReader
addWarning, clearWarnings, constructDefaultMetadata, getDefaultFieldsClass, getOriginalFilename, getWarnings, loadFile, loadFile, loadFile, reset, setOriginalFilename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OOXMLReader

public OOXMLReader()
Method Detail

getDendroFileFilter

public DendroFileFilter getDendroFileFilter()
Specified by:
getDendroFileFilter in class AbstractDendroFileReader

getDescription

public String getDescription()
Description copied from class: AbstractDendroFileReader
Get the description of the format

Specified by:
getDescription in class AbstractDendroFileReader
Returns:

getFileExtensions

public String[] getFileExtensions()
Description copied from class: AbstractDendroFileReader
Returns a list of the file extensions for this file

Specified by:
getFileExtensions in class AbstractDendroFileReader
Returns:

getFullName

public String getFullName()
Description copied from class: AbstractDendroFileReader
Get the full name of the format

Specified by:
getFullName in class AbstractDendroFileReader
Returns:

getShortName

public String getShortName()
Description copied from class: AbstractDendroFileReader
Get the short name of the format

Specified by:
getShortName in class AbstractDendroFileReader
Returns:

parseFile

protected void parseFile(String[] argFileString,
                         IMetadataFieldSet argDefaultFields)
Description copied from class: AbstractDendroFileReader
Parse the file from the given metadata and strings

Specified by:
parseFile in class AbstractDendroFileReader

loadFile

public void loadFile(String[] argFileStrings)
              throws InvalidDendroFileException
Description copied from class: AbstractDendroFileReader
Loads a file just from the strings, using the default metadata

Overrides:
loadFile in class AbstractDendroFileReader
Throws:
InvalidDendroFileException

loadFile

public void loadFile(String argFilename,
                     IMetadataFieldSet argDefaultFields)
              throws IOException,
                     IncorrectDefaultFieldsException,
                     InvalidDendroFileException
Description copied from class: AbstractDendroFileReader
Load a file from the given filename or url, and the given defaults. Override this method and AbstractDendroFileReader.loadFile(String, String, IMetadataFieldSet) to load files that aren't strings.

Overrides:
loadFile in class AbstractDendroFileReader
Throws:
IncorrectDefaultFieldsException
InvalidDendroFileException
IOException - if the file could not be loaded
See Also:
org.tridas.io.IDendroCollectionWriter#loadFile(java.lang.String)

loadFile

public void loadFile(String argPath,
                     String argFilename,
                     IMetadataFieldSet argDefaultFields)
              throws IOException,
                     IncorrectDefaultFieldsException,
                     InvalidDendroFileException
Description copied from class: AbstractDendroFileReader
Loads a file from the given path, filename, and defaults. Override this method and AbstractDendroFileReader.loadFile(String, IMetadataFieldSet) to load files that aren't strings.

Overrides:
loadFile in class AbstractDendroFileReader
Throws:
IOException
IncorrectDefaultFieldsException
InvalidDendroFileException

parseFile

protected void parseFile(org.apache.poi.ss.usermodel.Workbook wb)
                  throws InvalidDendroFileException
Check this is a valid Excel file

Parameters:
argFileBytes -
Throws:
InvalidDendroFileException

resetReader

protected void resetReader()
Description copied from class: AbstractDendroFileReader
Reset the reader

Specified by:
resetReader in class AbstractDendroFileReader

getCurrentLineNumber

public int getCurrentLineNumber()
Description copied from class: AbstractDendroFileReader
Gets the current line number of the reader. If errors occurred, this could help point towards the cause.

Specified by:
getCurrentLineNumber in class AbstractDendroFileReader
Returns:
the current line number

getDefaults

public IMetadataFieldSet getDefaults()
Description copied from class: AbstractDendroFileReader
Get the default values for this reader that were given in loading the file. If the loadFile method was never called, then this returns null.

Specified by:
getDefaults in class AbstractDendroFileReader
Returns:

getProjects

public org.tridas.schema.TridasProject[] getProjects()
Description copied from class: AbstractDendroFileReader
Gets the parsed projects after they are loaded.

Specified by:
getProjects in class AbstractDendroFileReader
See Also:
AbstractDendroFileReader.getProjects()

getTridasContainer

public org.tridas.schema.TridasTridas getTridasContainer()
Specified by:
getTridasContainer in class AbstractDendroFileReader
See Also:
AbstractDendroFileReader.getTridasContainer()


Copyright © 2011. All Rights Reserved.