Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hp.hpl.jena.ontology.daml.impl
Class LiteralAccessorImpl  view LiteralAccessorImpl download LiteralAccessorImpl.java

java.lang.Object
  extended bycom.hp.hpl.jena.ontology.daml.impl.PropertyAccessorImpl
      extended bycom.hp.hpl.jena.ontology.daml.impl.LiteralAccessorImpl
All Implemented Interfaces:
com.hp.hpl.jena.ontology.daml.LiteralAccessor, com.hp.hpl.jena.ontology.daml.PropertyAccessor
Direct Known Subclasses:
IntLiteralAccessorImpl

public class LiteralAccessorImpl
extends PropertyAccessorImpl
implements com.hp.hpl.jena.ontology.daml.LiteralAccessor

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 com.hp.hpl.jena.ontology.daml.PropertyAccessor.

Version:
CVS info: $Id: LiteralAccessorImpl.java,v 1.8 2005/02/21 12:05:30 andy_seaborne Exp $

Field Summary
 
Fields inherited from class com.hp.hpl.jena.ontology.daml.impl.PropertyAccessorImpl
m_property, m_val
 
Constructor Summary
LiteralAccessorImpl(com.hp.hpl.jena.rdf.model.Property property, com.hp.hpl.jena.ontology.OntResource val)
          Construct a new accessor for literal values of the given property.
 
Method Summary
 void addValue(java.lang.String value)
          Add a value to the encapsulated property.
 com.hp.hpl.jena.rdf.model.Literal getValue()
          Answer the value of the encapsulated property.
 boolean hasValue(java.lang.String value)
          Answer true if the encapsulated property has the given value as one of its values.
 void removeValue(java.lang.String value)
          Remove a value from the encapsulated property.
 
Methods inherited from class com.hp.hpl.jena.ontology.daml.impl.PropertyAccessorImpl
add, count, get, getAll, getDAMLValue, getList, getProperty, hasValue, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.ontology.daml.PropertyAccessor
add, count, get, getAll, getDAMLValue, getList, getProperty, hasValue, remove
 

Constructor Detail

LiteralAccessorImpl

public LiteralAccessorImpl(com.hp.hpl.jena.rdf.model.Property property,
                           com.hp.hpl.jena.ontology.OntResource val)

Construct a new accessor for literal values of the given property.

Method Detail

getValue

public com.hp.hpl.jena.rdf.model.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.

Specified by:
getValue in interface com.hp.hpl.jena.ontology.daml.LiteralAccessor

addValue

public void addValue(java.lang.String value)

Add a value to the encapsulated property.

Specified by:
addValue in interface com.hp.hpl.jena.ontology.daml.LiteralAccessor

removeValue

public void removeValue(java.lang.String value)

Remove a value from the encapsulated property.

Specified by:
removeValue in interface com.hp.hpl.jena.ontology.daml.LiteralAccessor

hasValue

public boolean hasValue(java.lang.String value)

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

Specified by:
hasValue in interface com.hp.hpl.jena.ontology.daml.LiteralAccessor