Package mgui.interfaces.io
Interface PersistentObject
- All Known Implementing Classes:
BoolPolygon2DInt,Box3DInt,Circle2DInt,CorticalHemisphereSet3DInt,CorticalSurfaceSet3DInt,DataSourceDriver,Ellipse2DInt,Graph2DInt,Graph3DInt,Image2DInt,Image3DInt,InterfaceShape,IntPolygon2DInt,JdbcOdbcDriver,Line2DInt,LPolygon2DInt,LPolygon3DInt,Mesh2DInt,Mesh3DInt,MorphSections3DInt,MySQLDriver,Plane3DInt,Point2DInt,PointSet2DInt,PointSet3DInt,Polygon2DInt,Polygon3DInt,PolygonSet3DInt,PostgreSQLDriver,RadialRep2DInt,Rect2DInt,Rect3DInt,SectionSet2DInt,SectionSet3DInt,Shape2DInt,Shape2DSelectionSet,Shape3DInt,ShapeSet2DInt,ShapeSet3DInt,TensorVolume3DInt,TestTextureInt,Text2DInt,Text2DIntMouseCoords,TinySQLDriver,Vector2DInt,Vector3DInt,VectorSet3DInt,Volume2DInt,Volume3DInt,Volume4DInt,VolumeSet3DInt,X3DScene3DInt
public interface PersistentObject
Interface for objects which can be made persistent (loaded from and written to persistent memory).
Functions specify file references and file loaders/writers.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Method Summary
Modifier and Type Method Description FileLoadergetFileLoader()Returns an instance of the file loader associated with this persistent object.FileWritergetFileWriter()Returns an instance of the file writer associated with this persistent object.InterfaceIOOptionsgetLoaderOptions()Returns the options used to last load this object, if availablejava.net.URLgetUrlReference()Returns the URL reference for this persistent object; i.e., the location where its data were loaded and where it should be written.InterfaceIOOptionsgetWriterOptions()Returns the options used to last write this object, if availablebooleansetFileLoader(InterfaceIOType io_type)Sets theInterfaceIOTypeassociated with this persistent object's loader.booleansetFileWriter(InterfaceIOType io_type)Sets theInterfaceIOTypeassociated with this persistent object's writer.voidsetLoaderOptions(InterfaceIOOptions options)Sets the options used to last load this object; can benull.voidsetUrlReference(java.net.URL url)Sets the URL reference for this persistent object; i.e., the location where its data were loaded and where it should be written.voidsetWriterOptions(InterfaceIOOptions options)Sets the options used to last write this object; can benull.
-
Method Details
-
getUrlReference
java.net.URL getUrlReference()Returns the URL reference for this persistent object; i.e., the location where its data were loaded and where it should be written.- Returns:
-
setUrlReference
void setUrlReference(java.net.URL url)Sets the URL reference for this persistent object; i.e., the location where its data were loaded and where it should be written.- Parameters:
url-
-
getFileLoader
Returns an instance of the file loader associated with this persistent object.- Returns:
- Throws:
java.io.IOException
-
getLoaderOptions
InterfaceIOOptions getLoaderOptions()Returns the options used to last load this object, if available- Returns:
- The options, or
nullif none exist
-
setFileLoader
Sets theInterfaceIOTypeassociated with this persistent object's loader.- Returns:
-
setLoaderOptions
Sets the options used to last load this object; can benull. -
getFileWriter
Returns an instance of the file writer associated with this persistent object.- Returns:
- Throws:
java.io.IOException
-
getWriterOptions
InterfaceIOOptions getWriterOptions()Returns the options used to last write this object, if available- Returns:
- The options, or
nullif none exist
-
setFileWriter
Sets theInterfaceIOTypeassociated with this persistent object's writer.- Returns:
-
setWriterOptions
Sets the options used to last write this object; can benull.
-