<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://protegewiki.stanford.edu/index.php?action=history&amp;feed=atom&amp;title=LoadFramesOntologyFromDB</id>
		<title>LoadFramesOntologyFromDB - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://protegewiki.stanford.edu/index.php?action=history&amp;feed=atom&amp;title=LoadFramesOntologyFromDB"/>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=LoadFramesOntologyFromDB&amp;action=history"/>
		<updated>2026-04-09T07:19:26Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=LoadFramesOntologyFromDB&amp;diff=1325&amp;oldid=prev</id>
		<title>JenniferVendetti at 00:54, February 23, 2008</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=LoadFramesOntologyFromDB&amp;diff=1325&amp;oldid=prev"/>
				<updated>2008-02-23T00:54:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:54, February 23, 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-weight:bold; font-size:18px;&amp;quot;&amp;gt;How do I load a Protege-Frames ontology from a Protege &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Database &lt;/del&gt;using the API?&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-weight:bold; font-size:18px;&amp;quot;&amp;gt;How do I load a Protege-Frames ontology from a Protege &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;database &lt;/ins&gt;using the API?&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Method 1'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Method 1'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JenniferVendetti</name></author>	</entry>

	<entry>
		<id>https://protegewiki.stanford.edu/index.php?title=LoadFramesOntologyFromDB&amp;diff=1322&amp;oldid=prev</id>
		<title>JenniferVendetti: migrating this page from old cim3 wiki</title>
		<link rel="alternate" type="text/html" href="https://protegewiki.stanford.edu/index.php?title=LoadFramesOntologyFromDB&amp;diff=1322&amp;oldid=prev"/>
				<updated>2008-02-23T00:42:07Z</updated>
		
		<summary type="html">&lt;p&gt;migrating this page from old cim3 wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;span style=&amp;quot;font-weight:bold; font-size:18px;&amp;quot;&amp;gt;How do I load a Protege-Frames ontology from a Protege Database using the API?&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Method 1'''&lt;br /&gt;
&lt;br /&gt;
The simplest way to load a Protege-Frames ontology from a database is to programatically load the project file (.pprj), which already contains all of the necessary database connection information:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
Project prj = Project.loadProjectFromFile(&amp;quot;/tmp/newspaper.pprj&amp;quot;,errors);&amp;lt;br /&amp;gt;&lt;br /&gt;
KnowledgeBase kb = prj.getKnowledgeBase();&amp;lt;br /&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Method 2'''&lt;br /&gt;
&lt;br /&gt;
The second method should be used if there is no project file (.pprj) associated with the Protege-Frames database ontology:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
DatabaseKnowledgeBaseFactory factory = new DatabaseKnowledgeBaseFactory();&amp;lt;br /&amp;gt;&lt;br /&gt;
Collection errors = new ArrayList();&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Project project = Project.createNewProject(factory, errors);&amp;lt;br /&amp;gt;&lt;br /&gt;
//replace the arguments with your own specific values&amp;lt;br /&amp;gt;&lt;br /&gt;
DatabaseKnowledgeBaseFactory.setSources(project.getSources(), &amp;quot;com.mysql.jdbc.Driver&amp;quot;, &amp;quot;jdbc:mysql://localhost/protege&amp;quot;, &amp;quot;table&amp;quot;, &amp;quot;user&amp;quot;, &amp;quot;password&amp;quot;);&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
project.createDomainKnowledgeBase(factory, errors, true);&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
//the following lines are optional. Use them only if you want to save the project&amp;lt;br /&amp;gt;&lt;br /&gt;
project.setProjectURI(new URI(&amp;quot;file:/tmp/newspaper_saved.pprj&amp;quot;));&amp;lt;br /&amp;gt;&lt;br /&gt;
project.save(errors);&amp;lt;br /&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>JenniferVendetti</name></author>	</entry>

	</feed>