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

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
private  java.util.HashMap attributeNameToAttributePosition
          A map to relate the attribute name to the attribute position(s) in the profile.
private static long serialVersionUID
          Comment for serialVersionUID
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
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
private  void finishConstruction(java.util.Vector unresolved)
          This finishes construction by applying the resolution rule to any duplicate attributes.
 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, removeRange, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Comment for serialVersionUID

See Also:
Constant Field Values

attributeNameToAttributePosition

private java.util.HashMap attributeNameToAttributePosition
A map to relate the attribute name to the attribute position(s) in the profile. [Note that the value is a Vector(Int) of referencing elements in the resolved profile].

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

finishConstruction

private void finishConstruction(java.util.Vector unresolved)
This finishes construction by applying the resolution rule to any duplicate attributes.


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.