ORG.oclc.openurl.entities
Class AbstractEntity

java.lang.Object
  |
  +--ORG.oclc.openurl.entities.AbstractEntity
Direct Known Subclasses:
Administrative, ForeignKey, Referent, Referrer, ReferringEntity, Requester, Resolver, ServiceType

public abstract class AbstractEntity
extends java.lang.Object

Keys are KEV-encoded data pairs defined in ANSI/NISO Z39.88-2004 Sections 20.1, 21.1, and 22.1.

Author:
Jeffrey A. Young

Field Summary
protected  Descriptor[] descriptors
           
 
Constructor Summary
AbstractEntity(Descriptor[] descriptors)
           
 
Method Summary
 Descriptor[] getDescriptors()
           
static void init(java.util.Map initParams)
           
static Referent referentFactory(Descriptor[] descriptors)
           
static Referrer referrerFactory(Descriptor[] descriptors)
           
static ReferringEntity referringEntityFactory(Descriptor[] descriptors)
           
static Requester requesterFactory(Descriptor[] descriptors)
           
static Resolver resolverFactory(Descriptor[] descriptors)
           
static ServiceType serviceTypeFactory(Descriptor[] descriptors)
           
 java.lang.String toHybridOpenURL(Referrer[] referrers)
           
static java.lang.String toHybridOpenURL(Referrer[] referrers, AbstractEntity entity)
           
static java.lang.String toHybridOpenURL(Referrer[] referrers, AbstractEntity[] entities)
           
 java.lang.String toString()
           
abstract  java.lang.String toXml()
           
static java.lang.String toXml(AbstractEntity[] keys)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

descriptors

protected Descriptor[] descriptors
Constructor Detail

AbstractEntity

public AbstractEntity(Descriptor[] descriptors)
Parameters:
descriptors -
Method Detail

init

public static void init(java.util.Map initParams)
                 throws java.lang.SecurityException
Parameters:
initParams -
Throws:
java.lang.SecurityException

referentFactory

public static Referent referentFactory(Descriptor[] descriptors)
                                throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

referrerFactory

public static Referrer referrerFactory(Descriptor[] descriptors)
                                throws java.lang.Throwable
java.lang.Throwable

referringEntityFactory

public static ReferringEntity referringEntityFactory(Descriptor[] descriptors)
                                              throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

requesterFactory

public static Requester requesterFactory(Descriptor[] descriptors)
                                  throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

resolverFactory

public static Resolver resolverFactory(Descriptor[] descriptors)
                                throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

serviceTypeFactory

public static ServiceType serviceTypeFactory(Descriptor[] descriptors)
                                      throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException

getDescriptors

public Descriptor[] getDescriptors()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXml

public static java.lang.String toXml(AbstractEntity[] keys)
                              throws OpenURLException
Parameters:
keys -
Returns:
an XML Representation of the specified entity keys
Throws:
OpenURLException

toXml

public abstract java.lang.String toXml()
                                throws OpenURLException
OpenURLException

toHybridOpenURL

public static java.lang.String toHybridOpenURL(Referrer[] referrers,
                                               AbstractEntity[] entities)
                                        throws OpenURLException
OpenURLException

toHybridOpenURL

public static java.lang.String toHybridOpenURL(Referrer[] referrers,
                                               AbstractEntity entity)
                                        throws OpenURLException
OpenURLException

toHybridOpenURL

public java.lang.String toHybridOpenURL(Referrer[] referrers)
                                 throws OpenURLException
OpenURLException