Support eIrOcA with a donation:
The library has also an applet and a Swing Java client able to view an organization chart read from a file, in different formats (one of them based upon XML).
The applet supports charts with different layouts and boxes with hyperlinks, customizable colors, sizes, positions, … and it is easy to embed in an HTML page.
To view the applet, you need a browser supporting Java Plug-in.
The full distribution, including source code, can be downloaded here.
Additional project resources are hosted in a Source Forge Repository.
OrgApplet.jar is the applet to view the charts, the applet requires a browser supporting Java Plug-in (with a Java version higher than 1.5). The syntax is:
<applet name="Organigram" code="OrganigramApplet.class" archive="URLTO_OrgApplet.jar"> <param name="DataSource" value="URLTO_organigram.xml" /> <param name="Target" value="_blank" /> <param name="Data" value="embedded organization chart definition" /> <param name="DataType" value="type of the definition" /> </applet>
The parameters meaning is:
Check the source page to see a real usage.
OrgApp.jar is a stand alone Java application to view the organization charts, that can be launched with the syntax:
java -jar OrgApp.jar path_to_organigram.xml
where path_to_organigram.xml is obviously the path to the organigram in any of the supported format (format used is autodetected).
Convert.jar is a tool to transform an organization chart file from a format to another, the syntax:
java -jar Convert.jar input_file [output_type | output_file] [fixup]
input_file is the path of the input organigram
output_type (optional) is the type of the output organigram, with the following encoding: 0 simple organigram format, 1 text organigram, 2 sitemap. The output will be printed to the screen, but can be redirected to a file (adding > path_to_output to the command).
output_file (optional) if this path ends with a Java ImageIO supported format a picture of the organigram is generated.
fixup (optional) if this parameter is present a “fix-up” is run.
The conversion form SOF format to another format can loose lot of information…
OrgApp support three organigram file formats.
The distribution contains server side library to easly integrate the applet.
OrgApp.inc is a PHP script to easly generate the HTML code necessary to draw the organization chart. Sample code:
require_once("lib\OrgApp.inc"); $OC = new OrgApp(); //Set the dimension of the chats $OC->width=400; $OC->height=300; //Generate a chart, the data is a URL $OC->emitRef('data.xml'); //Generate a chart, the data is read from a file and embedded in the html page $OC->emitFile('data.xml', 0); //Generate a chart with the data given $OC->emitData('<organigram><unit name="Doe, John" department="CEO" role="H"/></organigram>', 0);
It's also available a Dokuwiki plugin here.
B |-S ----------- | | | B B.. | |-O ..M |-O......
Copyright © 2005-2012 Frédéric Bergeron & eIrOcA (eNrIcO Croce & sImOnA Burzio)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.