Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Autodia::Handler::TorqUser)Contributed Perl DocumenAutodia::Handler::Torque(3)

NAME
       Autodia::Handler::Torque.pm - AutoDia handler for Torque	xml database
       schema

INTRODUCTION
       This provides Autodia with the ability to read Torque Database Schema
       files, allowing you to convert them via the Diagram Export methods to
       images (using GraphViz and VCG) or html/xml using custom	templates or
       to Dia.

SYNOPSIS
       use Autodia::Handler::Torque;

       my $handler = Autodia::Handler::dia->New(\%Config);

       $handler->Parse(filename); # where filename includes full or relative
       path.

Description
       The Torque handler will parse the xml file using	XML::Simple and
       populating the diagram object with class, superclass, and relationships
       representing tables and relationships.

       The Torque handler is registered	in the Autodia.pm module, which
       contains	a hash of language names and the name of their respective
       language.

       An example Torque database schema is shown here - its actually a	rather
       nice format apart from the Java studlyCaps..

       <?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>

       <!DOCTYPE database SYSTEM
       "http://db.apache.org/torque/dtd/database_3_0_1.dtd">

       <database name="INTERPLANETARY">

	 <table	name="CIVILIZATION">
	   <column name="CIV_ID" required="true" autoIncrement="true" primaryKey="true"	type="INTEGER"/>
	   <column name="NAME" required="true" type="LONGVARCHAR"/>
	 </table>

	 <table	name="CIV_PEOPLE">
	   <column name="CIV_ID" required="true" primaryKey="true" type="INTEGER"/>
	   <column name="PEOPLE_ID" required="true" primaryKey="true" type="INTEGER"/>

	   <foreign-key	foreignTable="CIVILIZATION">
	       <reference local="CIV_ID" foreign="CIV_ID"/>
	   </foreign-key>
	   <foreign-key	foreignTable="PEOPLE">
	       <reference local="PEOPLE_ID" foreign="PEOPLE_ID"/>
	   </foreign-key>
	 </table>

	 <table	name="PEOPLE">
	   <column name="PEOPLE_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/>
	   <column name="NAME" required="true" size="255" type="VARCHAR"/>
	   <column name="SPECIES" type="INTEGER" default="-2"/>
	   <column name="PLANET" type="INTEGER"	default="-1"/>
	 </table>
       </database>

METHODS
   CONSTRUCTION	METHOD
       use Autodia::Handler::Torque;

       my $handler = Autodia::Handler::Torque->New(\%Config); This creates a
       new handler using the Configuration hash	to provide rules selected at
       the command line.

   ACCESS METHODS
       $handler->Parse(filename); # where filename includes full or relative
       path.

       This parses the named file and returns 1	if successful or 0 if the file
       could not be opened.

SEE ALSO
       Autodia

       Torque

       Autodia::Handler

perl v5.24.1			  2009-02-16	   Autodia::Handler::Torque(3)

NAME | INTRODUCTION | SYNOPSIS | Description | METHODS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Autodia::Handler::Torque&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help