org.opensync.engine.server.adapter
Class TxtFileAdapter

java.lang.Object
  extended byorg.opensync.engine.server.DefaultAdapter
      extended byorg.opensync.engine.server.adapter.FileAdapter
          extended byorg.opensync.engine.server.adapter.TxtFileAdapter
All Implemented Interfaces:
Adapter, java.io.Serializable

public class TxtFileAdapter
extends FileAdapter

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opensync.engine.server.DefaultAdapter
connector, tablesDescriptor, themesDescriptor
 
Constructor Summary
TxtFileAdapter()
          This class represents the adpater to adapt txt data source format to the OpenSync data format
 
Method Summary
 java.lang.String adaptInputView(java.lang.String txt, View view, Statistic stat, Window win)
          Adapt the the data source format to the OpenSync data format
 java.lang.String adaptOutputView(java.lang.String xml, View view, Statistic stat)
          Adapt the the data OpenSync format to the data source format
 void startReadInputFile(boolean status)
           
 java.lang.String toString()
          Use for debug only
 
Methods inherited from class org.opensync.engine.server.adapter.FileAdapter
getFileConnector
 
Methods inherited from class org.opensync.engine.server.DefaultAdapter
getConnector, getPKs, getTablesDescriptor, getThemesDescriptor, init, readThemeDescriptor, release, releaseWithException, setConnector, setTablesDescriptor, setThemesDescriptor, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TxtFileAdapter

public TxtFileAdapter()
This class represents the adpater to adapt txt data source format to the OpenSync data format

Method Detail

startReadInputFile

public void startReadInputFile(boolean status)
Specified by:
startReadInputFile in interface Adapter
Overrides:
startReadInputFile in class DefaultAdapter
Parameters:
status -

adaptInputView

public java.lang.String adaptInputView(java.lang.String txt,
                                       View view,
                                       Statistic stat,
                                       Window win)
                                throws java.lang.Exception
Adapt the the data source format to the OpenSync data format

Specified by:
adaptInputView in interface Adapter
Specified by:
adaptInputView in class DefaultAdapter
Parameters:
txt - the txt view
view - the view
Throws:
java.lang.Exception

adaptOutputView

public java.lang.String adaptOutputView(java.lang.String xml,
                                        View view,
                                        Statistic stat)
                                 throws java.io.IOException,
                                        org.xml.sax.SAXException,
                                        javax.xml.parsers.ParserConfigurationException
Adapt the the data OpenSync format to the data source format

Specified by:
adaptOutputView in interface Adapter
Specified by:
adaptOutputView in class DefaultAdapter
Parameters:
xml - the txt view
view - the view
Throws:
java.io.IOException
org.dom4j.DocumentException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException

toString

public java.lang.String toString()
Use for debug only

Overrides:
toString in class DefaultAdapter


Copyright © 2004 sourceforge. All Rights Reserved.