org.fcrepo.client.utility.validate.types
Class BasicObjectInfo

java.lang.Object
  extended by org.fcrepo.client.utility.validate.types.BasicObjectInfo
All Implemented Interfaces:
ObjectInfo

public class BasicObjectInfo
extends Object
implements ObjectInfo

A simple immutable implementation of ObjectInfo.

Author:
Jim Blake

Constructor Summary
BasicObjectInfo(String pid)
          Create a "stub" object with no relations, no datastreams.
BasicObjectInfo(String pid, Collection<RelationshipInfo> relations, Collection<DatastreamInfo> datastreams)
          Create a full object.
 
Method Summary
 boolean equals(Object obj)
           
 Collection<String> getContentModels()
           
 Collection<String> getDatastreamIds()
           
 DatastreamInfo getDatastreamInfo(String dsId)
           
 String getPid()
           
 Collection<RelationshipInfo> getRelations(String relationship)
           
 boolean hasContentModel(String contentmodelpid)
           
 int hashCode()
           
 boolean hasRelation(String relationship)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicObjectInfo

public BasicObjectInfo(String pid)
Create a "stub" object with no relations, no datastreams.


BasicObjectInfo

public BasicObjectInfo(String pid,
                       Collection<RelationshipInfo> relations,
                       Collection<DatastreamInfo> datastreams)
Create a full object.

Method Detail

getPid

public String getPid()
Specified by:
getPid in interface ObjectInfo

hasRelation

public boolean hasRelation(String relationship)
Specified by:
hasRelation in interface ObjectInfo

getRelations

public Collection<RelationshipInfo> getRelations(String relationship)
Specified by:
getRelations in interface ObjectInfo

getDatastreamIds

public Collection<String> getDatastreamIds()
Specified by:
getDatastreamIds in interface ObjectInfo

getDatastreamInfo

public DatastreamInfo getDatastreamInfo(String dsId)
Specified by:
getDatastreamInfo in interface ObjectInfo

getContentModels

public Collection<String> getContentModels()
Specified by:
getContentModels in interface ObjectInfo

hasContentModel

public boolean hasContentModel(String contentmodelpid)
Specified by:
hasContentModel in interface ObjectInfo

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 DuraSpace. All Rights Reserved.