de.fzi.kadmos.webutils.core
Class KADMOSAlignmentServiceImpl

java.lang.Object
  extended by de.fzi.kadmos.webutils.core.KADMOSAlignmentServiceImpl
All Implemented Interfaces:
KADMOSAlignmentService

public class KADMOSAlignmentServiceImpl
extends Object
implements KADMOSAlignmentService

Implementation of the endpoint interface KADMOSAlignmentService.

Since:
1.1.0
Version:
1.3.0
Author:
Matthias Stumpp

Field Summary
protected  org.apache.commons.logging.Log logger
          Logger.
 
Constructor Summary
KADMOSAlignmentServiceImpl()
           
 
Method Summary
 String align(String ontology1, String ontology2, String inputAlignment, List<ArgumentType> parameters)
           Implementation of the endpoint service interface KADMOSAlignmentService.
protected  String getAlignmentURLPrefix()
          Returns URL to be prefixed to created alignment files in order to make them remotely accessible.
protected  String getServletContextRealPath()
          Returns real path of the ServletContext.
protected  boolean isRemoteAccessibility(String url)
          Checks whether a file represented by an URL is accessible.
protected  File makeFileFromAlignment(String alignment, String fileName, String fileType)
          Creates a file of a String representing an alignment.
protected  String makeRemoteAccessibleFileFromAlignment(String alignment, String fileName, String fileType)
          Creates a remotely accessible file of a String representing an alignment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected org.apache.commons.logging.Log logger
Logger.

Constructor Detail

KADMOSAlignmentServiceImpl

public KADMOSAlignmentServiceImpl()
Method Detail

align

public String align(String ontology1,
                    String ontology2,
                    String inputAlignment,
                    List<ArgumentType> parameters)
             throws KADMOSFault
Implementation of the endpoint service interface KADMOSAlignmentService.

Specified by:
align in interface KADMOSAlignmentService
Throws:
KADMOSFault

getServletContextRealPath

protected String getServletContextRealPath()
                                    throws KADMOSFault
Returns real path of the ServletContext.

Returns:
String representing real path of the ServletContext.
Throws:
KADMOSFault - Exception if ServletContest in unknown.

isRemoteAccessibility

protected boolean isRemoteAccessibility(String url)
Checks whether a file represented by an URL is accessible.

Parameters:
URL - of file to be checked.
Returns:
Boolean, true is file exists, false otherwise.

makeRemoteAccessibleFileFromAlignment

protected String makeRemoteAccessibleFileFromAlignment(String alignment,
                                                       String fileName,
                                                       String fileType)
                                                throws KADMOSFault
Creates a remotely accessible file of a String representing an alignment.

Parameters:
alignment - String representing an alignment previously created.
fileName - Name of the file to be returned.
fileType - Type of the file to be returned.
Returns:
String String representing the URI pointing to the remotely accessible file containing the alignment.
Throws:
KADMOSFault - Exception thrown during file creation.

makeFileFromAlignment

protected File makeFileFromAlignment(String alignment,
                                     String fileName,
                                     String fileType)
                              throws KADMOSFault
Creates a file of a String representing an alignment.

Parameters:
alignment - String representing an alignment previously created.
fileName - Name of the file to be returned.
fileType - Type of the file to be returned.
Returns:
File File containing the alignment.
Throws:
KADMOSFault - Exception thrown during file creation.

getAlignmentURLPrefix

protected String getAlignmentURLPrefix()
                                throws KADMOSFault
Returns URL to be prefixed to created alignment files in order to make them remotely accessible.

Returns:
String URL to be prefixed to created alignment files in order to make them remotely accessible.
Throws:
KADMOSFault - Exception thrown during creating URLPrefix.


Copyright © 2012. All Rights Reserved.