edu.washington.bhi.protegex.storage.xml
Class XMLBackend

java.lang.Object
  extended byedu.washington.bhi.protegex.storage.xml.XMLBackend
All Implemented Interfaces:
edu.stanford.smi.protege.model.KnowledgeBaseFactory

public class XMLBackend
extends java.lang.Object
implements edu.stanford.smi.protege.model.KnowledgeBaseFactory

XML schema backend for Protege 2000 Anton An June 19, 2001 Ping-Ping Lin October 16, 2002


Field Summary
 
Fields inherited from interface edu.stanford.smi.protege.model.KnowledgeBaseFactory
FACTORY_CLASS_NAME
 
Constructor Summary
XMLBackend()
           
 
Method Summary
 edu.stanford.smi.protege.model.KnowledgeBase createKnowledgeBase(java.util.Collection errors)
          Create a new knowledge base.
 edu.stanford.smi.protege.model.KnowledgeBaseSourcesEditor createKnowledgeBaseSourcesEditor(java.lang.String projectName, edu.stanford.smi.protege.util.PropertyList sources)
          Create a source editor
 java.lang.String getDescription()
          returns the description of this backend for display to users
 java.lang.String getLabel()
           
 java.lang.String getProjectFilePath()
          returns the path to any project file containing customized forms which are needed by this backend.
static java.lang.String getXMLFileName(edu.stanford.smi.protege.util.PropertyList sources)
          a helper method to extract the name of the file for storing classes from the property list
 void includeKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase kb, edu.stanford.smi.protege.util.PropertyList sources, java.util.Collection errors)
           
 boolean isComplete(edu.stanford.smi.protege.util.PropertyList sources)
           
 void loadKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase kb, edu.stanford.smi.protege.util.PropertyList sources, java.util.Collection errors)
           
static void main(java.lang.String[] args)
          method to make this class easy to debug
 void saveKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase kb, edu.stanford.smi.protege.util.PropertyList sources, java.util.Collection errors)
           
static void setSourceFiles(edu.stanford.smi.protege.util.PropertyList sources, java.lang.String XMLFileName)
          helper method to stuff the class and instances file names into the sources property list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLBackend

public XMLBackend()
Method Detail

createKnowledgeBase

public edu.stanford.smi.protege.model.KnowledgeBase createKnowledgeBase(java.util.Collection errors)
Create a new knowledge base. This implementation just uses DefaultKnowledgeBase.

Specified by:
createKnowledgeBase in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

includeKnowledgeBase

public void includeKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase kb,
                                 edu.stanford.smi.protege.util.PropertyList sources,
                                 java.util.Collection errors)
Specified by:
includeKnowledgeBase in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

loadKnowledgeBase

public void loadKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase kb,
                              edu.stanford.smi.protege.util.PropertyList sources,
                              java.util.Collection errors)
Specified by:
loadKnowledgeBase in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

saveKnowledgeBase

public void saveKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase kb,
                              edu.stanford.smi.protege.util.PropertyList sources,
                              java.util.Collection errors)
Specified by:
saveKnowledgeBase in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

createKnowledgeBaseSourcesEditor

public edu.stanford.smi.protege.model.KnowledgeBaseSourcesEditor createKnowledgeBaseSourcesEditor(java.lang.String projectName,
                                                                                                  edu.stanford.smi.protege.util.PropertyList sources)
Create a source editor

Specified by:
createKnowledgeBaseSourcesEditor in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

isComplete

public boolean isComplete(edu.stanford.smi.protege.util.PropertyList sources)
Specified by:
isComplete in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

getDescription

public java.lang.String getDescription()
returns the description of this backend for display to users

Specified by:
getDescription in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

getProjectFilePath

public java.lang.String getProjectFilePath()
returns the path to any project file containing customized forms which are needed by this backend. The file must be in the jar and the path must be relative to this class file location in the jar. Return null if no customized forms are needed.

Specified by:
getProjectFilePath in interface edu.stanford.smi.protege.model.KnowledgeBaseFactory

getLabel

public java.lang.String getLabel()

getXMLFileName

public static java.lang.String getXMLFileName(edu.stanford.smi.protege.util.PropertyList sources)
a helper method to extract the name of the file for storing classes from the property list


setSourceFiles

public static void setSourceFiles(edu.stanford.smi.protege.util.PropertyList sources,
                                  java.lang.String XMLFileName)
helper method to stuff the class and instances file names into the sources property list


main

public static void main(java.lang.String[] args)
method to make this class easy to debug