Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c0b2316b5320756fc35b43f35335d7ce > files > 148

perl-AcePerl-1.920.0-1mdv2010.0.i586.rpm

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ace::Model - Get information about AceDB models</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body style="background-color: white">


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<!--

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#methods">METHODS</a></li>
	<ul>

		<li><a href="#new__"><code>new()</code></a></li>
		<li><a href="#name__"><code>name()</code></a></li>
		<li><a href="#tags__"><code>tags()</code></a></li>
		<li><a href="#valid_tag__"><code>valid_tag()</code></a></li>
		<li><a href="#path__"><code>path()</code></a></li>
		<li><a href="#asstring__"><code>asString()</code></a></li>
	</ul>

	<li><a href="#see_also">SEE ALSO</a></li>
	<li><a href="#author">AUTHOR</a></li>
</ul>

-->


</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Ace::Model - Get information about AceDB models</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
  use Ace;
  my $db = Ace-&gt;connect(-path=&gt;'/usr/local/acedb/elegans');
  my $model = $db-&gt;model('Author');
  print $model;
  $name = $model-&gt;name;
  @tags = $model-&gt;tags;
  print &quot;Paper is a valid tag&quot; if $model-&gt;valid_tag('Paper');</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>This class is provided for access to AceDB class models.  It provides
the model in human-readable form, and does some limited but useful
parsing on your behalf.</p>
<p>Ace::Model objects are obtained either by calling an Ace database
handle's <code>model()</code> method to retrieve the model of a named class, or by
calling an Ace::Object's <code>model()</code> method to retrieve the object's
particular model.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<p>
</p>
<h2><a name="new__"><code>new()</code></a></h2>
<pre>
  $model = Ace::Model-&gt;new($model_data);</pre>
<p>This is a constructor intended only for use by Ace and Ace::Object
classes.  It constructs a new Ace::Model object from the raw string
data in models.wrm.</p>
<p>
</p>
<h2><a name="name__"><code>name()</code></a></h2>
<pre>
  $name = $model-&gt;name;</pre>
<p>This returns the class name for the model.</p>
<p>
</p>
<h2><a name="tags__"><code>tags()</code></a></h2>
<pre>
   @tags = $model-&gt;tags;</pre>
<p>This returns a list of all the valid tags in the model.</p>
<p>
</p>
<h2><a name="valid_tag__"><code>valid_tag()</code></a></h2>
<pre>
   $boolean  = $model-&gt;valid_tag($tag);</pre>
<p>This returns true if the given tag is part of the model.</p>
<p>
</p>
<h2><a name="path__"><code>path()</code></a></h2>
<pre>

   @path = $model-&gt;path($tag)</pre>
<p>Returns the path to the indicated tag, returning a list of intermediate tags.
For example, in the C elegans ?Locus model, the path for 'Compelementation_data&quot;
will return the list ('Type','Gene').</p>
<p>
</p>
<h2><a name="asstring__"><code>asString()</code></a></h2>
<pre>
   print $model-&gt;asString;</pre>
<p><code>asString()</code> returns the human-readable representation of the model with
comments stripped out.  Internally this method is called to
automatically convert the model into a string when appropriate.  You
need only to start performing string operations on the model object in
order to convert it into a string automatically:</p>
<pre>
   print &quot;Paper is unique&quot; if $model=~/Paper ?Paper UNIQUE/;</pre>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="/AcePerl/docs/./Ace.html">the Ace manpage</a></p>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Lincoln Stein &lt;<a href="mailto:lstein@w3.org">lstein@w3.org</a>&gt; with extensive help from Jean
Thierry-Mieg &lt;<a href="mailto:mieg@kaa.crbm.cnrs-mop.fr">mieg@kaa.crbm.cnrs-mop.fr</a>&gt;</p>
<p>Copyright (c) 1997-1998, Lincoln D. Stein</p>
<p>This library is free software; 
you can redistribute it and/or modify it under the same terms as Perl itself.</p>

</body>

</html>