Protege 2.1

edu.stanford.smi.protege.storage.clips
Class ClipsKnowledgeBaseFactory

java.lang.Object
  extended byedu.stanford.smi.protege.model.AbstractKnowledgeBaseFactory
      extended byedu.stanford.smi.protege.storage.clips.ClipsKnowledgeBaseFactory
All Implemented Interfaces:
KnowledgeBaseFactory, KnowledgeBaseFactory2

public class ClipsKnowledgeBaseFactory
extends AbstractKnowledgeBaseFactory

Storage backend to maintain a knowledge base in Clips 6.0 file format. Eventually this file format will be retired in favor of an XML + XML Schema format.

Author:
Ray Fergerson

Field Summary
 
Fields inherited from interface edu.stanford.smi.protege.model.KnowledgeBaseFactory
FACTORY_CLASS_NAME
 
Constructor Summary
ClipsKnowledgeBaseFactory()
           
 
Method Summary
 KnowledgeBase createKnowledgeBase(Collection errors)
           
 KnowledgeBaseSourcesEditor createKnowledgeBaseSourcesEditor(String project, PropertyList list)
          Note that this method should really take a URI for a param rather than a string.
static String getClsesSourceFile(PropertyList sources)
           
 Reader getClsesSourceReader(KnowledgeBase kb, PropertyList sources, Collection errors)
           
static URI getClsesSourceRelativeURI(PropertyList sources)
           
 String getDescription()
           
static String getInstancesSourceFile(PropertyList sources)
           
 Reader getInstancesSourceReader(KnowledgeBase kb, PropertyList sources, Collection errors)
           
static URI getInstancesSourceRelativeURI(PropertyList sources)
           
 boolean isComplete(PropertyList sources)
           
protected  void loadKnowledgeBase(KnowledgeBase kb, PropertyList sources, boolean isInclude, Collection errors)
           
 void loadKnowledgeBase(KnowledgeBase kb, Reader clsesReader, Reader instancesReader, boolean isInclude, Collection errors)
           
 void loadKnowledgeBase(KnowledgeBase kb, String clsesName, String instancesName, boolean isInclude, Collection errors)
           
 KnowledgeBase loadKnowledgeBase(Reader clsesReader, Reader instancesReader, Collection errors)
           
 KnowledgeBase loadKnowledgeBase(String clsesFileName, String instancesFileName, Collection errors)
           
 void saveKnowledgeBase(KnowledgeBase kb, PropertyList sources, Collection errors)
           
 void saveKnowledgeBase(KnowledgeBase kb, String clsesFilename, String instancesFilename, Collection errors)
           
 void saveKnowledgeBase(KnowledgeBase kb, Writer clsesWriter, Writer instancesWriter, Collection errors)
           
static void setSourceFiles(PropertyList sources, String clsesFileName, String instancesFileName)
           
static void setSourceURIs(PropertyList sources, URI relativeClsesURI, URI relativeInstancesURI)
           
 
Methods inherited from class edu.stanford.smi.protege.model.AbstractKnowledgeBaseFactory
close, close, createReader, createTempFile, createWriter, getProjectFilePath, getSourceUri, includeKnowledgeBase, loadKnowledgeBase, makeTempFilePermanent, prepareToSaveInFormat, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClipsKnowledgeBaseFactory

public ClipsKnowledgeBaseFactory()
Method Detail

createKnowledgeBase

public KnowledgeBase createKnowledgeBase(Collection errors)

createKnowledgeBaseSourcesEditor

public KnowledgeBaseSourcesEditor createKnowledgeBaseSourcesEditor(String project,
                                                                   PropertyList list)
Description copied from interface: KnowledgeBaseFactory
Note that this method should really take a URI for a param rather than a string. I maintain the string for backwards compatibility

Parameters:
project -
list -

getClsesSourceFile

public static String getClsesSourceFile(PropertyList sources)

getClsesSourceRelativeURI

public static URI getClsesSourceRelativeURI(PropertyList sources)

getClsesSourceReader

public Reader getClsesSourceReader(KnowledgeBase kb,
                                   PropertyList sources,
                                   Collection errors)
                            throws IOException
Throws:
IOException

getInstancesSourceReader

public Reader getInstancesSourceReader(KnowledgeBase kb,
                                       PropertyList sources,
                                       Collection errors)
                                throws IOException
Throws:
IOException

getDescription

public String getDescription()

getInstancesSourceFile

public static String getInstancesSourceFile(PropertyList sources)

getInstancesSourceRelativeURI

public static URI getInstancesSourceRelativeURI(PropertyList sources)

isComplete

public boolean isComplete(PropertyList sources)

loadKnowledgeBase

protected void loadKnowledgeBase(KnowledgeBase kb,
                                 PropertyList sources,
                                 boolean isInclude,
                                 Collection errors)
Specified by:
loadKnowledgeBase in class AbstractKnowledgeBaseFactory

loadKnowledgeBase

public void loadKnowledgeBase(KnowledgeBase kb,
                              Reader clsesReader,
                              Reader instancesReader,
                              boolean isInclude,
                              Collection errors)

loadKnowledgeBase

public void loadKnowledgeBase(KnowledgeBase kb,
                              String clsesName,
                              String instancesName,
                              boolean isInclude,
                              Collection errors)

loadKnowledgeBase

public KnowledgeBase loadKnowledgeBase(Reader clsesReader,
                                       Reader instancesReader,
                                       Collection errors)

loadKnowledgeBase

public KnowledgeBase loadKnowledgeBase(String clsesFileName,
                                       String instancesFileName,
                                       Collection errors)

saveKnowledgeBase

public void saveKnowledgeBase(KnowledgeBase kb,
                              PropertyList sources,
                              Collection errors)

saveKnowledgeBase

public void saveKnowledgeBase(KnowledgeBase kb,
                              Writer clsesWriter,
                              Writer instancesWriter,
                              Collection errors)

saveKnowledgeBase

public void saveKnowledgeBase(KnowledgeBase kb,
                              String clsesFilename,
                              String instancesFilename,
                              Collection errors)

setSourceFiles

public static void setSourceFiles(PropertyList sources,
                                  String clsesFileName,
                                  String instancesFileName)

setSourceURIs

public static void setSourceURIs(PropertyList sources,
                                 URI relativeClsesURI,
                                 URI relativeInstancesURI)

Protege 2.1

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2004 Stanford University.