Package com.globalmentor.model
Class ModelViewIOKit<M>
- java.lang.Object
-
- com.globalmentor.beans.BoundPropertyObject
-
- com.globalmentor.io.DefaultURIAccessible
-
- com.globalmentor.model.AbstractViewIOKit<M>
-
- com.globalmentor.model.ModelViewIOKit<M>
-
- All Implemented Interfaces:
PropertyBindable
,PropertyConstrainable
,URIAccessible
,URIInputStreamable
,URIOutputStreamable
,ViewIOKit<M>
@Deprecated public class ModelViewIOKit<M> extends AbstractViewIOKit<M>
Deprecated.An implementation for loading information into a view or saving information from a view using a model's I/O kit.- Author:
- Garret Wilson
-
-
Field Summary
-
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
-
-
Constructor Summary
Constructors Constructor Description ModelViewIOKit(IOKit<M> modelIOKit)
Deprecated.Constructs a model/view kit from a model's input/output implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected IOKit<M>
getModelIOKit()
Deprecated.void
load(ModelView<M> view, java.io.InputStream inputStream, java.net.URI baseURI)
Deprecated.Loads data into a view from an input stream.void
save(ModelView<M> view, java.io.OutputStream outputStream)
Deprecated.Saves a view to an output stream.-
Methods inherited from class com.globalmentor.model.AbstractViewIOKit
load, save
-
Methods inherited from class com.globalmentor.io.DefaultURIAccessible
getDefaultURIAccessible, getInputStream, getOutputStream, getPassword, getUsername, setPassword, setUsername
-
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.globalmentor.io.URIInputStreamable
getInputStream
-
Methods inherited from interface com.globalmentor.io.URIOutputStreamable
getOutputStream
-
-
-
-
Method Detail
-
getModelIOKit
protected IOKit<M> getModelIOKit()
Deprecated.- Returns:
- The implementation for loading and saving the model.
-
load
public void load(ModelView<M> view, java.io.InputStream inputStream, java.net.URI baseURI) throws java.io.IOException
Deprecated.Loads data into a view from an input stream.- Parameters:
view
- The view into which the data should be loaded.inputStream
- The input stream from which to read the data.baseURI
- The base URI of the content, ornull
if no base URI is available.- Throws:
java.io.IOException
- Thrown if there is an error reading the data.
-
save
public void save(ModelView<M> view, java.io.OutputStream outputStream) throws java.io.IOException
Deprecated.Saves a view to an output stream.If saving is successful and the view is
Modifiable
, the view's modified status is set tofalse
.A calling program should first call the view's
verify()
method to ensure the data is valid and that the model reflects the currently entered data.- Parameters:
view
- The view the data of which will be written to the given output stream.outputStream
- The output stream to which to write the model content.- Throws:
java.io.IOException
- Thrown if there is an error writing the data.- See Also:
Modifiable
,Verifiable.verify()
-
-