com.hp.hpl.mesa.rdf.jena.model
Interface Alt

All Superinterfaces:
Container, RDFNode, Resource
All Known Implementing Classes:
AltImpl, EnhAlt

public interface Alt
extends Container

An RDF Alternative container.

This interface defines methods for accessing RDF Alternative resources. These methods operate on the RDF statements contained in a model. The Alternative implementation may cache state from the underlying model, so objects should not be added to or removed from the Alternative by directly manipulating its properties, whilst the Alternative is being accessed through this interface.

When a member is deleted from an Alternative using this interface, or an iterator returned through this interface, all the other members with higher ordinals are renumbered using an implementation dependendent algorithm.

This interface provides methods supporting typed literals. This means that methods are provided which will translate a built in type, or an object to an RDF Literal. This translation is done by invoking the toString() method of the object, or its built in equivalent. The reverse translation is also supported. This is built in for built in types. Factory objects, provided by the application, are used for application objects.

This interface provides methods for supporting enhanced resources. An enhanced resource is a resource to which the application has added behaviour. RDF containers are examples of enhanced resources built in to this package. Enhanced resources are supported by encapsulating a resource created by an implementation in another class which adds the extra behaviour. Factory objects are used to construct such enhanced resources.

Version:
Release='$Name: $' Revision='$Revision: 1.1 $' Date='$Date: 2001/01/05 14:16:41 $'
Author:
bwm

Method Summary
 RDFNode getDefault()
          Return the default value for this resource.
 Alt getDefaultAlt()
          Return the default value for this resource.
 Bag getDefaultBag()
          Return the default value for this resource.
 boolean getDefaultBoolean()
          Return the default value for this resource.
 byte getDefaultByte()
          Return the default value for this resource.
 char getDefaultChar()
          Return the default value for this resource.
 double getDefaultDouble()
          Return the default value for this resource.
 float getDefaultFloat()
          Return the default value for this resource.
 int getDefaultInt()
          Return the default value for this resource.
 java.lang.String getDefaultLanguage()
          Return the language of the default value for this resource.
 Literal getDefaultLiteral()
          Return the default value for this resource.
 long getDefaultLong()
          Return the default value for this resource.
 java.lang.Object getDefaultObject(ObjectF f)
          Return the default value for this resource.
 Resource getDefaultResource()
          Return the default value for this resource.
 Resource getDefaultResource(ResourceF f)
          Return the default value for this resource.
 Seq getDefaultSeq()
          Return the default value for this resource.
 short getDefaultShort()
          Return the default value for this resource.
 java.lang.String getDefaultString()
          Return the default value for this resource.
 Container remove(Statement s)
          Remove a value from the container.
 Alt setDefault(boolean o)
          Set the default value of this container.
 Alt setDefault(char o)
          Set the default value of this container.
 Alt setDefault(double o)
          Set the default value of this container.
 Alt setDefault(float o)
          Set the default value of this container.
 Alt setDefault(long o)
          Set the default value of this container.
 Alt setDefault(java.lang.Object o)
          Set the default value of this container.
 Alt setDefault(RDFNode o)
          Set the default value of this container.
 Alt setDefault(java.lang.String o)
          Set the default value of this container.
 Alt setDefault(java.lang.String o, java.lang.String l)
          Set the default value of this container.
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Container
add, add, add, add, add, add, add, add, add, contains, contains, contains, contains, contains, contains, contains, contains, contains, iterator, size
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Resource
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getProperty, getURI, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, removeProperties, toString
 

Method Detail

setDefault

public Alt setDefault(RDFNode o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(boolean o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(long o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(char o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(float o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(double o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(java.lang.String o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(java.lang.String o,
                      java.lang.String l)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

setDefault

public Alt setDefault(java.lang.Object o)
               throws RDFException
Set the default value of this container.
Parameters:
o - The value to be set.
l - The language of the value to be set
Returns:
This object to permit cascading calls.
Throws:
RDFException - Generic RDF exception

getDefault

public RDFNode getDefault()
                   throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource.
Throws:
RDFException - Generic RDF Exception

getDefaultResource

public Resource getDefaultResource()
                            throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultLiteral

public Literal getDefaultLiteral()
                          throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultBoolean

public boolean getDefaultBoolean()
                          throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultByte

public byte getDefaultByte()
                    throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultShort

public short getDefaultShort()
                      throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultInt

public int getDefaultInt()
                  throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultLong

public long getDefaultLong()
                    throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultChar

public char getDefaultChar()
                    throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultFloat

public float getDefaultFloat()
                      throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultDouble

public double getDefaultDouble()
                        throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultString

public java.lang.String getDefaultString()
                                  throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultLanguage

public java.lang.String getDefaultLanguage()
                                    throws RDFException
Return the language of the default value for this resource.
Returns:
the language of the default value for this resource
Throws:
RDFException - Generic RDF Exception

getDefaultResource

public Resource getDefaultResource(ResourceF f)
                            throws RDFException
Return the default value for this resource.

The factory class f is used to create the object which is returned.

Parameters:
f - A factory class which will be used to create the object returned.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultObject

public java.lang.Object getDefaultObject(ObjectF f)
                                  throws RDFException
Return the default value for this resource.

The object returned is created by calling the createObject method of the factory object f.

Parameters:
f - A factory object used to create the object returned.
Returns:
the default value for this resource as an object created by the factory object f.
Throws:
RDFException - Generic RDF Exception

getDefaultAlt

public Alt getDefaultAlt()
                  throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultBag

public Bag getDefaultBag()
                  throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

getDefaultSeq

public Seq getDefaultSeq()
                  throws RDFException
Return the default value for this resource.
Returns:
the default value for this resource interpreted as the return type.
Throws:
RDFException - Generic RDF Exception

remove

public Container remove(Statement s)
                 throws RDFException
Remove a value from the container.

The predicate of the statement s identifies the ordinal of the value to be removed. Once removed, the values in the container with a higher ordinal value are renumbered. The renumbering algorithm is implementation dependent.

Specified by:
remove in interface Container
Parameters:
s - The statement to be removed from the model.
Returns:
this container to enable cascading calls.
Throws:
RDFException - Generic RDF Exception


Copyright © 2001 Hewlett-Packard. All Rights Reserved.