com.hp.hpl.jena.ontology.daml
Interface LiteralAccessor

All Superinterfaces:
PropertyAccessor
All Known Subinterfaces:
IntLiteralAccessor

public interface LiteralAccessor
extends PropertyAccessor

Encapsulates the standard methods of modifying a property on a DAML object, where the value of the property is an RDF literal (as opposed to another DAML value, see PropertyAccessor.

Version:
CVS info: $Id: LiteralAccessor.java,v 1.5 2004/12/06 13:50:18 andy_seaborne Exp $
Author:
Ian Dickinson, HP Labs (email)

Method Summary
 void addValue(String value)
          Add a value to the encapsulated property.
 Literal getValue()
          Answer the value of the encapsulated property.
 boolean hasValue(String value)
          Answer true if the encapsulated property has the given value as one of its values.
 void removeValue(String value)
          Remove a value from the encapsulated property.
 
Methods inherited from interface com.hp.hpl.jena.ontology.daml.PropertyAccessor
add, count, get, getAll, getDAMLValue, getList, getProperty, hasValue, remove
 

Method Detail

getValue

Literal getValue()

Answer the value of the encapsulated property. If it has no values, answer null. If it has one value, answer that value. Otherwise, answer an undetermined member of the set of values.

Returns:
The literal value of the encapsulated property, or null.

addValue

void addValue(String value)

Add a value to the encapsulated property.

Parameters:
value - The value to be added, as a string.

removeValue

void removeValue(String value)

Remove a value from the encapsulated property.

Parameters:
value - The value to be removed, as a string.

hasValue

boolean hasValue(String value)

Answer true if the encapsulated property has the given value as one of its values.

Parameters:
value - A String value to test for
Returns:
True if the RDF model contains a statement giving a value for the encapsulated property matching the given value.


Copyright © 2000, 2001, 2002, 2003, 2004 Hewlett-Packard Development Company, LP