project35.soa.ontology.sources
Interface OntologyCaching


public interface OntologyCaching

this is an interface that lets Project35 handle ontology sources that use caching. it should only be used by classes that implement some form of the OntologySource interface. Project35's viewer classes will interrogate ontology sources to see what other interfaces they implement. If they discover the source has also implemented caching, they can render appropriate controls such as an "update" button on the viewer. Caching should be disabled if security is an issue.


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Method Summary
 void enableCaching(boolean enableCaching)
          establishes whether the ontology source will use caching or not.
 boolean isCachingEnabled()
          determines whether caching is enabled.
 boolean isUpToDate()
          determines whether an ontology source is current or not
 void setCacheDirectory(java.io.File cacheDirectory)
          sets a cache directory which can be used to store the latest copy of an ontology data set
 void update()
          causes the source to update itself so that it is current.
 

Method Detail

isUpToDate

boolean isUpToDate()
determines whether an ontology source is current or not

Returns:
true if the ontology source is current; otherwise it needs to be updated

setCacheDirectory

void setCacheDirectory(java.io.File cacheDirectory)
sets a cache directory which can be used to store the latest copy of an ontology data set

Parameters:
cacheDirectory - a directory that can hold temporary files used by the ontology source

isCachingEnabled

boolean isCachingEnabled()
determines whether caching is enabled.

Returns:
true if caching is enabled; otherwise caching is disabled

enableCaching

void enableCaching(boolean enableCaching)
establishes whether the ontology source will use caching or not. in some cases caching may be turned off because of a shortage of disk space resources, write protections on a file system or for security reasons

Parameters:
enableCaching - "true" if the source should use caching. "false" if the source should not use caching.

update

void update()
causes the source to update itself so that it is current.