com.hp.hpl.deli
Class Profile

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended bycom.hp.hpl.deli.Profile
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class Profile
extends java.util.Vector
implements java.io.Serializable

This class is a representation of a CC/PP profile as a Vector of ProfileAttribute.

Author:
Mark H. Butler (mark-h_butler@hp.com)
See Also:
Serialized Form

Constructor Summary
Profile(javax.servlet.http.HttpServletRequest request)
          Create a new profile from a HTTP Request.
Profile(java.lang.String resource)
          Create a new profile from a resource.
 
Method Summary
 ProfileAttribute getAttribute(com.hp.hpl.jena.rdf.model.Resource attributeName)
          Retrieve a profile attribute with a specific name.
 ProfileAttribute getAttribute(java.lang.String attributeName)
          Retrieve a profile attribute with a specific name.
 java.lang.String toString()
          Converts the object to a String.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Profile

public Profile(java.lang.String resource)
Create a new profile from a resource. This method does not use the profile cache.

Parameters:
resource - The resource representing a profile.

Profile

public Profile(javax.servlet.http.HttpServletRequest request)
Create a new profile from a HTTP Request. This method caches profile references but not profile-diffs.

Parameters:
request - The HTTP request.
Method Detail

getAttribute

public ProfileAttribute getAttribute(com.hp.hpl.jena.rdf.model.Resource attributeName)
Retrieve a profile attribute with a specific name.

Parameters:
attributeName - The attribute qname.
Returns:
The profile attribute.

getAttribute

public ProfileAttribute getAttribute(java.lang.String attributeName)
Retrieve a profile attribute with a specific name. (assumes that the attribute name is unique, regardless of URI: returns the first value encountered with qname fragment equal to that passed in).

Parameters:
attributeName - the UNQUALIFIED attribute name (ie just the fragment)
Returns:
The profile attribute

toString

public java.lang.String toString()
Converts the object to a String.

Returns:
The Profile as a String.