org.openlca.dataconversion
Class LCADocument

java.lang.Object
  extended by org.openlca.dataconversion.LCADocument

public class LCADocument
extends java.lang.Object

Return type of LCADocumentBuilder and Converter.

Version:
1.0
Author:
Michael Srocka, GreenDeltaTC, for the openLCA project (www.openlca.org)

Field Summary
static int ECOSPOLD_PROCESS
          Constant type key for an EcoSpold process document.
static int ELCD_CONTACT
          Constant type key for an ELCD contact document.
static int ELCD_FLOW
          Constant type key for an ELCD flow document.
static int ELCD_PROCESS
          Constant type key for an ELCD process document.
static int ELCD_SOURCE
          Constant type key for an ELCD source document.
static int ISO_PROCESS
          Constant type key for an ISO process document.
static int METADOCUMENT
          Constant type key for a meta document.
 
Method Summary
 java.io.File getFile()
          Returns the document file.
 DataFormat getFormat()
          Returns the data format.
 java.lang.String getMetaDocPath()
          Returns the path to the meta document.
 java.util.List<org.jdom.Document> getMetaDocuments()
          Returns a list of meta documents created from the source file.
 java.lang.String getName()
          Returns the name of a process data set.
 DataFormat[] getTargetFormats()
          Returns the possible target formats.
 int getType()
          Returns the type key of the LCADocument: 0 = ELCD process, ...
 java.lang.String getTypeName()
          Returns the type name of the document.
 java.util.List<java.lang.String> getUnits()
          Returns the units from a (EcoSpold or ISO process) data set.
 boolean isMetaDocument()
          Returns true if it is a meta document.
 boolean isUseExistingMetaDocument()
          Returns true if a meta document is used in the conversion.
 boolean isValid()
          Returns true if data set is valid against its schema.
 void setUseExistingMetaDocument(boolean useExistingMetaDocument)
          Sets if a meta document should be used in the conversion, if exists.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELCD_PROCESS

public static final int ELCD_PROCESS
Constant type key for an ELCD process document.

See Also:
Constant Field Values

ELCD_FLOW

public static final int ELCD_FLOW
Constant type key for an ELCD flow document.

See Also:
Constant Field Values

ELCD_SOURCE

public static final int ELCD_SOURCE
Constant type key for an ELCD source document.

See Also:
Constant Field Values

ELCD_CONTACT

public static final int ELCD_CONTACT
Constant type key for an ELCD contact document.

See Also:
Constant Field Values

ECOSPOLD_PROCESS

public static final int ECOSPOLD_PROCESS
Constant type key for an EcoSpold process document.

See Also:
Constant Field Values

ISO_PROCESS

public static final int ISO_PROCESS
Constant type key for an ISO process document.

See Also:
Constant Field Values

METADOCUMENT

public static final int METADOCUMENT
Constant type key for a meta document.

See Also:
Constant Field Values
Method Detail

getFile

public java.io.File getFile()
Returns the document file.

Returns:
Possible object is File.

getFormat

public DataFormat getFormat()
Returns the data format.

Returns:
possible object is DataFormat.

getMetaDocPath

public java.lang.String getMetaDocPath()
Returns the path to the meta document.

Returns:
possible object is String.

getMetaDocuments

public java.util.List<org.jdom.Document> getMetaDocuments()
                                                   throws ConverterException
Returns a list of meta documents created from the source file.

Returns:
List of Document.
Throws:
ConverterException

getName

public java.lang.String getName()
Returns the name of a process data set.

Returns:
possible object is String.

getTargetFormats

public DataFormat[] getTargetFormats()
                              throws ConverterException
Returns the possible target formats.

Returns:
possible array objects are DataFormat.
Throws:
ConverterException

getType

public int getType()
Returns the type key of the LCADocument: 0 = ELCD process, ...

Returns:
type.

getTypeName

public java.lang.String getTypeName()
Returns the type name of the document.

Returns:
Type name as String.

getUnits

public java.util.List<java.lang.String> getUnits()
Returns the units from a (EcoSpold or ISO process) data set.

Returns:
Possible list objects are String.

isMetaDocument

public boolean isMetaDocument()
Returns true if it is a meta document.

Returns:
{true, false}

isUseExistingMetaDocument

public boolean isUseExistingMetaDocument()
Returns true if a meta document is used in the conversion.

Returns:
{true, false}.

isValid

public boolean isValid()
Returns true if data set is valid against its schema.

Returns:
{true, false}.

setUseExistingMetaDocument

public void setUseExistingMetaDocument(boolean useExistingMetaDocument)
Sets if a meta document should be used in the conversion, if exists.

Parameters:
useExistingMetaDocument - {true, false}.