org.qedeq.kernel.xml.dao
Class XmlQedeqFileDao

java.lang.Object
  extended by org.qedeq.kernel.xml.dao.XmlQedeqFileDao
All Implemented Interfaces:
QedeqFileDao, ModuleService, Service

public class XmlQedeqFileDao
extends java.lang.Object
implements QedeqFileDao, ModuleService

This class provides access methods for loading QEDEQ modules from XML files.

Author:
Michael Meyling

Constructor Summary
XmlQedeqFileDao()
          Constructor.
 
Method Summary
 SourceArea createSourceArea(Qedeq qedeq, ModuleContext context)
          Get area in source file for QEDEQ module context.
 java.io.Reader getModuleReader(KernelQedeqBo bo)
          Get reader for local buffered QEDEQ module.
 java.lang.String getServiceAction()
          Get service action name.
 java.lang.String getServiceDescription()
          Get service description.
 java.lang.String getServiceId()
          Get service id.
 InternalKernelServices getServices()
          Get kernel services.
 Qedeq loadQedeq(InternalServiceJob process, QedeqBo prop, java.io.File file)
          Load a QEDEQ module from file.
 void saveQedeq(InternalServiceJob process, KernelQedeqBo prop, java.io.File localFile)
          Save a QEDEQ module as file.
 void setServices(InternalKernelServices services)
          Set kernel services.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlQedeqFileDao

public XmlQedeqFileDao()
Constructor.

Method Detail

setServices

public void setServices(InternalKernelServices services)
Description copied from interface: QedeqFileDao
Set kernel services. Is called by the kernel to give this loader the opportunity to use kernel services within its methods. This is the first method the kernel calls.

Specified by:
setServices in interface QedeqFileDao
Parameters:
services - Internal kernel services.

getServices

public InternalKernelServices getServices()
Description copied from interface: QedeqFileDao
Get kernel services.

Specified by:
getServices in interface QedeqFileDao
Returns:
Internal kernel services.

loadQedeq

public Qedeq loadQedeq(InternalServiceJob process,
                       QedeqBo prop,
                       java.io.File file)
                throws SourceFileExceptionList
Description copied from interface: QedeqFileDao
Load a QEDEQ module from file.

Specified by:
loadQedeq in interface QedeqFileDao
Parameters:
process - We work for this service process.
prop - Module properties.
file - Load file from this location.
Returns:
Loaded QEDEQ.
Throws:
SourceFileExceptionList - Module could not be successfully loaded.

saveQedeq

public void saveQedeq(InternalServiceJob process,
                      KernelQedeqBo prop,
                      java.io.File localFile)
               throws SourceFileExceptionList,
                      java.io.IOException
Description copied from interface: QedeqFileDao
Save a QEDEQ module as file.

Specified by:
saveQedeq in interface QedeqFileDao
Parameters:
process - We work in this service process.
prop - Module properties.
localFile - Save module in this file.
Throws:
SourceFileExceptionList - Module could not be successfully saved.
java.io.IOException - File saving failed.

createSourceArea

public SourceArea createSourceArea(Qedeq qedeq,
                                   ModuleContext context)
Description copied from interface: QedeqFileDao
Get area in source file for QEDEQ module context. If the system property "qedeq.test.xmlLocationFailures" is set to "true" a runtime exception is thrown if the context is not found.

Specified by:
createSourceArea in interface QedeqFileDao
Parameters:
qedeq - Look at this QEDEQ module.
context - Search for this context.
Returns:
Created file area. Maybe null.

getModuleReader

public java.io.Reader getModuleReader(KernelQedeqBo bo)
                               throws java.io.IOException
Description copied from interface: QedeqFileDao
Get reader for local buffered QEDEQ module.

Specified by:
getModuleReader in interface QedeqFileDao
Parameters:
bo - QEDEQ BO.
Returns:
Reader.
Throws:
java.io.IOException - Reading failed.

getServiceId

public java.lang.String getServiceId()
Description copied from interface: Service
Get service id.

Specified by:
getServiceId in interface Service
Returns:
Service id.

getServiceAction

public java.lang.String getServiceAction()
Description copied from interface: Service
Get service action name. This is what the service does.

Specified by:
getServiceAction in interface Service
Returns:
Service action name.

getServiceDescription

public java.lang.String getServiceDescription()
Description copied from interface: Service
Get service description.

Specified by:
getServiceDescription in interface Service
Returns:
Description of service.


Copyright © 2014. All Rights Reserved.