com.hp.hpl.deli
Class ProfileAttribute

java.lang.Object
  extended bycom.hp.hpl.deli.ProfileAttribute
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UAProfProfileAttribute

public abstract class ProfileAttribute
extends java.lang.Object
implements java.io.Serializable

This class represents a profile attribute.

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

Field Summary
protected  VectorUnique attributeValue
           
protected  com.hp.hpl.jena.rdf.model.Resource componentQName
           
protected  VectorUnique defaultAttributeValue
           
protected  com.hp.hpl.jena.rdf.model.Resource qName
           
 
Constructor Summary
ProfileAttribute()
          Create a new profile attribute.
 
Method Summary
 boolean contains(java.lang.String value)
          Does the attribute contain this literal value?
 java.util.Vector get()
          Retrieve the value from a profile attribute.
 java.lang.String getAttribute()
          Get the name of the attribute.
 java.lang.String getCollectionType()
          Get the collectionType of the attribute.
 java.lang.String getComponent()
          Get the component that the attribute belongs to.
 java.util.Vector getDefaultValue()
          Get the profile default attribute value.
 com.hp.hpl.jena.rdf.model.Resource getProperty(java.lang.String propName)
          Get a given property about this attributes Vocabulary entry.
protected  com.hp.hpl.jena.rdf.model.Resource getQName()
          Get the attribute qname
 java.lang.String getResolution()
          Get the resolution rule applied to the attribute.
 java.lang.String getType()
          Get the type of the attribute.
 java.lang.String getUri()
          Get the Uri for the attribute.
 java.util.Vector getValue()
          Get the profile attribute value.
protected abstract  void set(ProfileAttribute a)
          Combine two profile attributes using the resolution rules.
protected  void set(com.hp.hpl.jena.rdf.model.Resource propertyQName, com.hp.hpl.jena.rdf.model.Resource componentQName, VectorUnique b, boolean isDefault)
          Set the attribute to a specific value.
 java.lang.String toString()
          Converts the object to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

qName

protected com.hp.hpl.jena.rdf.model.Resource qName

componentQName

protected com.hp.hpl.jena.rdf.model.Resource componentQName

attributeValue

protected VectorUnique attributeValue

defaultAttributeValue

protected VectorUnique defaultAttributeValue
Constructor Detail

ProfileAttribute

public ProfileAttribute()
Create a new profile attribute.

Method Detail

getQName

protected com.hp.hpl.jena.rdf.model.Resource getQName()
Get the attribute qname

Returns:
The attribute qname.

getValue

public java.util.Vector getValue()
Get the profile attribute value.

Returns:
The attribute value.

getDefaultValue

public java.util.Vector getDefaultValue()
Get the profile default attribute value.

Returns:
The default attribute value.

contains

public boolean contains(java.lang.String value)
Does the attribute contain this literal value?

Returns:
Does the attribute contain this literal value?

getProperty

public com.hp.hpl.jena.rdf.model.Resource getProperty(java.lang.String propName)
Get a given property about this attributes Vocabulary entry.

Returns:
the property value as a QName

getComponent

public java.lang.String getComponent()
Get the component that the attribute belongs to.

Returns:
The component.

getAttribute

public java.lang.String getAttribute()
Get the name of the attribute.

Returns:
The attribute name.

getResolution

public java.lang.String getResolution()
Get the resolution rule applied to the attribute.

Returns:
The resolution rule.

getCollectionType

public java.lang.String getCollectionType()
Get the collectionType of the attribute.

Returns:
The attribute collectionType.

getType

public java.lang.String getType()
Get the type of the attribute.

Returns:
The attribute type.

getUri

public java.lang.String getUri()
Get the Uri for the attribute.

Returns:
The actual Uri used by DELI for this attribute. (Note that this may be different than the Uri sent with a profile, if the uri sent with a profile was an alias defined in the namespace configuration file).

set

protected void set(com.hp.hpl.jena.rdf.model.Resource propertyQName,
                   com.hp.hpl.jena.rdf.model.Resource componentQName,
                   VectorUnique b,
                   boolean isDefault)
Set the attribute to a specific value.

Parameters:
propertyQName - The property QName
componentQName - The component Qname
b - The value of the attribute.
isDefault - Is this a default value?

set

protected abstract void set(ProfileAttribute a)
Combine two profile attributes using the resolution rules.

Parameters:
a - The profile attribute.

get

public java.util.Vector get()
Retrieve the value from a profile attribute. This method enforces the rule that normal attribute values always override default attribute values.

Returns:
The attribute value.

toString

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

Returns:
The ProfileAttribute as a String.