$darkmode
DENOPTIM
denoptim.files.FileFormat Enum Reference

File formats identified by DENOPTIM. More...

Collaboration diagram for denoptim.files.FileFormat:
[legend]

Classes

enum  DataKind
 The kind of data found in a file. More...
 

Public Member Functions

boolean isFolder ()
 
String getSampleEndRegex ()
 In identifying a text file we read as many lines as possible until we match the "end-of-sample" string. More...
 
Set< String > getDefiningRegex ()
 Returns the list of regex strings that allow identification of a file. More...
 
Set< String > getNegatingRegex ()
 Returns the list of regex strings that exclude a file format. More...
 
String getExtension ()
 

Static Public Member Functions

 [static initializer]
 
static FileFormat fromString (String extension, DataKind kind)
 Gets the FileFormat from file extension and kind of data. More...
 
static FileFormat[] getSDFFormats ()
 Returns the collection of file formats using SDF syntax. More...
 
static FileFormat[] getParameterFormats ()
 Returns the collection of file formats with input parameters. More...
 
static FileFormat[] getTXTFormats ()
 Returns the collection of file formats restricted to TXT files (excluded parameter files) More...
 

Public Attributes

 CANDIDATESDF
 
 GRAPHJSON
 
 GRAPHSDF
 
 VRTXJSON
 
 VRTXSDF
 
 MOLSDF
 
 FSE_RUN
 
 GA_RUN
 
 GA_PARAM
 
 FSE_PARAM
 
 FR_PARAM
 
 COMP_MAP
 
 GO_PARAM
 
 CLG_PARAM
 
 GE_PARAM
 
 GI_PARAM
 
 B3D_PARAM
 
 FRG_RUN
 
 FRG_PARAM
 
 CUTRULE
 
 TXT
 
 GRAPHTXT
 
 GENSUMMARY
 
 UNRECOGNIZED
 

Private Attributes

String extension = ""
 
Set< String > definingRegex = new HashSet<String>()
 Collection of regex that, if matched, suggests assigning the format to a specific FileFormat. More...
 
Set< String > negatingRegex = new HashSet<String>()
 Collection of regex that, if matched, prevents assigning the format to a specific FileFormat. More...
 
String endOfSampleRegex = null
 Regex used to identify the end of the sampled text used to determine the format of a file. More...
 
Boolean isFolder = false
 

Detailed Description

File formats identified by DENOPTIM.

Definition at line 32 of file FileFormat.java.

Member Function Documentation

◆ [static initializer]()

◆ fromString()

static FileFormat denoptim.files.FileFormat.fromString ( String  extension,
DataKind  kind 
)
static

Gets the FileFormat from file extension and kind of data.

Parameters
extensionthe extension of the file (i.e., in blabla.ext the extension is ext).
kindthe kind of data contained in the file.
Returns
the file format corresponding to the given extension and kind of data.

Definition at line 246 of file FileFormat.java.

Referenced by denoptim.gui.GUIFileSaver.pickFileForSavingGraphs(), and denoptim.gui.GUIFileSaver.pickFileForSavingVertexes().

Here is the caller graph for this function:

◆ getDefiningRegex()

Set< String > denoptim.files.FileFormat.getDefiningRegex ( )

Returns the list of regex strings that allow identification of a file.

Returns

Definition at line 427 of file FileFormat.java.

◆ getExtension()

String denoptim.files.FileFormat.getExtension ( )

Definition at line 445 of file FileFormat.java.

Referenced by denoptim.files.FileUtils.detectFileFormat(), denoptim.programs.fragmenter.FragmenterParameters.getMWSlotFileNameAllFrags(), and denoptim.programs.fragmenter.FragmenterParameters.getMWSlotFileNameUnqFrags().

Here is the caller graph for this function:

◆ getNegatingRegex()

Set< String > denoptim.files.FileFormat.getNegatingRegex ( )

Returns the list of regex strings that exclude a file format.

Returns

Definition at line 438 of file FileFormat.java.

◆ getParameterFormats()

static FileFormat[] denoptim.files.FileFormat.getParameterFormats ( )
static

Returns the collection of file formats with input parameters.

Returns
the collection of file formats with input parameters.

Definition at line 362 of file FileFormat.java.

References denoptim.files.FileFormat.B3D_PARAM, denoptim.files.FileFormat.CLG_PARAM, denoptim.files.FileFormat.COMP_MAP, denoptim.files.FileFormat.FR_PARAM, denoptim.files.FileFormat.FRG_PARAM, denoptim.files.FileFormat.FSE_PARAM, denoptim.files.FileFormat.GA_PARAM, denoptim.files.FileFormat.GE_PARAM, denoptim.files.FileFormat.GI_PARAM, and denoptim.files.FileFormat.GO_PARAM.

Referenced by denoptim.files.FileUtils.detectKindOfParameterFile().

Here is the caller graph for this function:

◆ getSampleEndRegex()

String denoptim.files.FileFormat.getSampleEndRegex ( )

In identifying a text file we read as many lines as possible until we match the "end-of-sample" string.

This method returns the regex that defines the "end-of-sample" string.

