Package com.globalmentor.net
Class ResourceModel<R extends Resource>
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
com.globalmentor.io.DefaultURIAccessible
com.globalmentor.io.URIAccessibleModel
com.globalmentor.net.ResourceModel<R>
- All Implemented Interfaces:
PropertyBindable
,PropertyConstrainable
,URIAccessible
,URIInputStreamable
,URIOutputStreamable
,Model
A model of a resource.
Bound properties:
RESOURCE_PROPERTY
(Resource
)- Indicates that the resource property has been changed.
- Author:
- Garret Wilson
- See Also:
-
Field Summary
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
Fields inherited from interface com.globalmentor.model.Model
MODEL_PROPERTY
-
Constructor Summary
ConstructorDescriptionDefault constructor.ResourceModel
(URIInputStreamable uriInputStreamable) URI input stream locator constructor.ResourceModel
(URI baseURI) Base URI constructor.ResourceModel
(URI baseURI, URIInputStreamable uriInputStreamable) Base URI and input stream locator constructor.ResourceModel
(R resource) Resource constructor.ResourceModel
(R resource, URIInputStreamable uriInputStreamable) Resource and URI input stream locator constructor.ResourceModel
(R resource, URIInputStreamable uriInputStreamable, URIOutputStreamable uriOutputStreamable) Resource and input/output stream locator constructor.ResourceModel
(R resource, URIOutputStreamable uriOutputStreamable) Resource and URI output stream locator constructor.ResourceModel
(R resource, URI baseURI) Resource and base URI constructor.ResourceModel
(R resource, URI baseURI, URIAccessible uriAccessible) Resource, base URI, and URI accessible constructor.ResourceModel
(R resource, URI baseURI, URIInputStreamable uriInputStreamable) Resource, base URI, and input stream locator constructor.ResourceModel
(R resource, URI baseURI, URIInputStreamable uriInputStreamable, URIOutputStreamable uriOutputStreamable) Full constructor.ResourceModel
(R resource, URI baseURI, URIOutputStreamable uriOutputStreamable) Resource, base URI, and output stream locator constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setResource
(R newResource) Sets the resource being modeled.Methods inherited from class com.globalmentor.io.URIAccessibleModel
getBaseURI, getEventListenerManager
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
-
Field Details
-
RESOURCE_PROPERTY
The resource property.
-
-
Constructor Details
-
ResourceModel
public ResourceModel()Default constructor. -
ResourceModel
Resource constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.
-
ResourceModel
Base URI constructor.- Parameters:
baseURI
- The base URI of the model, ornull
if unknown.
-
ResourceModel
Resource and base URI constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.baseURI
- The base URI of the model, ornull
if unknown.
-
ResourceModel
URI input stream locator constructor.- Parameters:
uriInputStreamable
- The implementation to use for accessing a URI for input, ornull
if the default implementation should be used.
-
ResourceModel
Resource and URI input stream locator constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.uriInputStreamable
- The implementation to use for accessing a URI for input, ornull
if the default implementation should be used.
-
ResourceModel
Resource and URI output stream locator constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.uriOutputStreamable
- The implementation to use for accessing a URI for output, ornull
if the default implementation should be used.
-
ResourceModel
Base URI and input stream locator constructor.- Parameters:
baseURI
- The base URI of the model, ornull
if unknown.uriInputStreamable
- The implementation to use for accessing a URI for input, ornull
if the default implementation should be used.
-
ResourceModel
Resource, base URI, and input stream locator constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.baseURI
- The base URI of the model, ornull
if unknown.uriInputStreamable
- The implementation to use for accessing a URI for input, ornull
if the default implementation should be used.
-
ResourceModel
Resource, base URI, and URI accessible constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.baseURI
- The base URI of the model, ornull
if unknown.uriAccessible
- The implementation to use for accessing a URI for input and output, ornull
if the default implementation should be used.
-
ResourceModel
Resource, base URI, and output stream locator constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.baseURI
- The base URI of the model, ornull
if unknown.uriOutputStreamable
- The implementation to use for accessing a URI for output, ornull
if the default implementation should be used.
-
ResourceModel
public ResourceModel(R resource, URIInputStreamable uriInputStreamable, URIOutputStreamable uriOutputStreamable) Resource and input/output stream locator constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.uriInputStreamable
- The implementation to use for accessing a URI for input, ornull
if the default implementation should be used.uriOutputStreamable
- The implementation to use for accessing a URI for output, ornull
if the default implementation should be used.
-
ResourceModel
public ResourceModel(R resource, URI baseURI, URIInputStreamable uriInputStreamable, URIOutputStreamable uriOutputStreamable) Full constructor.- Parameters:
resource
- The resource being modeled, ornull
if there is no resource.baseURI
- The base URI of the model, ornull
if unknown.uriInputStreamable
- The implementation to use for accessing a URI for input, ornull
if the default implementation should be used.uriOutputStreamable
- The implementation to use for accessing a URI for output, ornull
if the default implementation should be used.
-
-
Method Details
-
getResource
- Returns:
- The resource being modeled, or
null
if there is no resource.
-
setResource
Sets the resource being modeled. This is a bound property.- Parameters:
newResource
- The resource being modeled, ornull
if there is no resource.
-