org.apache.oodt.profile
Class ResourceAttributes

java.lang.Object
  extended by org.apache.oodt.profile.ResourceAttributes
All Implemented Interfaces:
Serializable, Cloneable, Comparable, Documentable
Direct Known Subclasses:
SearchableResourceAttributes

public class ResourceAttributes
extends Object
implements Serializable, Cloneable, Comparable, Documentable

Resource attribuets. Objects of this class are resource attributes of profiles.

Author:
Kelly
See Also:
Serialized Form

Field Summary
protected  String aggregation
          Aggregation.
protected  String clazz
          Clazz.
protected  List contexts
          Contexts, one or more list of Strings.
protected  List contributors
          Contributors.
protected  List coverages
          Coverages.
protected  List creators
          Creators.
protected  List dates
          Dates.
protected  String description
          Descriptions.
protected  List formats
          Formats.
protected  String identifier
          Identifer.
protected  List languages
          Languages.
protected  List locations
          Locations, zero or more Strings.
protected  Profile profile
          Profile I describe.
protected  List publishers
          Publishers.
protected  List relations
          Relations.
protected  List rights
          Rights.
protected  List sources
          Sources.
protected  List subjects
          Subjects.
protected  String title
          Titles.
protected  List types
          Types.
 
Constructor Summary
ResourceAttributes()
          Create blank profile attributes.
ResourceAttributes(Profile profile)
          Create blank profile attributes belonging to a certain profile.
ResourceAttributes(Profile profile, Node root)
          Create resource attributes from an XML document.
ResourceAttributes(Profile profile, String identifier, String title, List formats, String description, List creators, List subjects, List publishers, List contributors, List dates, List types, List sources, List languages, List relations, List coverages, List rights, List contexts, String aggregation, String clazz, List locations)
          Create resource attributes from constituent attributes.
 
Method Summary
 Object clone()
           
 int compareTo(Object rhs)
           
static Document createResAttributesDocument()
          Create a <resAttributes> document using the profiles DTD.
 boolean equals(Object rhs)
           
 List getContributors()
          Get the contributors.
 List getCoverages()
          Get the coverages.
 List getCreators()
          Get the creators.
 List getDates()
          Get the dates.
 String getDescription()
          Get the description.
 List getFormats()
          Get the formats.
 String getIdentifier()
          Get the identifier.
 List getLanguages()
          Get the languages.
 List getPublishers()
          Get the publishers.
 List getRelations()
          Get the relations.
 String getResAggregation()
          Get the aggregation.
 String getResClass()
          Get the class.
 List getResContexts()
          Get the contexts.
 List getResLocations()
          Get the locations.
 List getRights()
          Get the rights.
 List getSources()
          Get the sources.
 List getSubjects()
          Get the subjects.
 String getTitle()
          Get the title.
 List getTypes()
          Get the types.
 URI getURI()
           
 int hashCode()
           
protected  void initializeLists()
          Initialize all the various List fields.
 void setDescription(String description)
          Set the description.
 void setIdentifier(String identifier)
          Set the identifier.
 void setResAggregation(String aggregation)
          Set the aggregation.
 void setResClass(String clazz)
          Set the class.
 void setTitle(String title)
          Set the title.
 String toString()
           
 Node toXML(Document doc)
          Serialize this attributes as an XML node.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

profile

protected Profile profile
Profile I describe.


identifier

protected String identifier
Identifer.


title

protected String title
Titles.


formats

protected List formats
Formats.


description

protected String description
Descriptions.


creators

protected List creators
Creators.


subjects

protected List subjects
Subjects.


publishers

protected List publishers
Publishers.


contributors

protected List contributors
Contributors.


dates

protected List dates
Dates.


types

protected List types
Types.


sources

protected List sources
Sources.


languages

protected List languages
Languages.


relations

protected List relations
Relations.


coverages

protected List coverages
Coverages.


rights

protected List rights
Rights.


contexts

protected List contexts
Contexts, one or more list of Strings.


aggregation

protected String aggregation
Aggregation.


clazz

protected String clazz
Clazz.


locations

protected List locations
Locations, zero or more Strings.

Constructor Detail

ResourceAttributes

public ResourceAttributes()
Create blank profile attributes.


ResourceAttributes

public ResourceAttributes(Profile profile)
Create blank profile attributes belonging to a certain profile.

Parameters:
profile - Owning profile.

