Skip to content

Commit

Permalink
added code-block directive
Browse files Browse the repository at this point in the history
  • Loading branch information
t-morita committed Mar 14, 2016
1 parent 22ad14e commit ebabcb1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 8 additions & 5 deletions docs/source/plugin_development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ protected Model getProjectModel()

1. MR3Pluginクラスのサブクラスを作り,public void exec()メソッドをオーバーライドする.
2. マニフェストファイルに,プラグインクラス名とプラグイン名を以下のように記述し,プラグインクラスとマニフェストファイルをjarファイルでまとめる.(プラグインクラス名とプラグイン名は必須.creator, date, descriptionはオプション.)
::

.. code-block:: mf
Name: プラグインクラス名
plugin-name(or menu-name): プラグイン名
Expand All @@ -74,7 +75,8 @@ MR\ :sup:`3` \を起動するとファイル->プラグインにメニューが
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
マニフェストファイル
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::

.. code-block:: mf
Manifest-Version: 1.0
Expand Down Expand Up @@ -126,7 +128,8 @@ MR\ :sup:`3` \を起動するとファイル->プラグインにメニューが
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

サンプルプラグイン1では,subjectがhttp://mr3.sample.resource,predicateがhttp://mr3.sample.property,objectがSampleであるStatementから,JenaのModelを作成する.MR3PluginクラスのreplaceRDFModeメソッドを用いて,作成したJenaのModelをMR3のRDFグラフへ変換する.以下は,サンプルプラグイン1のソースコードである.
::

.. code-block:: java
/*
* @(#) SamplePlugin1.java
Expand Down Expand Up @@ -169,7 +172,7 @@ MR\ :sup:`3` \を起動するとファイル->プラグインにメニューが

サンプルプラグイン2では,MR\ :sup:`3` \PluginクラスのgetRDFModelメソッドを用いてMR\ :sup:`3` \のRDFグラフからJenaのModelを獲得する.獲得したModelをRDFに変換して内部ウィンドウに出力する.以下は,サンプルプラグイン2のソースコードである.

::
.. code-block:: java
/*
* @(#) SamplePlugin2.java
Expand Down Expand Up @@ -226,7 +229,7 @@ SugiyamaLayoutPlugin

SugiyamaLayoutPluginは,JGraphpadに付属するSugiyamaLayoutAlgorithm.javaをMR\ :sup:`3` \用に修正したクラスを利用して作成したプラグインである.SugiyamaLayoutAlgorithmクラスは,performsメソッドをもっている.performsメソッドは,org.jgraph.JGraphを引数にとり,グラフの整形を行う.SugiyamaLayoutPluginでは,MR3PluginクラスのgetRDFGraph,getClassGraph,getPropertyGraphメソッドを利用して,MR\ :sup:`3` \のグラフをJGraphオブジェクトとして受け取り,それをSugiyamaLayoutAlgoritmクラスのperformsメソッドに渡すことで,グラフを整形を行うことができる.以下は,SugiyamaLayoutPluginクラスのソースコードである.

::
.. code-block:: java
package org.semanticweb.mmm.mr3.layoutPlugin;
Expand Down
10 changes: 5 additions & 5 deletions docs/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RDFPrimerの中で紹介されているRDF文書(Example 1: RDF/XML Describing E

Example 1: RDF/XML Describing Eric Miller

::
.. code-block:: xml
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Expand Down Expand Up @@ -256,7 +256,7 @@ RDFSの置換例

変換前のRDFS

::
.. code-block:: xml
<?xml version="1.0"?>
<rdf:RDF
Expand All @@ -280,7 +280,7 @@ RDFSの置換例
変換前のRDF

::
.. code-block:: xml
<?xml version="1.0"?>
<rdf:RDF
Expand Down Expand Up @@ -310,7 +310,7 @@ RDFSの置換例

置換するRDFS

::
.. code-block:: xml
<?xml version="1.0"?>
<rdf:RDF
Expand Down Expand Up @@ -355,7 +355,7 @@ RDFSの置換を実行するとRDFS置換ダイアログが表示される.RDF

置換後のRDF

::
.. code-block:: xml
<?xml version="1.0"?>
<rdf:RDF
Expand Down

0 comments on commit ebabcb1

Please sign in to comment.