public class AbstractHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected NumberFormat |
nf |
Constructor and Description |
---|
AbstractHandler()
Constructor initializes formats for alternative file names to protect from unintentionally
overwriting existing files.
|
Modifier and Type | Method and Description |
---|---|
static File |
getComplexDataFile(Obs obs)
Convenience method to create and return a file for the stored ComplexData.data Object
|
String |
getExtension(String filename)
Deprecated.
since 2.1.3 use
FilenameUtils.getExtension(String)
instead. |
Obs |
getObs(Obs obs,
String view) |
File |
getOutputFileToWrite(Obs obs)
Returns a
File for the given obs complex data to be written to. |
String[] |
getSupportedViews() |
boolean |
purgeComplexData(Obs obs) |
boolean |
supportsView(String view) |
protected NumberFormat nf
public AbstractHandler()
public File getOutputFileToWrite(Obs obs) throws IOException
File
for the given obs complex data to be written to. The output file
location is determined off of the OpenmrsConstants.GLOBAL_PROPERTY_COMPLEX_OBS_DIR
and the file name is determined off the current obs.getComplexData().getTitle().obs
- the Obs with a non-null complex data on itIOException
@Deprecated public String getExtension(String filename)
FilenameUtils.getExtension(String)
instead.filename
- public Obs getObs(Obs obs, String view)
ComplexObsHandler.getObs(Obs, String)
public boolean purgeComplexData(Obs obs)
public static File getComplexDataFile(Obs obs)
obs
- public String[] getSupportedViews()
ComplexObsHandler.getSupportedViews()
public boolean supportsView(String view)
Copyright © 2024 OpenMRS Inc.. All rights reserved.