Package org.apache.hop.ui.hopgui.file
Class HopFileTypeBase
- java.lang.Object
-
- org.apache.hop.ui.hopgui.file.HopFileTypeBase
-
- All Implemented Interfaces:
IHopFileType
- Direct Known Subclasses:
BaseExplorerFileType,HopPipelineFileType,HopWorkflowFileType
public abstract class HopFileTypeBase extends Object implements IHopFileType
-
-
Field Summary
-
Fields inherited from interface org.apache.hop.ui.hopgui.file.IHopFileType
CAPABILITY_ALIGN_BOTTOM, CAPABILITY_ALIGN_LEFT, CAPABILITY_ALIGN_RIGHT, CAPABILITY_ALIGN_TOP, CAPABILITY_CLOSE, CAPABILITY_COPY, CAPABILITY_CUT, CAPABILITY_DEBUG, CAPABILITY_DELETE, CAPABILITY_DISTRIBUTE_HORIZONTAL, CAPABILITY_DISTRIBUTE_VERTICAL, CAPABILITY_EXPORT_TO_SVG, CAPABILITY_FILE_HISTORY, CAPABILITY_HANDLE_METADATA, CAPABILITY_NEW, CAPABILITY_PASTE, CAPABILITY_PAUSE, CAPABILITY_PREVIEW, CAPABILITY_SAVE, CAPABILITY_SAVE_AS, CAPABILITY_SELECT, CAPABILITY_SNAP_TO_GRID, CAPABILITY_START, CAPABILITY_STOP
-
-
Constructor Summary
Constructors Constructor Description HopFileTypeBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)abstract PropertiesgetCapabilities()abstract String[]getFilterExtensions()abstract StringgetName()booleanhasCapability(String capability)Check to see if the capability is presentbooleanisHandledBy(String filename, boolean checkContent)Look at the given file and see if it's handled by this type.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.hop.ui.hopgui.file.IHopFileType
getContextHandlers, getDefaultFileExtension, getFileTypeImage, getFilterNames, newFile, openFile, supportsFile
-
-
-
-
Method Detail
-
getName
public abstract String getName()
- Specified by:
getNamein interfaceIHopFileType- Returns:
- The name of this file type
-
getCapabilities
public abstract Properties getCapabilities()
- Specified by:
getCapabilitiesin interfaceIHopFileType- Returns:
- The capabilities of this file handler
-
getFilterExtensions
public abstract String[] getFilterExtensions()
- Specified by:
getFilterExtensionsin interfaceIHopFileType- Returns:
- The file type extensions.
-
isHandledBy
public boolean isHandledBy(String filename, boolean checkContent) throws HopException
Description copied from interface:IHopFileTypeLook at the given file and see if it's handled by this type. Usually this is done by simply looking at the file extension. In rare cases we look at the content.- Specified by:
isHandledByin interfaceIHopFileType- Parameters:
filename- The filenamecheckContent- True if we want to look inside the file content- Returns:
- true if this HopFile is handling the file
- Throws:
HopException- In case something goes wrong like: file doesn't exist, a permission problem, ...
-
hasCapability
public boolean hasCapability(String capability)
Description copied from interface:IHopFileTypeCheck to see if the capability is present- Specified by:
hasCapabilityin interfaceIHopFileType- Parameters:
capability- The capability to check- Returns:
- True if the capability is set to any non-null value
-
-