ResourceAttributes

public ResourceAttributes(Profile profile,
                          Node root)
Create resource attributes from an XML document.

Parameters:
profile - Owning profile.
root - The <resAttributes> element.

ResourceAttributes

public ResourceAttributes(Profile profile,
                          String identifier,
                          String title,
                          List formats,
                          String description,
                          List creators,
                          List subjects,
                          List publishers,
                          List contributors,
                          List dates,
                          List types,
                          List sources,
                          List languages,
                          List relations,
                          List coverages,
                          List rights,
                          List contexts,
                          String aggregation,
                          String clazz,
                          List locations)
Create resource attributes from constituent attributes. According to the Dublin Core, these attributes may be multivalued, but we force the identifier, title, and description to be singly values in the DTD, so it is here, too. Unless otherwise specified, these are all collections of String.

Parameters:
profile - Owning profile.
identifier - The unique identifier.
title - Title of the resource.
formats - Format of the resource.
description - Description of the resource.
creators - Who/what created the resource.
subjects - Subject matter covered by the resource.
publishers - Who/what published the resrouce.
contributors - Who/what contributed to the resource.
dates - When the resource was created (collection of Date.
types - Type of the resource.
sources - Source of the resource.
languages - Language in which the resource is written.
relations - Relationships to the resource.
coverages - Coverage of the resource.
rights - Rights of the resource.
contexts - Context of the resource.
aggregation - Aggregation of the resource.
clazz - Class of the resource.
locations - Location of the resource.
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object rhs)
Overrides:
equals in class Object

compareTo

public int compareTo(Object rhs)
Specified by:
compareTo in interface Comparable

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Overrides:
clone in class Object

getURI

public URI getURI()

getIdentifier

public String getIdentifier()
Get the identifier.

Returns:
The identifier.

setIdentifier

public void setIdentifier(String identifier)
Set the identifier.

Parameters:
identifier - The identifier.

getTitle

public String getTitle()
Get the title.

Returns:
The title.

setTitle

public void setTitle(String title)
Set the title.

Parameters:
title - The title.

getFormats

public List getFormats()
Get the formats.

Returns:
The formats.

setDescription

public void setDescription(String description)
Set the description.

Parameters:
description - The new description.

getDescription

public String getDescription()
Get the description.

Returns:
The description.

getCreators

public List getCreators()
Get the creators.

Returns:
The creators.

getSubjects

public List getSubjects()
Get the subjects.

Returns:
The subjects.

getPublishers

public List getPublishers()
Get the publishers.

Returns:
The publishers.

getContributors

public List getContributors()
Get the contributors.

Returns:
The contributors.

getDates

public List getDates()
Get the dates.

Returns:
The dates.

getTypes

public List getTypes()
Get the types.

Returns:
The types.

getSources

public List getSources()
Get the sources.

Returns:
The sources.

getLanguages

public List getLanguages()
Get the languages.

Returns:
The languages.

getRelations

public List getRelations()
Get the relations.

Returns:
The relations.

getCoverages

public List getCoverages()
Get the coverages.

Returns:
The coverages.

getRights

public List getRights()
Get the rights.

Returns:
The rights.

getResContexts

public List getResContexts()
Get the contexts.

Returns:
The contexts, a list of Strings.

getResAggregation

public String getResAggregation()
Get the aggregation.

Returns:
The aggregation.

setResAggregation

public void setResAggregation(String aggregation)
Set the aggregation.

Parameters:
aggregation - The aggregation.

getResClass

public String getResClass()
Get the class.

Returns:
The class.

setResClass

public void setResClass(String clazz)
Set the class.

Parameters:
clazz - The class.

getResLocations

public List getResLocations()
Get the locations.

Returns:
Locations, a list of Strings.

initializeLists

protected void initializeLists()
Initialize all the various List fields.


toXML

public Node toXML(Document doc)
           throws DOMException
Serialize this attributes as an XML node.

Specified by:
toXML in interface Documentable
Parameters:
doc - The document that will own this node.
Returns:
The XML element <resAttributes> representing these attributes.
Throws:
DOMException - If an error occurs creating the XML nodes.

createResAttributesDocument

public static Document createResAttributesDocument()
Create a <resAttributes> document using the profiles DTD.

Returns:
A <resAttributs> document with the profiles DTD.


Copyright © 1999-2011 Apache OODT. All Rights Reserved.