public abstract class UniFileLoader extends MultiFileLoader
DataLoader.RecognizedFiles| Modifier and Type | Field and Description |
|---|---|
static String |
PROP_EXTENSIONS
name of property with extensions
|
PROP_ACTIONS, PROP_DISPLAY_NAME| Modifier | Constructor and Description |
|---|---|
protected |
UniFileLoader(Class<? extends DataObject> representationClass)
Deprecated.
Use UniFileLoader#UniFileLoader(String) instead.
|
protected |
UniFileLoader(String representationClassName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract MultiDataObject |
createMultiObject(FileObject primaryFile)
Creates the right data object for a given primary file.
|
protected MultiDataObject.Entry |
createPrimaryEntry(MultiDataObject obj,
FileObject primaryFile)
Creates the right primary entry for a given primary file.
|
protected MultiDataObject.Entry |
createSecondaryEntry(MultiDataObject obj,
FileObject secondaryFile)
Do not create a seconday entry.
|
protected FileObject |
findPrimaryFile(FileObject fo)
Get the primary file.
|
ExtensionList |
getExtensions()
Get the extension list for this data loader.
|
void |
readExternal(ObjectInput oi)
Reads nothing from the stream.
|
void |
setExtensions(ExtensionList ext)
Set the extension list for this data loader.
|
void |
writeExternal(ObjectOutput oo)
Writes extensions to the stream.
|
handleFindDataObjectactionsContext, clearSharedData, defaultActions, defaultDisplayName, findDataObject, findDataObject, getActions, getDisplayName, getLoader, getRepresentationClass, getRepresentationClassName, markFile, setActions, setDisplayNameaddNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, initialize, putProperty, putProperty, removeNotify, removePropertyChangeListener, reset, writeReplacepublic static final String PROP_EXTENSIONS
@Deprecated protected UniFileLoader(Class<? extends DataObject> representationClass)
representationClass - class that is produced by this loaderprotected UniFileLoader(String representationClassName)
representationClassName - the fully qualified name of the
representation class.protected FileObject findPrimaryFile(FileObject fo)
findPrimaryFile in class MultiFileLoaderfo - the file to find the primary file fornull if its extension is not recognizedprotected abstract MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException
MultiFileLoaderMultiFileLoader.findPrimaryFile(org.openide.filesystems.FileObject).createMultiObject in class MultiFileLoaderprimaryFile - the primary fileDataObjectExistsException - if the primary file already has a data objectIOExceptionprotected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, FileObject primaryFile)
MultiFileLoadercreatePrimaryEntry in class MultiFileLoaderobj - requesting objectprimaryFile - primary file recognized by this loaderprotected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, FileObject secondaryFile)
createSecondaryEntry in class MultiFileLoaderobj - ignoredsecondaryFile - ignoredUnsupportedOperationException - because this loader supports only a primary file objectpublic void setExtensions(ExtensionList ext)
ext - new list of extensionspublic ExtensionList getExtensions()
public void writeExternal(ObjectOutput oo) throws IOException
writeExternal in interface ExternalizablewriteExternal in class DataLoaderoo - ignoredIOExceptionpublic void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DataLoaderoi - ignoredIOExceptionClassNotFoundExceptionBuilt on August 24 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.