se.kb.oai.ore
Class AggregatedResource

java.lang.Object
  extended by se.kb.oai.ore.AggregateBase
      extended by se.kb.oai.ore.AggregatedResource

public class AggregatedResource
extends AggregateBase

An aggregated resource is a resource, that together with other resources, create an Aggregation. This class has the actual content of a resource and also metadata about it.

Author:
Oskar Grenholm, National Library of Sweden

Field Summary
 
Fields inherited from class se.kb.oai.ore.AggregateBase
id, metadata, types
 
Constructor Summary
AggregatedResource(String id)
          Create an AggreagatedResource with the specified id.
AggregatedResource(URI id)
          Create an AggreagatedResource with the specified id.
 
Method Summary
 InputStream getContent()
          Get an InputStream for the content held in this AggreagatedResource.
 String getContentAsString()
          Get a String containing the content for this AggreagatedResource.
 
Methods inherited from class se.kb.oai.ore.AggregateBase
addMetadata, addType, getId, getMetadata, getMetadata, getTypes, setId, setMetadata, setTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregatedResource

public AggregatedResource(String id)
                   throws URISyntaxException
Create an AggreagatedResource with the specified id.

Parameters:
id - the id
Throws:
URISyntaxException

AggregatedResource

public AggregatedResource(URI id)
Create an AggreagatedResource with the specified id.

Parameters:
id - the id
Method Detail

getContent

public InputStream getContent()
                       throws IOException
Get an InputStream for the content held in this AggreagatedResource.

Returns:
a stream to the content
Throws:
IOException

getContentAsString

public String getContentAsString()
                          throws IOException
Get a String containing the content for this AggreagatedResource.

Returns:
a stream to the content
Throws:
IOException


Copyright © 2008. All Rights Reserved.