chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r944090 [2/3] - in /websites/staging/chemistry/trunk/content: ./ java/examples/example-create-type.html java/examples/index.html
Date Tue, 17 Mar 2015 10:04:34 GMT
Added: websites/staging/chemistry/trunk/content/java/examples/example-create-type.html
==============================================================================
--- websites/staging/chemistry/trunk/content/java/examples/example-create-type.html (added)
+++ websites/staging/chemistry/trunk/content/java/examples/example-create-type.html Tue Mar 17 10:04:33 2015
@@ -0,0 +1,1058 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<html>
+  <head>
+    <link type="text/css" rel="stylesheet" href="/resources/site.css" />
+    <script src="/resources/space.js" type="text/javascript"></script>
+    <meta name="keywords" content="CMIS, Content Management Interoperability Service, ECM, Enterprise Content Management, OASIS, integration standards, Chemistry, OpenCMIS, cmislib, DotCMIS, ObjectiveCMIS" />
+    <meta name="description" content="Apache Chemistry, CMIS Implementation" />
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <title>
+Apache Chemistry - Create Type
+    </title>
+  </head>
+<body onload="init()">
+  <table width="100%" cellpadding="0" cellspacing="0">
+    <tr width="100%">
+      <td id="cell-0-0">&nbsp;</td>
+      <td id="cell-0-1">&nbsp;</td>
+      <td id="cell-0-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-1-0">&nbsp;</td>
+      <td id="cell-1-1">
+        <div style="padding: 0px;">
+          <div id="banner">
+          <!-- Banner -->
+<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+<TR>
+<TD align="left" class="topbardiv" nowrap="">
+  <A href="http://chemistry.apache.org/" title="Apache Chemistry">
+    <IMG border="0" src="/images/chemistry_tm_logo_small.png"/>
+  </A>
+</TD>
+<TD align="right" nowrap="">
+  <A href="http://www.apache.org/" title="The Apache Software Foundation">
+    <IMG border="0" src="/images/asf-logo.png"/>
+  </A>
+</TD>
+</TR>
+</TABLE>
+          <!-- Banner -->
+          </div>
+        </div>
+        <div id="top-menu">
+          <table border="0" cellpadding="1" cellspacing="0" width="100%">
+            <tr>
+              <td>
+                <div align="left">
+                <!-- Breadcrumbs -->
+<a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/java">Java</a>&nbsp;&raquo&nbsp;<a href="/java/examples">Examples</a>&nbsp;&raquo&nbsp;<a href="/java/examples/example-create-type.html">Create Type</a>
+                <!-- Breadcrumbs -->
+                </div>
+              </td>
+              <td>
+                <div align="right">
+                <!-- Quicklinks -->
+<P>
+<A href="http://www.apache.org/" class="external-link" rel="nofollow">Apache</A>
+|
+<A href="http://www.apache.org/licenses/LICENSE-2.0.html" class="external-link" rel="nofollow">License</A>
+|
+<A href="/sitemap.html" title="SiteMap">Site Map</A>
+</P>
+                <!-- Quicklinks -->
+                </div>
+              </td>
+            </tr>
+          </table>
+        </div>
+      </td>
+      <td id="cell-1-2">&nbsp;</td>
+    </tr>
+    <tr width="100%">
+      <td id="cell-2-0">&nbsp;</td>
+      <td id="cell-2-1">
+        <table>
+          <tr height="100%" valign="top">
+            <td height="100%">
+              <div id="wrapper-menu-page-right">
+                <div id="wrapper-menu-page-top">
+                  <div id="wrapper-menu-page-bottom">
+                    <div id="menu-page">
+                    <!-- NavigationBar -->
+                    <H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/project/cmis.html" title="What's CMIS">What is CMIS?</A></LI>
+   <LI><A href="http://www.apache.org/licenses/" class="external-link" rel="nofollow">License</A></LI>
+   <LI><A href="/project/community.html" title="Community">Community</A></LI>
+   <LI><A href="http://mail-archives.apache.org/mod_mbox/chemistry-dev/" class="external-link" rel="nofollow">Mailing List</A></LI>
+   <LI><A href="https://issues.apache.org/jira/browse/CMIS" class="external-link" rel="nofollow">Issue Tracking</A></LI>
+   <LI><A href="http://www.apache.org/security/" class="external-link" rel="nofollow">Security</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Search"></A>Search</H3>
+
+<DIV style="padding: 0px 0px 0px 20px;">
+<FORM action="http://www.google.com/search" method="get" style="font-size: 10px;">
+<INPUT name="ie" type="hidden" value="UTF-8"></INPUT>
+<INPUT name="oe" type="hidden" value="UTF-8"></INPUT>
+  <INPUT maxlength="255" name="q" size="12" type="text" value=""></INPUT>
+  <INPUT name="btnG" type="submit" value="Search"></INPUT>
+  <INPUT name="domains" type="hidden" value="chemistry.apache.org"></INPUT>
+  <INPUT name="sitesearch" type="hidden" value="chemistry.apache.org"></INPUT>
+</FORM>
+</DIV>
+
+
+<H3><A name="Navigation-CMISforJava"></A>CMIS for Java</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/java/opencmis.html" title="OpenCMIS Overview and Index">Overview</A></LI>
+  <LI><A href="/java/download.html" title="Downloads">Downloads</A></LI>
+  <LI><A href="/java/developing/index.html" title="Developing">Developing with OpenCMIS</A></LI>
+  <LI><A href="/java/examples/index.html" title="Example Code">Example Code</A></LI>
+  <LI><A href="/java/how-to/index.html" title="OpenCMIS HowTos">OpenCMIS HowTos</A></LI>
+  <LI><A href="/java/0.12.0/maven/apidocs/" rel="nofollow">JavaDoc</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPython"></A>CMIS for Python</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/python/cmislib.html" title="cmislib">cmislib</A></LI>
+  <LI><A href="http://chemistry.apache.org/python/docs/" rel="nofollow">cmislib Documentation</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/cmislib/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforPHP"></A>CMIS for PHP</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/php/phpclient.html" title="phpclient">CMIS PHP Client</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISfor.NET"></A>CMIS for .NET</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/dotnet/dotcmis.html" title="DotCMIS">DotCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/dotcmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-CMISforObjective-C"></A>CMIS for Objective-C</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/objective-c/objectivecmis.html" title="ObjectiveCMIS">ObjectiveCMIS</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/objectivecmis/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+<H3><A name="Navigation-CMISforJavaScript"></A>CMIS for JavaScript</H3>
+
+<UL class="alternate" type="square">
+  <LI><A href="/javascript/parts.html" title="Chemistry Parts">Chemistry Parts</A></LI>
+  <LI><A href="https://svn.apache.org/repos/asf/chemistry/parts/trunk/" class="external-link" rel="nofollow">Source Code</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Sponsorship"></A>Sponsorship</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="http://www.apache.org/foundation/thanks.html" class="external-link" rel="nofollow">Thanks</A></LI>
+   <LI><A href="http://www.apache.org/foundation/sponsorship.html" class="external-link" rel="nofollow">Sponsoring Apache</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Internal"></A>Internal Docs</H3>
+
+<UL class="alternate" type="square">
+   <LI><A href="/internal/internal-index.html" rel="nofollow"> Internal Documentation</A></LI>
+</UL>
+                    <!-- NavigationBar -->
+                    </div>
+                </div>
+              </div>
+            </div>
+           </td>
+           <td height="100%">
+             <!-- Content -->
+             <div class="wiki-content"><h1 id="creating-a-type">Creating a type</h1>
+<p>Java command-line example using the CMIS 1.1 type mutability feature.</p>
+<div class="codehilite"><pre><span class="kn">package</span> <span class="n">typeMutability</span><span class="o">.</span><span class="na">enabled</span><span class="o">;</span>
+
+<span class="kn">import</span> <span class="nn">java.io.FileInputStream</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.io.FileNotFoundException</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.io.IOException</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.math.BigInteger</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.ArrayList</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.HashMap</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.LinkedHashMap</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.LinkedList</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.List</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.Map</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.Map.Entry</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">java.util.Properties</span><span class="o">;</span>
+
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.client.api.ObjectType</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.client.api.Repository</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.client.api.Session</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.client.api.SessionFactory</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.SessionParameter</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.data.CmisExtensionElement</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.data.RepositoryInfo</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.Choice</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.DocumentTypeDefinition</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.PropertyBooleanDefinition</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.PropertyIdDefinition</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.PropertyIntegerDefinition</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.PropertyStringDefinition</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.TypeDefinition</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.definitions.TypeMutability</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.enums.BaseTypeId</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.enums.Cardinality</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.enums.ContentStreamAllowed</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.enums.PropertyType</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.enums.Updatability</span><span class="o">;</span>
+<span class="kn">import</span> <span class="nn">org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException</span><span class="o">;</span>
+
+<span class="kn">import</span> <span class="nn">typeMutability.util.TestStringChoice</span><span class="o">;</span>
+
+<span class="cm">/* </span>
+<span class="cm"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span>
+<span class="cm"> * you may not use this file except in compliance with the License.</span>
+<span class="cm"> * You may obtain a copy of the License at</span>
+<span class="cm"> * </span>
+<span class="cm"> *   http://www.apache.org/licenses/LICENSE-2.0</span>
+<span class="cm"> * Unless required by applicable law or agreed to in writing, software</span>
+<span class="cm"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span>
+<span class="cm"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
+<span class="cm"> * See the License for the specific language governing permissions and</span>
+<span class="cm"> * limitations under the License.</span>
+<span class="cm"> *</span>
+<span class="cm"> *</span>
+<span class="cm"> * This code is based on the Apache Chemistry OpenCMIS FileShare project</span>
+<span class="cm"> * &lt;http://chemistry.apache.org/java/developing/repositories/dev-repositories-fileshare.html&gt;.</span>
+<span class="cm"> *</span>
+<span class="cm"> * This code is part of a training exercise and not intended for production use!</span>
+<span class="cm"> *</span>
+<span class="cm"> */</span>
+
+<span class="cm">/**</span>
+<span class="cm"> * Running this test requires an input file containing the connection </span>
+<span class="cm"> * properties for your CMIS server. </span>
+<span class="cm"> *</span>
+<span class="cm"> * The default/static location is /temp/cmis.properties</span>
+<span class="cm"> * and is hard coded in the main() method. </span>
+<span class="cm"> * See the loadConnectionProperties() call if you </span>
+<span class="cm"> * need to change this location or make it dynamic. </span>
+<span class="cm"> * </span>
+<span class="cm"> * Example format for a typical cmis.properties file:</span>
+<span class="cm"> * You can also refer to the properties section in the </span>
+<span class="cm"> * Workbench page here:</span>
+<span class="cm"> * http://chemistry.apache.org/java/developing/tools/dev-tools-workbench.html</span>
+<span class="cm"> * </span>
+<span class="cm"> * ******************************************</span>
+<span class="cm"> * SAMPLE cmis.properties *******************</span>
+<span class="cm"> * ******************************************</span>
+<span class="cm"> * </span>
+<span class="cm"> *     org.apache.chemistry.opencmis.binding.spi.type=browser</span>
+<span class="cm"> *     org.apache.chemistry.opencmis</span>
+<span class="cm"> *     org.apache.chemistry.opencmis.binding.browser.url=http://localhost:8080/openfncmis/browser</span>
+<span class="cm"> *     org.apache.chemistry.opencmis.user=username_here</span>
+<span class="cm"> *     org.apache.chemistry.opencmis.password=password_here</span>
+<span class="cm"> *     org.apache.chemistry.opencmis.binding.compression=true</span>
+<span class="cm"> *     org.apache.chemistry.opencmis.binding.cookies=true</span>
+<span class="cm"> * </span>
+<span class="cm"> */</span>
+
+<span class="cm">/*</span>
+<span class="cm"> * This class serves as a simple example of how to create a new TypeDefinintion</span>
+<span class="cm"> * in CMIS using the OpenCMIS client. (all in one self contained file) This code</span>
+<span class="cm"> * was tested with the FileNet CMIS 1.1 tech preview but can be modified to work</span>
+<span class="cm"> * with any CMIS client that supports type mutability.</span>
+<span class="cm"> * </span>
+<span class="cm"> * Code will create a new subclass of cmis:document with 4 properties </span>
+<span class="cm"> * String, Int, Boolean and Id, and two choice list values on the String prop</span>
+<span class="cm"> */</span>
+<span class="kd">public</span> <span class="kd">class</span> <span class="nc">CreateTestCommandLine</span> <span class="o">{</span>
+
+    <span class="c1">// Modify these values to conform to your local repository requirements</span>
+    <span class="c1">//</span>
+    <span class="c1">// property id&#39;s and names here </span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">property_stringPropertyId</span> <span class="o">=</span> <span class="s">&quot;StringPropertyDefinition&quot;</span><span class="o">;</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">property_intPropertyId</span> <span class="o">=</span> <span class="s">&quot;IntPropertyDefinition&quot;</span><span class="o">;</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">property_boolPropertyId</span> <span class="o">=</span> <span class="s">&quot;BoolPropertyDefinition&quot;</span><span class="o">;</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">property_idPropertyId</span> <span class="o">=</span> <span class="s">&quot;IdPropertyDefinition&quot;</span><span class="o">;</span>
+
+    <span class="c1">//</span>
+    <span class="c1">// type related</span>
+    <span class="c1">// the id of the new type&#39;s parent</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">type_idOfParentType</span> <span class="o">=</span> <span class="s">&quot;cmis:document&quot;</span><span class="o">;</span>
+    <span class="c1">// Id of the new subclass we will be creating</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">type_idOfNewClass</span> <span class="o">=</span> <span class="s">&quot;cmis_newDocSubclass1&quot;</span><span class="o">;</span>
+    <span class="c1">// other information about type</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">type_description</span> <span class="o">=</span> <span class="s">&quot;Test document type definition&quot;</span><span class="o">;</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">type_displayName</span> <span class="o">=</span> <span class="s">&quot;TestTypeDefinition&quot;</span><span class="o">;</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">type_localName</span> <span class="o">=</span> <span class="s">&quot;some test local name&quot;</span><span class="o">;</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">type_localNamespace</span> <span class="o">=</span> <span class="s">&quot;some test local name space&quot;</span><span class="o">;</span>
+
+    <span class="c1">// globals</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>
+
+        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;An example of type creation with CMIS TypeMutability from OpenCMIS.&quot;</span><span class="o">);</span>
+
+        <span class="c1">// Assume /cmis.properties is the name of the input file containing all</span>
+        <span class="c1">// of the session parameters (test only)</span>
+        <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span> <span class="o">=</span> <span class="n">loadConnectionProperties</span><span class="o">(</span><span class="s">&quot;/temp/cmis.properties&quot;</span><span class="o">);</span>
+
+        <span class="n">session</span> <span class="o">=</span> <span class="n">getSession</span><span class="o">(</span><span class="n">parameters</span><span class="o">);</span>
+
+        <span class="c1">// Look at repository info - demonstrates a valid connection</span>
+        <span class="n">RepositoryInfo</span> <span class="n">repositoryInfo</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">getRepositoryInfo</span><span class="o">();</span>
+        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Connected to repository.  Supports CMIS version:&quot;</span>
+                <span class="o">+</span> <span class="n">repositoryInfo</span><span class="o">.</span><span class="na">getCmisVersionSupported</span><span class="o">());</span>
+
+
+        <span class="c1">// Check here to verify the types we will be creating are permissible </span>
+        <span class="c1">// for this repository.</span>
+        <span class="n">Boolean</span> <span class="n">canCreateStringProperty</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">canCreateIdProperty</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">canCreateBoolProperty</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">canCreateIntProperty</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="k">for</span> <span class="o">(</span><span class="n">PropertyType</span> <span class="n">propCreatable</span> <span class="o">:</span> <span class="n">repositoryInfo</span><span class="o">.</span><span class="na">getCapabilities</span><span class="o">().</span><span class="na">getCreatablePropertyTypes</span><span class="o">().</span><span class="na">canCreate</span><span class="o">())</span> <span class="o">{</span>
+
+            <span class="k">if</span> <span class="o">(</span><span class="n">propCreatable</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">PropertyType</span><span class="o">.</span><span class="na">STRING</span><span class="o">))</span> <span class="o">{</span>
+                <span class="n">canCreateStringProperty</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+            <span class="o">}</span> <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="n">propCreatable</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">PropertyType</span><span class="o">.</span><span class="na">INTEGER</span><span class="o">))</span> <span class="o">{</span>
+                <span class="n">canCreateIntProperty</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+            <span class="o">}</span> <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="n">propCreatable</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">PropertyType</span><span class="o">.</span><span class="na">ID</span><span class="o">))</span> <span class="o">{</span>
+                <span class="n">canCreateIdProperty</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+            <span class="o">}</span> <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="n">propCreatable</span><span class="o">.</span><span class="na">equals</span><span class="o">(</span><span class="n">PropertyType</span><span class="o">.</span><span class="na">BOOLEAN</span><span class="o">))</span> <span class="o">{</span>
+                <span class="n">canCreateBoolProperty</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+            <span class="o">}</span>
+
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Repository can create property of : &quot;</span> <span class="o">+</span> <span class="n">propCreatable</span><span class="o">.</span><span class="na">toString</span><span class="o">());</span>
+        <span class="o">}</span>
+
+        <span class="k">assert</span> <span class="nl">canCreateStringProperty:</span> <span class="s">&quot;String is not one of the createable properties.&quot;</span><span class="o">;</span>
+        <span class="k">assert</span> <span class="nl">canCreateIdProperty:</span> <span class="s">&quot;Id is not one of the createable properties.&quot;</span><span class="o">;</span>
+        <span class="k">assert</span> <span class="nl">canCreateBoolProperty:</span> <span class="s">&quot;Boolean is not one of the createable properties.&quot;</span><span class="o">;</span>
+        <span class="k">assert</span> <span class="nl">canCreateIntProperty:</span> <span class="s">&quot;Integer is not one of the createable properties.&quot;</span><span class="o">;</span>
+
+        <span class="c1">// Create new type with string property</span>
+        <span class="c1">// and verify it exists in type collection</span>
+        <span class="n">ObjectType</span> <span class="n">newType</span> <span class="o">=</span> <span class="n">createNewType</span><span class="o">();</span>
+
+        <span class="c1">// clean up the type if permitted</span>
+        <span class="c1">// TODO - check to see if delete is permitted first...</span>
+        <span class="n">session</span><span class="o">.</span><span class="na">deleteType</span><span class="o">(</span><span class="n">newType</span><span class="o">.</span><span class="na">getId</span><span class="o">());</span>
+
+        <span class="c1">// TODO - verify delete here for completeness.</span>
+        <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Cleanup completed.&quot;</span><span class="o">);</span>
+    <span class="o">}</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Create the new type with with our 4 test property types.</span>
+<span class="cm">     * </span>
+<span class="cm">     * @return</span>
+<span class="cm">     */</span>
+    <span class="kd">public</span> <span class="kd">static</span> <span class="n">ObjectType</span> <span class="nf">createNewType</span><span class="o">()</span> <span class="o">{</span>
+        <span class="c1">// assuming the following default (change if your repository</span>
+        <span class="c1">// does not support these settings</span>
+        <span class="n">Boolean</span> <span class="n">isCreatable</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">includedInSupertypeQuery</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">queryable</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
+        <span class="n">ContentStreamAllowed</span> <span class="n">contentStreamAllowed</span> <span class="o">=</span> <span class="n">ContentStreamAllowed</span><span class="o">.</span><span class="na">ALLOWED</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">versionable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+
+        <span class="c1">// build property definitions - string, int, boolean and id</span>
+        <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">PropertyDefinition</span><span class="o">&lt;?&gt;&gt;</span> <span class="n">propertyDefinitions</span> <span class="o">=</span> <span class="k">new</span> <span class="n">LinkedHashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">PropertyDefinition</span><span class="o">&lt;?&gt;&gt;();</span>
+        <span class="n">TestStringPropertyDefinition</span> <span class="n">spd</span> <span class="o">=</span> <span class="n">createStringPropertyDefinition</span><span class="o">();</span>
+        <span class="n">TestIntegerPropertyDefinition</span> <span class="n">ipd</span> <span class="o">=</span> <span class="n">createIntPropertyDefinition</span><span class="o">();</span>
+        <span class="n">TestBooleanPropertyDefinition</span> <span class="n">bpd</span> <span class="o">=</span> <span class="n">createBooleanPropertyDefinition</span><span class="o">();</span>
+        <span class="n">TestIdPropertyDefinition</span> <span class="n">idpd</span> <span class="o">=</span> <span class="n">createIDPropertyDefinition</span><span class="o">();</span>
+
+        <span class="n">propertyDefinitions</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">spd</span><span class="o">.</span><span class="na">getId</span><span class="o">(),</span> <span class="n">spd</span><span class="o">);</span>
+        <span class="n">propertyDefinitions</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">ipd</span><span class="o">.</span><span class="na">getId</span><span class="o">(),</span> <span class="n">ipd</span><span class="o">);</span>
+        <span class="n">propertyDefinitions</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">bpd</span><span class="o">.</span><span class="na">getId</span><span class="o">(),</span> <span class="n">bpd</span><span class="o">);</span>
+        <span class="n">propertyDefinitions</span><span class="o">.</span><span class="na">put</span><span class="o">(</span><span class="n">idpd</span><span class="o">.</span><span class="na">getId</span><span class="o">(),</span> <span class="n">idpd</span><span class="o">);</span>
+
+        <span class="n">TestDocumentTypeDefinition</span> <span class="n">typeToCreate</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TestDocumentTypeDefinition</span><span class="o">(</span><span class="n">type_idOfNewClass</span><span class="o">,</span> <span class="n">type_description</span><span class="o">,</span>
+                <span class="n">type_displayName</span><span class="o">,</span> <span class="n">type_localName</span><span class="o">,</span> <span class="n">type_localNamespace</span><span class="o">,</span> <span class="n">type_idOfParentType</span><span class="o">,</span> <span class="n">isCreatable</span><span class="o">,</span>
+                <span class="n">includedInSupertypeQuery</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">contentStreamAllowed</span><span class="o">,</span> <span class="n">versionable</span><span class="o">,</span> <span class="n">propertyDefinitions</span><span class="o">);</span>
+
+        <span class="n">TypeDefinition</span> <span class="n">createdType</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="k">try</span> <span class="o">{</span>
+            <span class="n">createdType</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">createType</span><span class="o">(</span><span class="n">typeToCreate</span><span class="o">);</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Type created: &quot;</span> <span class="o">+</span> <span class="n">createdType</span><span class="o">.</span><span class="na">toString</span><span class="o">());</span>
+        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">Exception</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+            <span class="k">assert</span> <span class="kc">false</span><span class="o">:</span> <span class="s">&quot;An exception was thrown when trying to create a new type definition. Message: &quot;</span> <span class="o">+</span> <span class="n">e</span><span class="o">.</span><span class="na">getMessage</span><span class="o">();</span>
+        <span class="o">}</span>
+
+        <span class="n">ObjectType</span> <span class="n">retrievedType</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="k">try</span> <span class="o">{</span>
+            <span class="n">retrievedType</span> <span class="o">=</span> <span class="n">session</span><span class="o">.</span><span class="na">getTypeDefinition</span><span class="o">(</span><span class="n">createdType</span><span class="o">.</span><span class="na">getId</span><span class="o">());</span>
+            <span class="k">assert</span> <span class="n">retrievedType</span> <span class="o">!=</span> <span class="kc">null</span><span class="o">:</span> <span class="s">&quot;Unable to retrieve new type. &quot;</span><span class="o">;</span>
+        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">Exception</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+            <span class="k">assert</span> <span class="kc">false</span><span class="o">:</span> <span class="s">&quot;Got exception. Cannot get the type definition from the repository. Message: &quot;</span> <span class="o">+</span> <span class="n">e</span><span class="o">.</span><span class="na">getMessage</span><span class="o">();</span>
+        <span class="o">}</span>
+
+        <span class="k">return</span> <span class="n">retrievedType</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="kd">public</span> <span class="kd">static</span> <span class="n">Session</span> <span class="nf">getSession</span><span class="o">(</span><span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">parameters</span><span class="o">)</span> <span class="o">{</span>
+        <span class="n">Session</span> <span class="n">session</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+        <span class="n">SessionFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="n">SessionFactoryImpl</span><span class="o">.</span><span class="na">newInstance</span><span class="o">();</span>
+        <span class="k">if</span> <span class="o">(</span><span class="n">parameters</span><span class="o">.</span><span class="na">containsKey</span><span class="o">(</span><span class="n">SessionParameter</span><span class="o">.</span><span class="na">REPOSITORY_ID</span><span class="o">))</span> <span class="o">{</span>
+            <span class="n">session</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">createSession</span><span class="o">(</span><span class="n">parameters</span><span class="o">);</span>
+        <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
+            <span class="c1">// Create session for the first repository.</span>
+            <span class="n">List</span><span class="o">&lt;</span><span class="n">Repository</span><span class="o">&gt;</span> <span class="n">repositories</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">getRepositories</span><span class="o">(</span><span class="n">parameters</span><span class="o">);</span>
+            <span class="n">session</span> <span class="o">=</span> <span class="n">repositories</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="mi">0</span><span class="o">).</span><span class="na">createSession</span><span class="o">();</span>
+        <span class="o">}</span>
+
+        <span class="c1">// reset op context to default</span>
+        <span class="n">session</span><span class="o">.</span><span class="na">setDefaultContext</span><span class="o">(</span><span class="n">session</span><span class="o">.</span><span class="na">createOperationContext</span><span class="o">());</span>
+
+        <span class="k">return</span> <span class="n">session</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="cm">/*</span>
+<span class="cm">     * Load our connection properties from a local file</span>
+<span class="cm">     * </span>
+<span class="cm">     * Note file should use the same format as the expert settings for Workbench</span>
+<span class="cm">     */</span>
+    <span class="kd">public</span> <span class="kd">static</span> <span class="kd">final</span> <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">loadConnectionProperties</span><span class="o">(</span><span class="n">String</span> <span class="n">configResource</span><span class="o">)</span> <span class="o">{</span>
+        <span class="n">Properties</span> <span class="n">testConfig</span> <span class="o">=</span> <span class="k">new</span> <span class="n">Properties</span><span class="o">();</span>
+        <span class="k">if</span> <span class="o">(</span><span class="n">configResource</span> <span class="o">==</span> <span class="kc">null</span><span class="o">)</span> <span class="o">{</span>
+            <span class="k">throw</span> <span class="k">new</span> <span class="nf">CmisRuntimeException</span><span class="o">(</span><span class="s">&quot;Filename with connection parameters was not supplied.&quot;</span><span class="o">);</span>
+        <span class="o">}</span>
+
+        <span class="n">FileInputStream</span> <span class="n">inStream</span><span class="o">;</span>
+        <span class="k">try</span> <span class="o">{</span>
+            <span class="n">inStream</span> <span class="o">=</span> <span class="k">new</span> <span class="n">FileInputStream</span><span class="o">(</span><span class="n">configResource</span><span class="o">);</span>
+            <span class="n">testConfig</span><span class="o">.</span><span class="na">load</span><span class="o">(</span><span class="n">inStream</span><span class="o">);</span>
+            <span class="n">inStream</span><span class="o">.</span><span class="na">close</span><span class="o">();</span>
+        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">FileNotFoundException</span> <span class="n">e1</span><span class="o">)</span> <span class="o">{</span>
+            <span class="k">throw</span> <span class="k">new</span> <span class="nf">CmisRuntimeException</span><span class="o">(</span><span class="s">&quot;Test properties file &#39;&quot;</span> <span class="o">+</span> <span class="n">configResource</span> <span class="o">+</span> <span class="s">&quot;&#39; was not found at:&quot;</span>
+                    <span class="o">+</span> <span class="n">configResource</span><span class="o">);</span>
+        <span class="o">}</span> <span class="k">catch</span> <span class="o">(</span><span class="n">IOException</span> <span class="n">e</span><span class="o">)</span> <span class="o">{</span>
+            <span class="k">throw</span> <span class="k">new</span> <span class="nf">CmisRuntimeException</span><span class="o">(</span><span class="s">&quot;Exception loading test properties file &quot;</span> <span class="o">+</span> <span class="n">configResource</span><span class="o">,</span> <span class="n">e</span><span class="o">);</span>
+        <span class="o">}</span>
+
+        <span class="n">Map</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;</span> <span class="n">map</span> <span class="o">=</span> <span class="k">new</span> <span class="n">HashMap</span><span class="o">&lt;</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">&gt;();</span>
+        <span class="k">for</span> <span class="o">(</span><span class="n">Entry</span><span class="o">&lt;?,</span> <span class="o">?&gt;</span> <span class="n">entry</span> <span class="o">:</span> <span class="n">testConfig</span><span class="o">.</span><span class="na">entrySet</span><span class="o">())</span> <span class="o">{</span>
+            <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">&quot;Found key: &quot;</span> <span class="o">+</span> <span class="n">entry</span><span class="o">.</span><span class="na">getKey</span><span class="o">()</span> <span class="o">+</span> <span class="s">&quot; Value:&quot;</span> <span class="o">+</span> <span class="n">entry</span><span class="o">.</span><span class="na">getValue</span><span class="o">());</span>
+            <span class="n">map</span><span class="o">.</span><span class="na">put</span><span class="o">((</span><span class="n">String</span><span class="o">)</span> <span class="n">entry</span><span class="o">.</span><span class="na">getKey</span><span class="o">(),</span> <span class="o">((</span><span class="n">String</span><span class="o">)</span> <span class="n">entry</span><span class="o">.</span><span class="na">getValue</span><span class="o">()).</span><span class="na">trim</span><span class="o">());</span>
+        <span class="o">}</span>
+        <span class="k">return</span> <span class="n">map</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Create a single string property definition with a choice list</span>
+<span class="cm">     */</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="n">TestStringPropertyDefinition</span> <span class="nf">createStringPropertyDefinition</span><span class="o">()</span> <span class="o">{</span>
+
+        <span class="n">Cardinality</span> <span class="n">cardinality</span> <span class="o">=</span> <span class="n">Cardinality</span><span class="o">.</span><span class="na">SINGLE</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">description</span> <span class="o">=</span> <span class="s">&quot;String property definition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">displayName</span> <span class="o">=</span> <span class="s">&quot;StringPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localName</span> <span class="o">=</span> <span class="s">&quot;StringPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localNameSpace</span> <span class="o">=</span> <span class="s">&quot;StringPropertyDefinition&quot;</span><span class="o">;</span>    
+        <span class="n">Updatability</span> <span class="n">updatability</span> <span class="o">=</span> <span class="n">Updatability</span><span class="o">.</span><span class="na">READWRITE</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">orderable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">queryable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">defaults</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;();</span>
+        <span class="n">defaults</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="s">&quot;test&quot;</span><span class="o">);</span>
+
+        <span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">vals1</span> <span class="o">=</span> <span class="k">new</span> <span class="n">LinkedList</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;();</span>
+        <span class="n">vals1</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="s">&quot;val1&quot;</span><span class="o">);</span>
+
+        <span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">vals2</span> <span class="o">=</span> <span class="k">new</span> <span class="n">LinkedList</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;();</span>
+        <span class="n">vals2</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="s">&quot;val2&quot;</span><span class="o">);</span>
+
+        <span class="n">TestStringChoice</span> <span class="n">strChoice1</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TestStringChoice</span><span class="o">(</span><span class="s">&quot;choice1&quot;</span><span class="o">,</span> <span class="n">vals1</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+        <span class="n">TestStringChoice</span> <span class="n">strChoice2</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TestStringChoice</span><span class="o">(</span><span class="s">&quot;choice2&quot;</span><span class="o">,</span> <span class="n">vals2</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+        <span class="n">List</span><span class="o">&lt;</span><span class="n">Choice</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">choiceList</span> <span class="o">=</span> <span class="k">new</span> <span class="n">LinkedList</span><span class="o">&lt;</span><span class="n">Choice</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;&gt;();</span>
+        <span class="n">choiceList</span><span class="o">.</span><span class="na">add</span> <span class="o">(</span><span class="n">strChoice1</span><span class="o">);</span>
+        <span class="n">choiceList</span><span class="o">.</span><span class="na">add</span> <span class="o">(</span><span class="n">strChoice2</span><span class="o">);</span>
+
+        <span class="n">TestStringPropertyDefinition</span> <span class="n">spd</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TestStringPropertyDefinition</span><span class="o">(</span><span class="n">property_stringPropertyId</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span> 
+                <span class="n">description</span><span class="o">,</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> 
+                <span class="n">defaults</span><span class="o">,</span> <span class="n">choiceList</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+
+        <span class="k">return</span> <span class="n">spd</span><span class="o">;</span>      
+    <span class="o">}</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="n">TestIntegerPropertyDefinition</span> <span class="nf">createIntPropertyDefinition</span><span class="o">()</span> <span class="o">{</span>
+        <span class="n">Cardinality</span> <span class="n">cardinality</span> <span class="o">=</span> <span class="n">Cardinality</span><span class="o">.</span><span class="na">MULTI</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">description</span> <span class="o">=</span> <span class="s">&quot;Int property definition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">displayName</span> <span class="o">=</span> <span class="s">&quot;IntPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localName</span> <span class="o">=</span> <span class="s">&quot;IntPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localNameSpace</span> <span class="o">=</span> <span class="s">&quot;IntPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">Updatability</span> <span class="n">updatability</span> <span class="o">=</span> <span class="n">Updatability</span><span class="o">.</span><span class="na">READWRITE</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">orderable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">queryable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">BigInteger</span><span class="o">&gt;</span> <span class="n">defaults</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">BigInteger</span><span class="o">&gt;();</span>
+        <span class="c1">// defaults.add(new BigInteger(&quot;101&quot;));</span>
+        <span class="n">BigInteger</span> <span class="n">minVal</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BigInteger</span><span class="o">(</span><span class="s">&quot;100&quot;</span><span class="o">);</span>
+        <span class="n">BigInteger</span> <span class="n">maxVal</span> <span class="o">=</span> <span class="k">new</span> <span class="n">BigInteger</span><span class="o">(</span><span class="s">&quot;1000&quot;</span><span class="o">);</span>
+
+        <span class="n">TestIntegerPropertyDefinition</span> <span class="n">ipd</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TestIntegerPropertyDefinition</span><span class="o">(</span><span class="n">property_intPropertyId</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span>
+                <span class="n">description</span><span class="o">,</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">defaults</span><span class="o">,</span>
+                <span class="n">minVal</span><span class="o">,</span> <span class="n">maxVal</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+        <span class="k">return</span> <span class="n">ipd</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="n">TestBooleanPropertyDefinition</span> <span class="nf">createBooleanPropertyDefinition</span><span class="o">()</span> <span class="o">{</span>
+
+        <span class="n">Cardinality</span> <span class="n">cardinality</span> <span class="o">=</span> <span class="n">Cardinality</span><span class="o">.</span><span class="na">SINGLE</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">description</span> <span class="o">=</span> <span class="s">&quot;Boolean property definition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">displayName</span> <span class="o">=</span> <span class="s">&quot;BooleanPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localName</span> <span class="o">=</span> <span class="s">&quot;BooleanPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localNameSpace</span> <span class="o">=</span> <span class="s">&quot;BooleanPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">Updatability</span> <span class="n">updatability</span> <span class="o">=</span> <span class="n">Updatability</span><span class="o">.</span><span class="na">ONCREATE</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">orderable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">queryable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">Boolean</span><span class="o">&gt;</span> <span class="n">defaults</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ArrayList</span><span class="o">&lt;</span><span class="n">Boolean</span><span class="o">&gt;();</span>
+        <span class="n">defaults</span><span class="o">.</span><span class="na">add</span><span class="o">(</span><span class="kc">false</span><span class="o">);</span>
+
+        <span class="n">TestBooleanPropertyDefinition</span> <span class="n">spd</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TestBooleanPropertyDefinition</span><span class="o">(</span><span class="n">property_boolPropertyId</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span>
+                <span class="n">description</span><span class="o">,</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">defaults</span><span class="o">);</span>
+        <span class="k">return</span> <span class="n">spd</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="n">TestIdPropertyDefinition</span> <span class="nf">createIDPropertyDefinition</span><span class="o">()</span> <span class="o">{</span>
+        <span class="n">Cardinality</span> <span class="n">cardinality</span> <span class="o">=</span> <span class="n">Cardinality</span><span class="o">.</span><span class="na">SINGLE</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">description</span> <span class="o">=</span> <span class="s">&quot;ID property definition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">displayName</span> <span class="o">=</span> <span class="s">&quot;IDPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localName</span> <span class="o">=</span> <span class="s">&quot;IDPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">String</span> <span class="n">localNameSpace</span> <span class="o">=</span> <span class="s">&quot;IDPropertyDefinition&quot;</span><span class="o">;</span>
+        <span class="n">Updatability</span> <span class="n">updatability</span> <span class="o">=</span> <span class="n">Updatability</span><span class="o">.</span><span class="na">READWRITE</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">orderable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="n">Boolean</span> <span class="n">queryable</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
+
+        <span class="n">TestIdPropertyDefinition</span> <span class="n">idpd</span> <span class="o">=</span> <span class="k">new</span> <span class="n">TestIdPropertyDefinition</span><span class="o">(</span><span class="n">property_idPropertyId</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">description</span><span class="o">,</span>
+                <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+        <span class="k">return</span> <span class="n">idpd</span><span class="o">;</span>
+    <span class="o">}</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * **************************************************************************</span>
+<span class="cm">     * Inner classes follow</span>
+<span class="cm">     * **************************************************************************</span>
+<span class="cm">     * </span>
+<span class="cm">     * All of the abstract base classes (for properties and types) </span>
+<span class="cm">     * that are used in this example are defined here</span>
+<span class="cm">     * along with their subclasses for each type that we support in this example.</span>
+<span class="cm">     * </span>
+<span class="cm">     * These classes can be further extended and reused for additional type </span>
+<span class="cm">     * mutability operations. </span>
+<span class="cm">     * </span>
+<span class="cm">     * These were made inner classes so the entire example would be contained</span>
+<span class="cm">     * in a single Java file. (no design reason) </span>
+<span class="cm">     * </span>
+<span class="cm">     */</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">class</span> <span class="nc">TestStringPropertyDefinition</span> <span class="kd">extends</span> <span class="n">TestPropertyDefinition</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="kd">implements</span>
+            <span class="n">PropertyStringDefinition</span> <span class="o">{</span>
+
+        <span class="n">BigInteger</span> <span class="n">maxLength</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+        <span class="kd">public</span> <span class="nf">TestStringPropertyDefinition</span><span class="o">(</span><span class="n">String</span> <span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">Cardinality</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">String</span> <span class="n">description</span><span class="o">,</span>
+                <span class="n">String</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">Updatability</span> <span class="n">updatability</span><span class="o">,</span>
+                <span class="n">Boolean</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">Boolean</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">defaultValue</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Choice</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;&gt;</span> <span class="n">choiceList</span><span class="o">,</span>
+                <span class="n">BigInteger</span> <span class="n">maxLength</span><span class="o">)</span> <span class="o">{</span>
+            <span class="kd">super</span><span class="o">(</span><span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">description</span><span class="o">,</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span>
+                    <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">defaultValue</span><span class="o">,</span> <span class="n">choiceList</span><span class="o">);</span>
+
+            <span class="k">this</span><span class="o">.</span><span class="na">maxLength</span> <span class="o">=</span> <span class="n">maxLength</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">PropertyType</span> <span class="nf">getPropertyType</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">PropertyType</span><span class="o">.</span><span class="na">STRING</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">BigInteger</span> <span class="nf">getMaxLength</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">maxLength</span><span class="o">;</span>
+        <span class="o">}</span>
+
+    <span class="o">}</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">class</span> <span class="nc">TestIntegerPropertyDefinition</span> <span class="kd">extends</span> <span class="n">TestPropertyDefinition</span><span class="o">&lt;</span><span class="n">BigInteger</span><span class="o">&gt;</span> <span class="kd">implements</span>
+            <span class="n">PropertyIntegerDefinition</span> <span class="o">{</span>
+
+        <span class="kd">private</span> <span class="n">BigInteger</span> <span class="n">minVal</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">BigInteger</span> <span class="n">maxVal</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+        <span class="kd">public</span> <span class="nf">TestIntegerPropertyDefinition</span><span class="o">(</span><span class="n">String</span> <span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">Cardinality</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">String</span> <span class="n">description</span><span class="o">,</span>
+                <span class="n">String</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">Updatability</span> <span class="n">updatability</span><span class="o">,</span>
+                <span class="n">Boolean</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">Boolean</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">BigInteger</span><span class="o">&gt;</span> <span class="n">defaultValue</span><span class="o">,</span> <span class="n">BigInteger</span> <span class="n">minVal</span><span class="o">,</span>
+                <span class="n">BigInteger</span> <span class="n">maxVal</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Choice</span><span class="o">&lt;</span><span class="n">BigInteger</span><span class="o">&gt;&gt;</span> <span class="n">choiceList</span><span class="o">)</span> <span class="o">{</span>
+            <span class="kd">super</span><span class="o">(</span><span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">description</span><span class="o">,</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span>
+                    <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">defaultValue</span><span class="o">,</span> <span class="n">choiceList</span><span class="o">);</span>
+
+            <span class="k">this</span><span class="o">.</span><span class="na">minVal</span> <span class="o">=</span> <span class="n">minVal</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">maxVal</span> <span class="o">=</span> <span class="n">maxVal</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">PropertyType</span> <span class="nf">getPropertyType</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">PropertyType</span><span class="o">.</span><span class="na">INTEGER</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">BigInteger</span> <span class="nf">getMaxValue</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="na">maxVal</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">BigInteger</span> <span class="nf">getMinValue</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="na">minVal</span><span class="o">;</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">class</span> <span class="nc">TestBooleanPropertyDefinition</span> <span class="kd">extends</span> <span class="n">TestPropertyDefinition</span><span class="o">&lt;</span><span class="n">Boolean</span><span class="o">&gt;</span> <span class="kd">implements</span>
+            <span class="n">PropertyBooleanDefinition</span> <span class="o">{</span>
+
+        <span class="kd">public</span> <span class="nf">TestBooleanPropertyDefinition</span><span class="o">(</span><span class="n">String</span> <span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">Cardinality</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">String</span> <span class="n">description</span><span class="o">,</span>
+                <span class="n">String</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">Updatability</span> <span class="n">updatability</span><span class="o">,</span>
+                <span class="n">Boolean</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">Boolean</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Boolean</span><span class="o">&gt;</span> <span class="n">defaultValue</span><span class="o">)</span> <span class="o">{</span>
+
+            <span class="kd">super</span><span class="o">(</span><span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">description</span><span class="o">,</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span>
+                    <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">defaultValue</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">PropertyType</span> <span class="nf">getPropertyType</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">PropertyType</span><span class="o">.</span><span class="na">BOOLEAN</span><span class="o">;</span>
+        <span class="o">}</span>
+    <span class="o">}</span>
+
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">class</span> <span class="nc">TestIdPropertyDefinition</span> <span class="kd">extends</span> <span class="n">TestPropertyDefinition</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="kd">implements</span>
+            <span class="n">PropertyIdDefinition</span> <span class="o">{</span>
+
+        <span class="kd">public</span> <span class="nf">TestIdPropertyDefinition</span><span class="o">(</span><span class="n">String</span> <span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">Cardinality</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">String</span> <span class="n">description</span><span class="o">,</span>
+                <span class="n">String</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">Updatability</span> <span class="n">updatability</span><span class="o">,</span>
+                <span class="n">Boolean</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">Boolean</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">String</span><span class="o">&gt;</span> <span class="n">defaultValue</span><span class="o">)</span> <span class="o">{</span>
+            <span class="kd">super</span><span class="o">(</span><span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">description</span><span class="o">,</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">localName</span><span class="o">,</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">updatability</span><span class="o">,</span>
+                    <span class="n">orderable</span><span class="o">,</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">defaultValue</span><span class="o">,</span> <span class="kc">null</span><span class="o">);</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">PropertyType</span> <span class="nf">getPropertyType</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">PropertyType</span><span class="o">.</span><span class="na">ID</span><span class="o">;</span>
+        <span class="o">}</span>
+
+    <span class="o">}</span>
+
+    <span class="cm">/** </span>
+<span class="cm">     * Base class for all property definition types</span>
+<span class="cm">     * </span>
+<span class="cm">     * See TestStringPropertyDefinition for example of how to subclass this.</span>
+<span class="cm">     *</span>
+<span class="cm">     * @param &lt;T&gt;</span>
+<span class="cm">     */</span>
+    <span class="kd">abstract</span> <span class="kd">private</span> <span class="kd">static</span> <span class="kd">class</span> <span class="nc">TestPropertyDefinition</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="kd">implements</span> <span class="n">PropertyDefinition</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="o">{</span>
+
+        <span class="kd">private</span> <span class="n">String</span> <span class="n">idAndQueryName</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">Cardinality</span> <span class="n">cardinality</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">String</span> <span class="n">description</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">String</span> <span class="n">displayName</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">String</span> <span class="n">localName</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">String</span> <span class="n">localNameSpace</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">Updatability</span> <span class="n">updatability</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">Boolean</span> <span class="n">orderable</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">Boolean</span> <span class="n">queryable</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+        <span class="kd">private</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="n">defaultValue</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Choice</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;&gt;</span> <span class="n">choiceList</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+
+        <span class="kd">public</span> <span class="nf">TestPropertyDefinition</span><span class="o">(</span><span class="n">String</span> <span class="n">idAndQueryName</span><span class="o">,</span> <span class="n">Cardinality</span> <span class="n">cardinality</span><span class="o">,</span> <span class="n">String</span> <span class="n">description</span><span class="o">,</span>
+                <span class="n">String</span> <span class="n">displayName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localName</span><span class="o">,</span> <span class="n">String</span> <span class="n">localNameSpace</span><span class="o">,</span> <span class="n">Updatability</span> <span class="n">updatability</span><span class="o">,</span>
+                <span class="n">Boolean</span> <span class="n">orderable</span><span class="o">,</span> <span class="n">Boolean</span> <span class="n">queryable</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="n">defaultValue</span><span class="o">,</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Choice</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;&gt;</span> <span class="n">choiceList</span><span class="o">)</span> <span class="o">{</span>
+            <span class="kd">super</span><span class="o">();</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">idAndQueryName</span> <span class="o">=</span> <span class="n">idAndQueryName</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">cardinality</span> <span class="o">=</span> <span class="n">cardinality</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">description</span> <span class="o">=</span> <span class="n">description</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">displayName</span> <span class="o">=</span> <span class="n">displayName</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">localName</span> <span class="o">=</span> <span class="n">localName</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">localNameSpace</span> <span class="o">=</span> <span class="n">localNameSpace</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">updatability</span> <span class="o">=</span> <span class="n">updatability</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">orderable</span> <span class="o">=</span> <span class="n">orderable</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">queryable</span> <span class="o">=</span> <span class="n">queryable</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">defaultValue</span> <span class="o">=</span> <span class="n">defaultValue</span><span class="o">;</span>
+            <span class="k">this</span><span class="o">.</span><span class="na">choiceList</span> <span class="o">=</span> <span class="n">choiceList</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">String</span> <span class="nf">getId</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">idAndQueryName</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">Cardinality</span> <span class="nf">getCardinality</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">cardinality</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">String</span> <span class="nf">getDescription</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">description</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">String</span> <span class="nf">getDisplayName</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">displayName</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">String</span> <span class="nf">getLocalName</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">localName</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">String</span> <span class="nf">getLocalNamespace</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">localNameSpace</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">abstract</span> <span class="kd">public</span> <span class="n">PropertyType</span> <span class="nf">getPropertyType</span><span class="o">();</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">String</span> <span class="nf">getQueryName</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">idAndQueryName</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">Updatability</span> <span class="nf">getUpdatability</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">updatability</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">Boolean</span> <span class="nf">isOrderable</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">orderable</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">Boolean</span> <span class="nf">isQueryable</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="n">queryable</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="c1">// methods with static content</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">Choice</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;&gt;</span> <span class="n">getChoices</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="na">choiceList</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="n">getDefaultValue</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="na">defaultValue</span><span class="o">;</span>
+        <span class="o">}</span>
+
+
+        <span class="cm">/**</span>
+<span class="cm">         * TODO For these remaining attributes you will want to set them </span>
+<span class="cm">         * accordingly.  They are all set to static values only </span>
+<span class="cm">         * because this is sample code. </span>
+<span class="cm">         */</span>
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">Boolean</span> <span class="nf">isInherited</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">Boolean</span> <span class="nf">isOpenChoice</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">Boolean</span> <span class="nf">isRequired</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="n">List</span><span class="o">&lt;</span><span class="n">CmisExtensionElement</span><span class="o">&gt;</span> <span class="n">getExtensions</span><span class="o">()</span> <span class="o">{</span>
+            <span class="k">return</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="o">}</span>
+
+        <span class="nd">@Override</span>
+        <span class="kd">public</span> <span class="kt">void</span> <span class="nf">setExtensions</span><span class="o">(</span><span class="n">List</span><span class="o">&lt;</span><span class="n">CmisExtensionElement</span><span class="o">&gt;</span> <span class="n">arg0</span><span class="o">)</span> <span class="o">{</span>
+        <span class="o">}</span>
+
+    <span class="o">}</span>
+
+    <span class="cm">/**</span>
+<span class="cm">     * Base class for all typeDefinitions.  </span>
+<span class="cm">     * See TestDocumentTypeDefinition for an example of how to subclass this for document.</span>
+<span class="cm">     *</span>
+<span class="cm">     */</span>
+    <span class="kd">private</span> <span class="kd">static</span> <span class="kd">abstract</span> <span class="kd">class</span> <span class="nc">TestTypeDefinition</span> <span class="kd">implements</span> <span class="n">TypeDefinition</span> <span class="o">{</span>
+
+        <span class="kd">private</span> <span class="n">String</span> <span class="n">description</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
+        <span class="kd">private</span> <span class="n">String</span> <span class="n">displayName</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

[... 238 lines stripped ...]


Mime
View raw message