Returns
the regex identifying the end of the sample text.

Definition at line 416 of file FileFormat.java.

◆ getSDFFormats()

static FileFormat[] denoptim.files.FileFormat.getSDFFormats ( )
static

Returns the collection of file formats using SDF syntax.

Returns
the collection of file formats using SDF syntax.

Definition at line 345 of file FileFormat.java.

References denoptim.files.FileFormat.CANDIDATESDF, denoptim.files.FileFormat.GRAPHSDF, denoptim.files.FileFormat.MOLSDF, and denoptim.files.FileFormat.VRTXSDF.

Referenced by denoptim.files.FileUtils.detectKindOfSDFFile().

Here is the caller graph for this function:

◆ getTXTFormats()

static FileFormat[] denoptim.files.FileFormat.getTXTFormats ( )
static

Returns the collection of file formats restricted to TXT files (excluded parameter files)

Returns
the collection of file formats restricted to TXT files.

Definition at line 387 of file FileFormat.java.

References denoptim.files.FileFormat.CUTRULE, denoptim.files.FileFormat.GENSUMMARY, and denoptim.files.FileFormat.GRAPHTXT.

Referenced by denoptim.files.FileUtils.detectKindOfTXTFile().

Here is the caller graph for this function:

◆ isFolder()

boolean denoptim.files.FileFormat.isFolder ( )
Returns
true if the file is supposed to be a folder

Definition at line 403 of file FileFormat.java.

Member Data Documentation

◆ B3D_PARAM

denoptim.files.FileFormat.B3D_PARAM

Definition at line 39 of file FileFormat.java.

Referenced by denoptim.files.FileFormat.getParameterFormats().

◆ CANDIDATESDF

◆ CLG_PARAM

denoptim.files.FileFormat.CLG_PARAM

Definition at line 38 of file FileFormat.java.

Referenced by denoptim.files.FileFormat.getParameterFormats().

◆ COMP_MAP

◆ CUTRULE

◆ definingRegex

Set<String> denoptim.files.FileFormat.definingRegex = new HashSet<String>()
private

Collection of regex that, if matched, suggests assigning the format to a specific FileFormat.

Consider a logical OR operator, i.e., any match will suggest among the set of regex will lead to format interpretation. Regex are matches against toUpperCase strings, so they behave as case-insensitive.

Definition at line 53 of file FileFormat.java.

◆ endOfSampleRegex

String denoptim.files.FileFormat.endOfSampleRegex = null
private

Regex used to identify the end of the sampled text used to determine the format of a file.

Regex are matches against toUpperCase strings, so they behave as case-insensitive.

Definition at line 67 of file FileFormat.java.

◆ extension

String denoptim.files.FileFormat.extension = ""
private

Definition at line 44 of file FileFormat.java.

◆ FR_PARAM

denoptim.files.FileFormat.FR_PARAM

◆ FRG_PARAM

denoptim.files.FileFormat.FRG_PARAM

Definition at line 39 of file FileFormat.java.

Referenced by denoptim.files.FileFormat.getParameterFormats().

◆ FRG_RUN

denoptim.files.FileFormat.FRG_RUN

◆ FSE_PARAM

◆ FSE_RUN

◆ GA_PARAM

◆ GA_RUN

◆ GE_PARAM

denoptim.files.FileFormat.GE_PARAM

Definition at line 38 of file FileFormat.java.

Referenced by denoptim.files.FileFormat.getParameterFormats().

◆ GENSUMMARY

denoptim.files.FileFormat.GENSUMMARY

◆ GI_PARAM

denoptim.files.FileFormat.GI_PARAM

Definition at line 39 of file FileFormat.java.

Referenced by denoptim.files.FileFormat.getParameterFormats().

◆ GO_PARAM

denoptim.files.FileFormat.GO_PARAM

Definition at line 38 of file FileFormat.java.

Referenced by denoptim.files.FileFormat.getParameterFormats().

◆ GRAPHJSON

denoptim.files.FileFormat.GRAPHJSON

◆ GRAPHSDF

◆ GRAPHTXT

denoptim.files.FileFormat.GRAPHTXT

Definition at line 41 of file FileFormat.java.

Referenced by denoptim.files.FileFormat.getTXTFormats().

◆ isFolder

Boolean denoptim.files.FileFormat.isFolder = false
private

Definition at line 69 of file FileFormat.java.

◆ MOLSDF

◆ negatingRegex

Set<String> denoptim.files.FileFormat.negatingRegex = new HashSet<String>()
private

Collection of regex that, if matched, prevents assigning the format to a specific FileFormat.

Regex are matches against toUpperCase strings, so they behave as case-insensitive.

Definition at line 60 of file FileFormat.java.

◆ TXT

denoptim.files.FileFormat.TXT

Definition at line 41 of file FileFormat.java.

Referenced by denoptim.task.ProgramTask.printErrorToFile().

◆ UNRECOGNIZED

denoptim.files.FileFormat.UNRECOGNIZED

◆ VRTXJSON

◆ VRTXSDF


The documentation for this enum was generated from the following file: