blob: ccc19b575026bd52cd313af58b299a5d92ef8af2 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<!-- Generated by javadoc (version 1.7.0_03) on Fri Feb 22 10:18:07 CET 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>PuzzlePiece (Schema2template v0.8.9-incubating - http://incubator.apache.org/odftoolkit/)</title>
<meta name="date" content="2013-02-22">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PuzzlePiece (Schema2template v0.8.9-incubating - http://incubator.apache.org/odftoolkit/)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PuzzlePiece.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model"><span class="strong">Prev Class</span></a></li>
<li><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?schema2template/model/PuzzlePiece.html" target="_top">Frames</a></li>
<li><a href="PuzzlePiece.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">schema2template.model</div>
<h2 title="Class PuzzlePiece" class="title">Class PuzzlePiece</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>schema2template.model.PuzzlePiece</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&gt;, <a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a>, <a href="../../schema2template/model/QNamed.html" title="interface in schema2template.model">QNamed</a>, <a href="../../schema2template/model/QNamedPuzzleComponent.html" title="interface in schema2template.model">QNamedPuzzleComponent</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">PuzzlePiece</span>
extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&gt;, <a href="../../schema2template/model/QNamedPuzzleComponent.html" title="interface in schema2template.model">QNamedPuzzleComponent</a></pre>
<div class="block">One of the following RelaxNG definitions of an Element, Attribute, Value or Datatype.
<p>Each PuzzlePiece encapsulates one MSV Expression. Two PuzzlePiece can share
the same MSV Expression (RelaxNG pattern:
&lt;element&gt;&lt;choice&gt;&lt;name&gt;aName&lt;/name&gt;&lt;name&gt;anotherName&lt;/name&gt;&lt;/choice&gt;&lt;/element&gt;)
</p>
<p>Conventions: <ul>
<li>hashCode uses the hashCode from the encapsulated Expressions. So two Definitions (rarely) can
have the same hashCode. Equals uses Name _and_ hashCode.</li>
<li>Sorting is done by ns:local tag names as first key and hashCode as second key.</li>
<li>All returned PuzzlePieceSet objects are immutable to protect them against
naive usage in velocity templates</li></ul></p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#canHaveText()">canHaveText</a></strong>()</code>
<div class="block">Determines whether this Element can have a text node as child</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#compareTo(schema2template.model.PuzzlePiece)">compareTo</a></strong>(<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&nbsp;o)</code>
<div class="block">Uses the ns:local name of the wrapped MSV Expression as first key and the hashCode as second key.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#contentEquals(schema2template.model.PuzzlePiece)">contentEquals</a></strong>(<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&nbsp;other)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;b)</code>
<div class="block">Uses the name and the wrapped MSV Expression to test for equality.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#extractPuzzlePieces(com.sun.msv.grammar.Expression, schema2template.model.PuzzlePieceSet, schema2template.model.PuzzlePieceSet)">extractPuzzlePieces</a></strong>(com.sun.msv.grammar.Expression&nbsp;root,
<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;newElementSet,
<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;newAttributeSet)</code>
<div class="block">Creates all PuzzlePiece objects from MSV root tree.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getAttributes()">getAttributes</a></strong>()</code>
<div class="block">Gets the Attributes of this PuzzlePiece.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getChildElements()">getChildElements</a></strong>()</code>
<div class="block">Gets the child elements of this PuzzlePiece.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getCollection()">getCollection</a></strong>()</code>
<div class="block">Method to treat NamedDefined as a Collection of PuzzlePiece</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getDatatypes()">getDatatypes</a></strong>()</code>
<div class="block">Gets the defined datatypes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>com.sun.msv.grammar.Expression</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getExpression()">getExpression</a></strong>()</code>
<div class="block">Gets the wrapped Expression</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getLocalName()">getLocalName</a></strong>()</code>
<div class="block">Get only localname</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getMultipleNumber()">getMultipleNumber</a></strong>()</code>
<div class="block">Gets the index of 'this' in the List of Definitions returned by withMultiples()</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getNamespace()">getNamespace</a></strong>()</code>
<div class="block">Get only namespace</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getParents()">getParents</a></strong>()</code>
<div class="block">Gets the Parents which can contain this PuzzlePiece as a child</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getQName()">getQName</a></strong>()</code>
<div class="block">Gets the ns:local tag name of this PuzzlePiece</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../schema2template/model/MSVExpressionType.html" title="enum in schema2template.model">MSVExpressionType</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getType()">getType</a></strong>()</code>
<div class="block">Gets the type of this (ELEMENT, ATTRIBUTE, DATA, VALUE)</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#getValues()">getValues</a></strong>()</code>
<div class="block">Gets the defined constant values.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Uses the wrapped MSV Expression for the hashCode.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#isMandatory(schema2template.model.QNamedPuzzleComponent)">isMandatory</a></strong>(<a href="../../schema2template/model/QNamedPuzzleComponent.html" title="interface in schema2template.model">QNamedPuzzleComponent</a>&nbsp;child)</code>
<div class="block">ELEMENT Definition only: Determine solely by child type and name
whether child is mandatory.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#isSingleton(schema2template.model.PuzzleComponent)">isSingleton</a></strong>(<a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a>&nbsp;child)</code>
<div class="block">Determines whether the child PuzzlePiece(s) is/are singleton(s)
Convention: If child is a collection this method returns false if one child element is no singleton.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#toString()">toString</a></strong>()</code>
<div class="block">Returns String representation (convenient method for getQName())
Template Usage: Just use $aDefinition as you would use a string variable.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a></code></td>
<td class="colLast"><code><strong><a href="../../schema2template/model/PuzzlePiece.html#withMultiples()">withMultiples</a></strong>()</code>
<div class="block">Gets the List of Definitions which share the same tag name, but are defined multiple times in the schema.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;b)</pre>
<div class="block">Uses the name and the wrapped MSV Expression to test for equality.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - Another object</dd>
<dt><span class="strong">Returns:</span></dt><dd>Whether both objects equal</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Uses the wrapped MSV Expression for the hashCode. MSV Expressions are numbered consecutively by a distinct Hash Code.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="compareTo(schema2template.model.PuzzlePiece)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compareTo</h4>
<pre>public&nbsp;int&nbsp;compareTo(<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&nbsp;o)</pre>
<div class="block">Uses the ns:local name of the wrapped MSV Expression as first key and the hashCode as second key.
If o1.equals(o2) this method will return 0 (since both must share the same Expression and name).</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true#compareTo(T)" title="class or interface in java.lang">compareTo</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang">Comparable</a>&lt;<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - Other Object</dd>
<dt><span class="strong">Returns:</span></dt><dd>Comparison</dd></dl>
</li>
</ul>
<a name="contentEquals(schema2template.model.PuzzlePiece)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contentEquals</h4>
<pre>protected&nbsp;boolean&nbsp;contentEquals(<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&nbsp;other)</pre>
</li>
</ul>
<a name="getQName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getQName</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getQName()</pre>
<div class="block">Gets the ns:local tag name of this PuzzlePiece</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/QNamed.html#getQName()">getQName</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/QNamed.html" title="interface in schema2template.model">QNamed</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The tag name</dd></dl>
</li>
</ul>
<a name="getLocalName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLocalName</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getLocalName()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../schema2template/model/QNamed.html#getLocalName()">QNamed</a></code></strong></div>
<div class="block">Get only localname</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/QNamed.html#getLocalName()">getLocalName</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/QNamed.html" title="interface in schema2template.model">QNamed</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>localname</dd></dl>
</li>
</ul>
<a name="getNamespace()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNamespace</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getNamespace()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../schema2template/model/QNamed.html#getNamespace()">QNamed</a></code></strong></div>
<div class="block">Get only namespace</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/QNamed.html#getNamespace()">getNamespace</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/QNamed.html" title="interface in schema2template.model">QNamed</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>namespace</dd></dl>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<div class="block"><p>Returns String representation (convenient method for getQName())</p>
<p>Template Usage: Just use $aDefinition as you would use a string variable.</p></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="getType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getType</h4>
<pre>public&nbsp;<a href="../../schema2template/model/MSVExpressionType.html" title="enum in schema2template.model">MSVExpressionType</a>&nbsp;getType()</pre>
<div class="block">Gets the type of this (ELEMENT, ATTRIBUTE, DATA, VALUE)</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#getType()">getType</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The ExpressionType of this PuzzlePiece</dd></dl>
</li>
</ul>
<a name="getExpression()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getExpression</h4>
<pre>public&nbsp;com.sun.msv.grammar.Expression&nbsp;getExpression()</pre>
<div class="block">Gets the wrapped Expression</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The Expression wrapped by this.</dd></dl>
</li>
</ul>
<a name="canHaveText()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canHaveText</h4>
<pre>public&nbsp;boolean&nbsp;canHaveText()</pre>
<div class="block">Determines whether this Element can have a text node as child</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#canHaveText()">canHaveText</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>True if a text node is allowed, false otherwise</dd></dl>
</li>
</ul>
<a name="isSingleton(schema2template.model.PuzzleComponent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSingleton</h4>
<pre>public&nbsp;boolean&nbsp;isSingleton(<a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a>&nbsp;child)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html#isSingleton(schema2template.model.PuzzleComponent)">PuzzleComponent</a></code></strong></div>
<div class="block">Determines whether the child PuzzlePiece(s) is/are singleton(s)
Convention: If child is a collection this method returns false if one child element is no singleton.
If this is a collection this method returns false if child is no singleton for one element of this.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#isSingleton(schema2template.model.PuzzleComponent)">isSingleton</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>child</code> - PuzzleComponent child</dd>
<dt><span class="strong">Returns:</span></dt><dd>True if child is defined as Singleton, falso otherwise.</dd></dl>
</li>
</ul>
<a name="getCollection()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCollection</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../schema2template/model/PuzzlePiece.html" title="class in schema2template.model">PuzzlePiece</a>&gt;&nbsp;getCollection()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html#getCollection()">PuzzleComponent</a></code></strong></div>
<div class="block">Method to treat NamedDefined as a Collection of PuzzlePiece</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#getCollection()">getCollection</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>Collection of PuzzlePiece objects</dd></dl>
</li>
</ul>
<a name="withMultiples()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withMultiples</h4>
<pre>public&nbsp;<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;withMultiples()</pre>
<div class="block">Gets the List of Definitions which share the same tag name, but are defined multiple times in the schema.
The list is type specific, i.e. an ATTRIBUTE can never be a multiple of an ELEMENT.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The list of Definitions which share the same tag name.</dd></dl>
</li>
</ul>
<a name="getMultipleNumber()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMultipleNumber</h4>
<pre>public&nbsp;int&nbsp;getMultipleNumber()</pre>
<div class="block">Gets the index of 'this' in the List of Definitions returned by withMultiples()</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Index of this PuzzlePiece object in the PuzzlePieceSet returned by withMultiples()</dd></dl>
</li>
</ul>
<a name="getParents()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getParents</h4>
<pre>public&nbsp;<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;getParents()</pre>
<div class="block">Gets the Parents which can contain this PuzzlePiece as a child</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#getParents()">getParents</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The parent Definitions</dd></dl>
</li>
</ul>
<a name="getChildElements()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChildElements</h4>
<pre>public&nbsp;<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;getChildElements()</pre>
<div class="block">Gets the child elements of this PuzzlePiece. Please note that only Definitions of type ELEMENT can have child elements.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#getChildElements()">getChildElements</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The child Definitions of type ELEMENT</dd></dl>
</li>
</ul>
<a name="isMandatory(schema2template.model.QNamedPuzzleComponent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isMandatory</h4>
<pre>public&nbsp;boolean&nbsp;isMandatory(<a href="../../schema2template/model/QNamedPuzzleComponent.html" title="interface in schema2template.model">QNamedPuzzleComponent</a>&nbsp;child)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../schema2template/model/QNamedPuzzleComponent.html#isMandatory(schema2template.model.QNamedPuzzleComponent)">QNamedPuzzleComponent</a></code></strong></div>
<div class="block">ELEMENT Definition only: Determine solely by child type and name
whether child is mandatory.
<p>Here's why we're not using the child Definition object(s) for this:
An element often has a mandatory attribute, but two (or more) different content definitions
for this attribute. This is done by defining this attribute twice and creating a
CHOICE between both Definitions. If you'd ask whether one of these definitions is mandatory,
you'd always get false as answer as you have the choice between the two definitions.
Mostly this is not the answer you're looking for.</p>
<p>Contract: If 'this' is a Collection, mandatory means mandatory for one member of 'this'.</p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/QNamedPuzzleComponent.html#isMandatory(schema2template.model.QNamedPuzzleComponent)">isMandatory</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/QNamedPuzzleComponent.html" title="interface in schema2template.model">QNamedPuzzleComponent</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>child</code> - The child Definition(s) of type ELEMENT or ATTRIBUTE</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if child is a defined child of this and if it's mandatory. False otherwise.</dd></dl>
</li>
</ul>
<a name="getAttributes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttributes</h4>
<pre>public&nbsp;<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;getAttributes()</pre>
<div class="block">Gets the Attributes of this PuzzlePiece. Please note that only Definitions of type ELEMENT can have attributes.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#getAttributes()">getAttributes</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The child Definitions of type ATTRIBUTE</dd></dl>
</li>
</ul>
<a name="getValues()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValues</h4>
<pre>public&nbsp;<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;getValues()</pre>
<div class="block">Gets the defined constant values. Please note that only Definitions of type ATTRIBUTE can have values.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#getValues()">getValues</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The constant values</dd></dl>
</li>
</ul>
<a name="getDatatypes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDatatypes</h4>
<pre>public&nbsp;<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;getDatatypes()</pre>
<div class="block">Gets the defined datatypes. Please note that only Definitions of type ATTRIBUTE can have datatypes.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../schema2template/model/PuzzleComponent.html#getDatatypes()">getDatatypes</a></code>&nbsp;in interface&nbsp;<code><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model">PuzzleComponent</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The datatypes</dd></dl>
</li>
</ul>
<a name="extractPuzzlePieces(com.sun.msv.grammar.Expression, schema2template.model.PuzzlePieceSet, schema2template.model.PuzzlePieceSet)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>extractPuzzlePieces</h4>
<pre>public static&nbsp;void&nbsp;extractPuzzlePieces(com.sun.msv.grammar.Expression&nbsp;root,
<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;newElementSet,
<a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model">PuzzlePieceSet</a>&nbsp;newAttributeSet)</pre>
<div class="block">Creates all PuzzlePiece objects from MSV root tree.
The PuzzlePiece objects are all made immutable to protect them
against changes by naive template usage. Note that the Sets of all elements/attributes
can only be made immutable by the caller after this method run.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>root</code> - MSV root Expression</dd><dd><code>newElementSet</code> - empty Set. Will be filled with Definitions of Type.ELEMENT</dd><dd><code>newAttributeSet</code> - empty Set. Will be filled with Definitions of Type.ATTRIBUTE</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PuzzlePiece.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-files/index-1.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../schema2template/model/PuzzleComponent.html" title="interface in schema2template.model"><span class="strong">Prev Class</span></a></li>
<li><a href="../../schema2template/model/PuzzlePieceSet.html" title="class in schema2template.model"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?schema2template/model/PuzzlePiece.html" target="_top">Frames</a></li>
<li><a href="PuzzlePiece.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2010-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>