de.folt.models.datamodel.csv
Class Csv

java.lang.Object
  extended by java.util.Observable
      extended by de.folt.models.datamodel.BasicDataSource
          extended by de.folt.models.datamodel.ExtendedBasicDataSource
              extended by de.folt.models.datamodel.csv.Csv
All Implemented Interfaces:
DataSource, java.util.Enumeration<MultiLingualObject>, java.util.Observer

public class Csv
extends ExtendedBasicDataSource

Author:
klemens To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Nested Class Summary
 
Nested classes/interfaces inherited from class de.folt.models.datamodel.BasicDataSource
BasicDataSource.BasicDataSourceObserver
 
Constructor Summary
Csv()
           
Csv(DataSourceProperties dataSourceProperties)
           
Csv(java.lang.String propertiesFileName)
           
 
Method Summary
 boolean addMonoLingualObject(MonoLingualObject monoLingualObject, boolean mergeObjects)
          addMultiLingualObject adds a MonoLingualObject to the given MultiLingualObject to the data source
 boolean addMultiLingualObject(MultiLingualObject multiLingualObject, boolean mergeObjects)
          addMultiLingualObject adds a MultiLingualObject to the data source
 boolean bPersist()
          bPersist method persists any data in the data source
 boolean createDataSource(DataSourceProperties dataModelProperties)
          createDataSource creates a new Data source; this is esp. intended for creating a new database, e.g. in MySQL or Ms SQL Server.
 java.lang.String getDataSourceType()
          getDataSourceType get the type of the database
 
Methods inherited from class de.folt.models.datamodel.ExtendedBasicDataSource
main
 
Methods inherited from class de.folt.models.datamodel.BasicDataSource
addData, bAuthenticate, bSupportMultiThreading, changedMonolingualObjects, checkIfTranslationExistsInDataSource, checkIfTranslationExistsInDataSource, cleanDataSource, clearDataSource, containsKey, containsValue, copyFrom, copyTo, currentTimeMillis, deleteDataSource, exportTmxFile, exportXliffFile, getAllAttributes, getChangedIds, getData, getDataSourceName, getDataSourceProperties, getDefaultDataSourceConfigurationsFileName, getFuzzyTree, getIds, getILogLevel, getLastErrorCode, getMonoLingualObjectFromId, getMonoLingualObjectFromUniqueId, getMultiLingualObjectCache, getMultiLingualObjectFromId, getMultiLingualObjectFromUniqueId, getUniqueIds, hasMoreElements, importTbxFile, importTmxFile, importXliffFile, initEnumeration, isBChanged, isBLoadAttributesLazy, isSyncDataSource, nextElement, removeData, removeDataSource, removeMonoLingualObject, removeMultiLingualObject, runFilterMethod, saveModifiedMonoLingualObject, saveModifiedMultiLingualObject, search, searchRegExp, searchWordBased, setBChanged, setBLoadAttributesLazy, setDataSourceType, setDefaultDataSourceConfigurationsFileName, setILogLevel, setILogLevel, setLastErrorCode, setMultiLingualObjectCache, setOpenTMSPropertiesFile, subSegmentResultsToGlossary, subSegmentTranslate, translate, update, update
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Csv

public Csv()

Csv

public Csv(DataSourceProperties dataSourceProperties)
Parameters:
dataSourceProperties -

Csv

public Csv(java.lang.String propertiesFileName)
Parameters:
propertiesFileName -
Method Detail

addMonoLingualObject

public boolean addMonoLingualObject(MonoLingualObject monoLingualObject,
                                    boolean mergeObjects)
Description copied from interface: DataSource
addMultiLingualObject adds a MonoLingualObject to the given MultiLingualObject to the data source

Specified by:
addMonoLingualObject in interface DataSource
Overrides:
addMonoLingualObject in class BasicDataSource
Parameters:
monoLingualObject - the MOL object to add
mergeObjects - if true first a search is done if the containing MonoLingualObjects exist in the data source (based on the segment text); if they exist they are merged; if false the MUL is added as new entry
Returns:
true if added; false if the MultiLingualObject does not exist

addMultiLingualObject

public boolean addMultiLingualObject(MultiLingualObject multiLingualObject,
                                     boolean mergeObjects)
Description copied from interface: DataSource
addMultiLingualObject adds a MultiLingualObject to the data source

Specified by:
addMultiLingualObject in interface DataSource
Overrides:
addMultiLingualObject in class BasicDataSource
Parameters:
multiLingualObject - the object to add
mergeObjects - if true first a search is done if the containing MonoLingualObjects exist in the data source (based on the segment text); if they exist they are merged; if false the MUL is added as new entry
Returns:
true if added; false if not

bPersist

public boolean bPersist()
Description copied from interface: DataSource
bPersist method persists any data in the data source

Specified by:
bPersist in interface DataSource
Overrides:
bPersist in class BasicDataSource
Returns:
true in case of success or false otherwise

createDataSource

public boolean createDataSource(DataSourceProperties dataModelProperties)
                         throws OpenTMSException
Description copied from interface: DataSource
createDataSource creates a new Data source; this is esp. intended for creating a new database, e.g. in MySQL or Ms SQL Server. In addition it can be used to create a new empty TMX data source.

Specified by:
createDataSource in interface DataSource
Overrides:
createDataSource in class BasicDataSource
Parameters:
dataModelProperties - the parameters of the data source
Returns:
true if success
Throws:
OpenTMSException

getDataSourceType

public java.lang.String getDataSourceType()
Description copied from interface: DataSource
getDataSourceType get the type of the database

Specified by:
getDataSourceType in interface DataSource
Overrides:
getDataSourceType in class BasicDataSource
Returns:
the data source type