com.hp.hpl.mesa.rdf.jena.rdb
Class ResourceImplRDB

java.lang.Object
  |
  +--com.hp.hpl.mesa.rdf.jena.common.ResourceImpl
        |
        +--com.hp.hpl.mesa.rdf.jena.rdb.ResourceImplRDB
All Implemented Interfaces:
RDFNode, Resource, ResourceI
Direct Known Subclasses:
PropertyImplRDB

public class ResourceImplRDB
extends ResourceImpl

A variation on the default Resource implementation that adds a unique database ID field. This could be hash generated from the string given a sufficiently unique hash but currently is assigned outside this class, typically as a generated ID in a database table.

Version:
$Revision: 1.2 $ on $Date: 2001/11/26 18:20:10 $
Author:
Dave Reynolds

Constructor Summary
ResourceImplRDB(AnonId id, Model m)
          Create an anonymouse resource for a model
ResourceImplRDB(Model m)
          Create a resource of unknown uri for a model
ResourceImplRDB(Resource r, Model m)
          Create a new resource for this model with the same parameters as an existing resource
ResourceImplRDB(java.lang.String uri)
          Create resources of known uri
ResourceImplRDB(java.lang.String uri, Model m)
          Create a resource of known uri for a model
ResourceImplRDB(java.lang.String namespace, java.lang.String localname)
          Create resources of known uri
ResourceImplRDB(java.lang.String namespace, java.lang.String localname, Model m)
          Create a resource of known uri for a model
 
Method Summary
 IDBID getRDBId()
          Return the unique ID for the resource or -1 for resources which have not yet be assigned an ID.
 IDBID getRDBNSId()
          Return the unique ID for the resource's namespace or -1 for resources which have not yet be assigned an ID.
 void setRDBId(IDBID id)
          Set the unique ID for the resource.
 void setRDBNSId(IDBID id)
          Set the unique ID for the resource's namespace
 
Methods inherited from class com.hp.hpl.mesa.rdf.jena.common.ResourceImpl
abort, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getEmbeddedResource, getId, getLocalName, getModel, getNameSpace, getProperty, getURI, hashCode, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, hasProperty, isAnon, listProperties, listProperties, port, removeProperties, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceImplRDB

public ResourceImplRDB(Model m)
Create a resource of unknown uri for a model

ResourceImplRDB

public ResourceImplRDB(java.lang.String uri,
                       Model m)
Create a resource of known uri for a model

ResourceImplRDB

public ResourceImplRDB(java.lang.String namespace,
                       java.lang.String localname,
                       Model m)
Create a resource of known uri for a model

ResourceImplRDB

public ResourceImplRDB(Resource r,
                       Model m)
Create a new resource for this model with the same parameters as an existing resource

ResourceImplRDB

public ResourceImplRDB(AnonId id,
                       Model m)
Create an anonymouse resource for a model

ResourceImplRDB

public ResourceImplRDB(java.lang.String namespace,
                       java.lang.String localname)
Create resources of known uri

ResourceImplRDB

public ResourceImplRDB(java.lang.String uri)
Create resources of known uri
Method Detail

getRDBId

public IDBID getRDBId()
Return the unique ID for the resource or -1 for resources which have not yet be assigned an ID.

setRDBId

public void setRDBId(IDBID id)
Set the unique ID for the resource.

getRDBNSId

public IDBID getRDBNSId()
Return the unique ID for the resource's namespace or -1 for resources which have not yet be assigned an ID.

setRDBNSId

public void setRDBNSId(IDBID id)
Set the unique ID for the resource's namespace


Copyright © 2001 Hewlett-Packard. All Rights Reserved.