Package gda.data.nexus
Class NexusMetadataExtractor
java.lang.Object
gda.data.nexus.NexusMetadataExtractor
- All Implemented Interfaces:
INexusMetadataExtractor
-
Field Summary
Fields inherited from interface uk.ac.diamond.daq.api.messaging.messages.INexusMetadataExtractor
END_SCAN_METADATA_NODE_PATHS_FILE_NAME, START_SCAN_METADATA_NODE_PATHS_FILE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateScanMetadataMessage(ScanStatus scanStatus, String nexusFilePath) Creates aScanMetadataMessageby extracting metdata from the nexus file at the given path, where the node paths extracted are determined by the contents of the appropriate properties file for theScanStatus.static PathgetPropertiesFilePath(ScanStatus scanStatus) booleanReturns whether this extractor is enabled.
-
Constructor Details
-
NexusMetadataExtractor
public NexusMetadataExtractor()
-
-
Method Details
-
getPropertiesFilePath
-
isEnabled
public boolean isEnabled()Description copied from interface:INexusMetadataExtractorReturns whether this extractor is enabled. This is determined by whether a file is present within gda-var with the file path with the same name as the value ofINexusMetadataExtractor.START_SCAN_METADATA_NODE_PATHS_FILE_NAME.- Specified by:
isEnabledin interfaceINexusMetadataExtractor- Returns:
trueif enabled,falseotherwise
-
createScanMetadataMessage
Description copied from interface:INexusMetadataExtractorCreates aScanMetadataMessageby extracting metdata from the nexus file at the given path, where the node paths extracted are determined by the contents of the appropriate properties file for theScanStatus.- Specified by:
createScanMetadataMessagein interfaceINexusMetadataExtractor- Parameters:
scanStatus- eitherScanStatus.STARTEDorScanStatus.FINISHEDnexusFilePath- path of the nexus file- Returns:
- The
ScanMetadataMessageornullif a metadata message could not be created. An error is logged in this case.
-