belka.parser
Class FormatResolver

java.lang.Object
  extended by belka.parser.FormatResolver

public class FormatResolver
extends Object

The class represents set of functions aimed to resolve format of file by extension.

Author:
Alexej Abyzov

Field Summary
static int FORMAT_GROUP
           
static String[] FORMAT_GROUP_EXTENSIONS
          Standard extensions for annotation/group file format
static int FORMAT_PDB
           
static String[] FORMAT_PDB_EXTENSIONS
          Standard extensions for file in PDB format
static int FORMAT_PROJECT
           
static String[] FORMAT_PROJECT_EXTENSIONS
          Standard extensions for project file format
static int FORMAT_UNKNOWN
          Constant to define PDB-file format
 
Constructor Summary
FormatResolver()
           
 
Method Summary
static int resolveFileFormatByExtension(String fileName)
          The function resolves file format by its extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_UNKNOWN

public static final int FORMAT_UNKNOWN
Constant to define PDB-file format

See Also:
Constant Field Values

FORMAT_PDB

public static final int FORMAT_PDB
See Also:
Constant Field Values

FORMAT_PROJECT

public static final int FORMAT_PROJECT
See Also:
Constant Field Values

FORMAT_GROUP

public static final int FORMAT_GROUP
See Also:
Constant Field Values

FORMAT_PDB_EXTENSIONS

public static final String[] FORMAT_PDB_EXTENSIONS
Standard extensions for file in PDB format


FORMAT_PROJECT_EXTENSIONS

public static final String[] FORMAT_PROJECT_EXTENSIONS
Standard extensions for project file format


FORMAT_GROUP_EXTENSIONS

public static final String[] FORMAT_GROUP_EXTENSIONS
Standard extensions for annotation/group file format

Constructor Detail

FormatResolver

public FormatResolver()
Method Detail

resolveFileFormatByExtension

public static int resolveFileFormatByExtension(String fileName)
The function resolves file format by its extension.

Parameters:
fileName - name of the file
Returns:
format index, or negative if format can no be resolved.