org.mindswap.multimedia.impl
Class RegionImpl

java.lang.Object
  extended byResourceImpl
      extended byorg.mindswap.multimedia.impl.RegionImpl
All Implemented Interfaces:
DigitalMedia, Region

public class RegionImpl
extends ResourceImpl
implements Region

Title: RegionImpl

Description: An implementation of the Region interface

Copyright: Copyright (c) 2005

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

See Also:
Serialized Form

Field Summary
static Implementation factory
           
 
Constructor Summary
protected RegionImpl(Node n, EnhGraph eg)
          Creates a new RegionImpl resource.
Not for public use.
 
Method Summary
 DigitalMedia addDepicts(Resource theDepiction)
          Add the statement that this media depicts the specifed instance
 Image getImage()
          Returns the Image this Region is a part of.
 java.lang.String getRegionLabel()
          Returns the region label for this region resource.
 java.lang.String getSVGOutline()
          Returns the value of the svgOutline property
 StmtIterator listDepicts()
          List the resources this region depicts
protected  MultimediaModel mustBeValidModel()
           
 DigitalMedia removeDepicts(Resource theDepiction)
          Remove the statement that this media depicts the specifed instance
 Region setSVGOutline(java.lang.String theSVG)
          Sets the svg as the outline for the region.
 
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

RegionImpl

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

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

getRegionLabel

public java.lang.String getRegionLabel()
Returns the region label for this region resource. This is a convience method for retriving the rdfs:label of this resource

Specified by:
getRegionLabel in interface Region
Returns:
String the label, or null if none exists

setSVGOutline

public Region setSVGOutline(java.lang.String theSVG)
Description copied from interface: Region
Sets the svg as the outline for the region.

Specified by:
setSVGOutline in interface Region
Parameters:
theSVG - String the svg
Returns:
Region a reference to this region

getSVGOutline

public java.lang.String getSVGOutline()
Returns the value of the svgOutline property

Specified by:
getSVGOutline in interface Region
Returns:
String the svgOutline for the region

getImage

public Image getImage()
Returns the Image this Region is a part of.

Specified by:
getImage in interface Region
Returns:
Image the image for the region, or null if one is not found

listDepicts

public StmtIterator listDepicts()
List the resources this region depicts

Specified by:
listDepicts in interface DigitalMedia
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

mustBeValidModel

protected MultimediaModel mustBeValidModel()