org.mindswap.multimedia.impl
Class ImageImpl

java.lang.Object
  extended byResourceImpl
      extended byorg.mindswap.multimedia.impl.ImageImpl
All Implemented Interfaces:
DigitalMedia, Image
Direct Known Subclasses:
VideoFrameImpl

public class ImageImpl
extends ResourceImpl
implements Image

Title: ImageImpl

Description: Implements the Image interface

Copyright: Copyright (c) 2005

Company: Mindswap (http://www.mindswap.org/)

See Also:
Serialized Form

Field Summary
static Implementation factory
           
 
Constructor Summary
protected ImageImpl(Node n, EnhGraph eg)
          Creates a new Image resource.
Not for public use.
 
Method Summary
 DigitalMedia addDepicts(Resource theDepiction)
          Add the statement that this media depicts the specifed instance
 Image addRegion(Region theRegion)
          Add the statement that this region is a sub-region of this image
 java.lang.String getDCDescription()
          Returns the dc:description property for this image.
 java.net.URL getImageURL()
          Returns the URL of the image.
 StmtIterator listDepicts()
          List all the depictions for this Image
 StmtIterator listRegions()
          List all the sub-regions of this Image
protected  MultimediaModel mustBeValidModel()
           
 DigitalMedia removeDepicts(Resource theDepiction)
          Remove the statement that this media depicts the specifed instance
 Image removeRegion(Region theRegion)
          Remove the statement that this region is a sub-region of this image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public static Implementation factory
Constructor Detail

ImageImpl

protected ImageImpl(Node n,
                    EnhGraph eg)
Creates a new Image resource.
Not for public use. Intended for the Implementation factory to use when wrapping a Resource to an Image

Parameters:
n - Node the node to wrap as an image
eg - EnhGraph the graph the node belongs to
Method Detail

getImageURL

public java.net.URL getImageURL()
Returns the URL of the image. This is the URI of the Image resource itself, which should be the same as the image it represents.

Specified by:
getImageURL in interface Image
Returns:
URL the image url

getDCDescription

public java.lang.String getDCDescription()
Returns the dc:description property for this image.

Specified by:
getDCDescription in interface Image
Returns:
String the dc:description, or null if none exists

listRegions

public StmtIterator listRegions()
List all the sub-regions of this Image

Specified by:
listRegions in interface Image
Returns:
StmtIterator an iterator over the hasRegion statements

listDepicts

public StmtIterator listDepicts()
List all the depictions for this Image

Specified by:
listDepicts in interface Image
Returns:
StmtIterator an iterator over the depicts statements

addDepicts

public DigitalMedia addDepicts(Resource theDepiction)
Add the statement that this media depicts the specifed instance

Specified by:
addDepicts in interface DigitalMedia
Parameters:
theDepiction - Resource the resource to depict
Returns:
DigitalMedia a reference to this resource

removeDepicts

public DigitalMedia removeDepicts(Resource theDepiction)
Remove the statement that this media depicts the specifed instance

Specified by:
removeDepicts in interface DigitalMedia
Parameters:
theDepiction - Resource the depicted resource
Returns:
DigitalMedia a reference to this resource

addRegion

public Image addRegion(Region theRegion)
Add the statement that this region is a sub-region of this image

Specified by:
addRegion in interface Image
Parameters:
theRegion - the new sub region
Returns:
Image a reference to this image

removeRegion

public Image removeRegion(Region theRegion)
Remove the statement that this region is a sub-region of this image

Specified by:
removeRegion in interface Image
Parameters:
theRegion - the sub region to remove
Returns:
Image a reference to this image

mustBeValidModel

protected MultimediaModel mustBeValidModel()