https://protegewiki.stanford.edu/index.php?title=SavingDiffPromptPlugin&feed=atom&action=historySavingDiffPromptPlugin - Revision history2024-03-29T06:45:58ZRevision history for this page on the wikiMediaWiki 1.27.7https://protegewiki.stanford.edu/index.php?title=SavingDiffPromptPlugin&diff=12858&oldid=prevTaniaTudorache at 21:10, June 24, 20142014-06-24T21:10:06Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 21:10, June 24, 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l18" >Line 18:</td>
<td colspan="2" class="diff-lineno">Line 18:</td></tr>
<tr><td class='diff-marker'> </td><td style="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;"></td><td class='diff-marker'> </td><td style="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;"></td></tr>
<tr><td class='diff-marker'> </td><td style="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;"><div>For an example on how to implement SaveInMyFormatAction, you can look in the package edu.stanford.smi.protegex.prompt.eonExperiment that is distributed with the Prompt source code (but not used). Another example of the code that saves the diff to a file is in the TableRow class (saveToFile, saveToRDF).</div></td><td class='diff-marker'> </td><td style="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;"><div>For an example on how to implement SaveInMyFormatAction, you can look in the package edu.stanford.smi.protegex.prompt.eonExperiment that is distributed with the Prompt source code (but not used). Another example of the code that saves the diff to a file is in the TableRow class (saveToFile, saveToRDF).</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="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;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="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;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="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;"><div><ins style="font-weight: bold; text-decoration: none;">[[PROMPT|'''Go back to PROMPT wiki page''']]</ins></div></td></tr>
</table>TaniaTudorachehttps://protegewiki.stanford.edu/index.php?title=SavingDiffPromptPlugin&diff=12854&oldid=prevTaniaTudorache: Created page with "= Saving diff in Prompt = When Prompt compares two versions of an ontology, it generates a diff table. You can see this table on the '''Table View tab''' in Prompt results ..."2014-06-24T21:08:06Z<p>Created page with "= Saving diff in Prompt = When Prompt compares two versions of an ontology, it generates a diff table. You can see this table on the '''Table View tab''' in Prompt results ..."</p>
<p><b>New page</b></p><div>= Saving diff in Prompt =<br />
<br />
When Prompt compares two versions of an ontology, it generates a diff table. You can see this table on the '''Table View tab''' in Prompt results<br />
<br />
<br />
When you press the disk button in the top right corner, the diff is written out to a file in a tab-delimited format (more or less replicating the table you see in the UI). <br />
<br />
<br />
The easiest way to add a different output format is to write a Prompt plugin that adds another button to table view. When you click the button, the output on your format is generated. Here is what you need to do: <br />
<br />
* In a project plugin, attach a DiffAdapter (or DiffListener) to PromptDiff. The DiffAdapter should implement the following method: <br />
public void diffTableViewBuilt (DiffTableView view, DiffEvent event); <br />
<br />
<br />
* You will get an event when that table view is created. You can then add your own button, for instance, by calling <br />
view.addHeaderButton(new SaveInMyFormatAction (view)); <br />
<br />
<br />
For an example on how to implement SaveInMyFormatAction, you can look in the package edu.stanford.smi.protegex.prompt.eonExperiment that is distributed with the Prompt source code (but not used). Another example of the code that saves the diff to a file is in the TableRow class (saveToFile, saveToRDF).</div>TaniaTudorache