se.kb.oai.ore
Class AggregateBase

java.lang.Object
  extended by se.kb.oai.ore.AggregateBase
Direct Known Subclasses:
AggregatedResource, Aggregation

public abstract class AggregateBase
extends Object

Abstract base class for those classes that make up an aggregation, i.e. Aggregation and AggregatedResource. It can be used to get and set Types and Metadata.

Author:
Oskar Grenholm, National Library of Sweden

Field Summary
protected  URI id
           
protected  List<Metadata> metadata
           
protected  List<Type> types
           
 
Constructor Summary
AggregateBase(URI id)
          Creates an AggregateBase with the specified id.
 
Method Summary
 void addMetadata(Metadata meta)
          Add a Metadata to the list of metadata.
 void addType(Type type)
          Add a Type to this object.
 URI getId()
          Get the id.
 List<Metadata> getMetadata()
          Get a list of all the Metadata for this object.
 List<Metadata> getMetadata(QName name)
          Get a list of only the Metadata that matches the qualified name for this object.
 List<Type> getTypes()
          Get all types associated with this object.
 void setId(URI id)
          Set the id.
 void setMetadata(List<Metadata> metadata)
          Set the metadata for this object.
 void setTypes(List<Type> types)
          Set the types associated with this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected URI id

types

protected List<Type> types

metadata

protected List<Metadata> metadata
Constructor Detail

AggregateBase

public AggregateBase(URI id)
Creates an AggregateBase with the specified id.

Parameters:
id - the id
Method Detail

getId

public URI getId()
Get the id.

Returns:
the id

setId

public void setId(URI id)
Set the id.

Parameters:
id - the id

getTypes

public List<Type> getTypes()
Get all types associated with this object.

Returns:
a list of types

setTypes

public void setTypes(List<Type> types)
Set the types associated with this object.

Parameters:
types - a list of types

addType

public void addType(Type type)
Add a Type to this object.

Parameters:
type - a type

getMetadata

public List<Metadata> getMetadata()
Get a list of all the Metadata for this object.

Returns:
a list with metadata

getMetadata

public List<Metadata> getMetadata(QName name)
Get a list of only the Metadata that matches the qualified name for this object.

Parameters:
name - a qualified name
Returns:
a list with metadata

setMetadata

public void setMetadata(List<Metadata> metadata)
Set the metadata for this object.

Parameters:
metadata - a list with metadata

addMetadata

public void addMetadata(Metadata meta)
Add a Metadata to the list of metadata.

Parameters:
meta - a metadata


Copyright © 2008. All Rights Reserved.