<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Colectica Blogs</title>
	<atom:link href="http://blogs.colectica.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.colectica.com</link>
	<description></description>
	<lastBuildDate>Sat, 10 Mar 2012 06:33:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Retrieving DDI items from the Colectica Repository</title>
		<link>http://dan.smith.name/2012/03/retrieving-ddi-items-from-the-colectica-repository/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=retrieving-ddi-items-from-the-colectica-repository</link>
		<comments>http://dan.smith.name/2012/03/retrieving-ddi-items-from-the-colectica-repository/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 06:29:05 +0000</pubDate>
		<dc:creator>Dan Smith</dc:creator>
				<category><![CDATA[Colectica]]></category>
		<category><![CDATA[11179]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DDI3]]></category>

		<guid isPermaLink="false">http://2.78</guid>
		<description><![CDATA[I received a followup question to my post about registering 11179 items in the Colectica Repository. This question involves working with the Colectica SDK and its DDI model in conjunction with the Repository. How do I connect to the Repository &#8230; <a href="http://dan.smith.name/2012/03/retrieving-ddi-items-from-the-colectica-repository/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I received a <a href="http://blogs.colectica.com/2011/05/how-to-register-a-11179-item-in-colectica-repository/#comment-418">followup question</a> to my <a href="http://blogs.colectica.com/2011/05/how-to-register-a-11179-item-in-colectica-repository/">post</a> about registering 11179 items in the Colectica Repository. This question involves working with the Colectica SDK and its DDI model in conjunction with the Repository.</p>
<blockquote><p>How do I connect to the Repository and retrieve a DdiInstance, such as the YourDdiInstance() method in your <a href="http://blogs.colectica.com/2011/05/how-to-register-a-11179-item-in-colectica-repository/">previous post</a>?</p></blockquote>
<p>First we will create the repository client. In this example we will use the built in Active Directory authentication and send the credentials of the user running the program (<em>The user who asked the question uses the Active Directory authentication and roles</em>). Notice the username and password are not specified as they were in the example from my previous post.</p>
<pre class="brush: csharp; title: ; notranslate">
// Create the web services client
var client = new WcfRepositoryClient(&quot;localhost&quot;, 19893);
</pre>
<p>If we know the item&#8217;s identification, we can retrieve the item. If not, we can perform a search on the repository. The basic GetItem has many variations with different processing options, retrieving item lists, and sets of relationships. The simple GetItem and GetLatestItem are shown below.</p>
<pre class="brush: csharp; title: ; notranslate">
// Get an item by 11179 identifier
IVersionable item = client.GetItem(id, agency, version);

// Or get the latest version
item = client.GetLatestItem(id, agency);

DdiInstance instance = item as DdiInstance;
</pre>
<p>To make it <strong>extremely easy</strong> to work with <strong>DDI items</strong> in the Colectica Repository, we will wrap this client with additional methods using the DdiClient. This also avoids the type checking and casting if you want to access properties of the DdiInstance not present on IVersionable. There are also similar methods for each DDI item type as the one shown below!</p>
<pre class="brush: csharp; title: ; notranslate">
// Wrap the web services client
DdiClient ddiClient = new DdiClient(client);

// Get the Ddi Instance
DdiInstance instance = ddiClient.GetDdiInstance(
  id, agency, version, ChildReferenceProcessing.Instantiate)
</pre>
<p>The client calls allow controlling how child items are populated. If we have an unpopulated DdiInstance, we can use a similar method call to fill it with data and find its children.</p>
<pre class="brush: csharp; title: ; notranslate">
// an unpopulated item with its identification. Children items
// may come back  from the client as unpopulated depending on
// the child processing that is selected. Here is an example of
// how to populate such an item with the client

DdiInstance instance = new DdiInstance()
{
  Identifier = id,
  AgencyId = agency,
  Version = version,
  IsPopulated = false
};   

// Populate the Ddi Instance
ddiClient.PopulateDdiInstance(instance,
  false, ChildReferenceProcessing.Instantiate);

// Or as shown in Update 1 of my other post, populate the entire
// item hierarchy from the Repository
GraphPopulator populator = new GraphPopulator(client);
instance.Accept(populator);

// Do something with the instance
foreach(StudyUnit study in instance.StudyUnits)
{
  //.....
}
</pre>
<p>Cheers!<br />
Dan</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.smith.name/2012/03/retrieving-ddi-items-from-the-colectica-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DDI 3 meets RDF and SPARQL with Colectica Repository</title>
		<link>http://dan.smith.name/2011/10/ddi-3-meets-rdf-and-sparql-with-colectica-repository/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ddi-3-meets-rdf-and-sparql-with-colectica-repository</link>
		<comments>http://dan.smith.name/2011/10/ddi-3-meets-rdf-and-sparql-with-colectica-repository/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 22:12:57 +0000</pubDate>
		<dc:creator>Dan Smith</dc:creator>
				<category><![CDATA[Colectica]]></category>
		<category><![CDATA[DDI3]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[Repository]]></category>

		<guid isPermaLink="false">http://2.56</guid>
		<description><![CDATA[With the release of DDI version 3 (DDI Lifecycle), an effort was made to allow reuse and linkages throughout the content model. This created a rich model that allows for reuse and harmonization of metadata items through the use of &#8230; <a href="http://dan.smith.name/2011/10/ddi-3-meets-rdf-and-sparql-with-colectica-repository/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With the release of DDI version 3 (DDI Lifecycle), an effort was made to allow reuse and linkages throughout the content model. This created a rich model that allows for reuse and harmonization of metadata items through the use of referencing. When using the DDI 3 Addin for <a title="Colectica Repository for DDI 3" href="http://www.colectica.com/software/repository" target="_blank">Colectica Repository</a>, all of these relationships between metadata items are indexed and allow for the rich interlinkages of items as seen on <a href="http://www.colectica.com/software/web" target="_blank">Colectica Web</a>. With all of this relationship information, wouldn&#8217;t it be nice to execute arbitrary queries about the relationships? Colectica Repository already offer relationship and set based searching for registered metadata items, but a more powerful interface has now arrived.</p>
<h2>Colectica Repository RDF Services</h2>
<p><a href="http://en.wikipedia.org/wiki/SPARQL" target="_blank">SPARQL</a> is a query language created for searching RDF data and is standardized by the W3C. It allows for searching based on the relationships and literal data stored in an RDF graph or store. Colectica Repository now offers a new Addin with the ability to query DDI 3 as RDF using a SPARQL endpoint on Colectica Web and from the Repository with a web service! In addition, each DDI 3 item stored in the Colectica Repository can be downloaded in RDF using a <a href="http://www.w3.org/Submission/CBD/" target="_blank">Concise Bounded Description</a>.</p>
<h2>How are the RDF Services implemented?</h2>
<p>The RDF Services is a new optional component for Colectica Repository. Colectica Repository has many extension points created with the help of the Microsoft <a href="http://mef.codeplex.com/" target="_blank">Managed Extensibility Framework</a>. This allows custom Addins to be created and deployed by dropping a new assembly into the Addins folder. The DDI 3 Addin uses the Item Format extension point and many customers are already familiar with it. Another extension point is the Post Commit Hook. The RDF Services are implemented as a post commit hook and query for RDF serializers for the item using MEF. They then stores the RDF serialization of the DDI 3 in the Colectica Repository.</p>
<h2>RDF Examples</h2>
<p>I will show some examples from the <a href="http://www.colectica.com/census2010-ddi-metadata" target="_blank">US 2010 Census sample DDI 3</a> example file. The following is the RDF serialization of question 6 as a CBD which has a coded classification and question text in several languages.</p>
<p><code></p>
<pre class="brush: plain; title: ; notranslate">
@base &lt;http://data.colectica.com/item/us.colectica/ba540279-8bfc-461c-a07b-d25493c648a7/31&gt;.

@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;.
@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;.
@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;.
@prefix ddi: &lt;urn:ddirdf:&gt;.
@prefix ddit: &lt;urn:ddirdf:type:&gt;.

_:autos1 a &lt;ddit:CodeDomain&gt;;
         &lt;ddi:HasCodeScheme&gt; &lt;http://data.colectica.com/item/us.colectica/e2648604-e1a5-4a75-8b0e-52a5c13dd89c/13&gt;;
         &lt;ddi:ResponseDomainBlankIsMissingValue&gt; false.

&lt;http://data.colectica.com/item/us.colectica/ba540279-8bfc-461c-a07b-d25493c648a7/31&gt; &lt;http://purl.org/dc/elements/1.1/title&gt; &quot;Q6&quot;@en-us;
    a &lt;ddit:Question&gt;;
    &lt;ddi:AgencyId&gt; &quot;us.colectica&quot;^^xsd:string;
    &lt;ddi:EstimatedTime&gt; &quot;PT0S&quot;^^xsd:dayTimeDuration;
    &lt;ddi:HasCodeDomain&gt; _:autos1;
    &lt;ddi:HasCodeSet&gt; &lt;http://data.colectica.com/item/us.colectica/e2648604-e1a5-4a75-8b0e-52a5c13dd89c/13&gt;;
    &lt;ddi:Id&gt; &quot;ba540279-8bfc-461c-a07b-d25493c648a7&quot;^^xsd:string;
    &lt;ddi:QuestionIntent&gt; &quot;Asked since 1790. Census data about sex are important because many federal programs must differentiate between males and females for funding, implementing and evaluating their programs. For instance, laws promoting equal employment opportunity for women require census data on sex. Also, sociologists, economists, and other researchers who analyze social and economic trends use the data.&quot;@en-us;
    &lt;ddi:QuestionText&gt; &quot;¿Cuál es el sexo de la Persona 1?&quot;@es,
          &quot;Jinsia ya Mtu wa 1 ni ipi?&quot;@sw,
          &quot;Quel est le sexe de la Personne 1 ?&quot;@fr,
          &quot;Seksi i Personit 1?&quot;@sq,
          &quot;Was ist das Geschlecht von Person 1?&quot;@de,
          &quot;What is Person {PersonCounter}'s sex?&quot;@en-us;
    &lt;ddi:UserId&gt; &quot;Colectica:UserAssignedId:Q6&quot;^^xsd:string;
    &lt;ddi:Version&gt; 31 ;
    &lt;ddi:VersionDate&gt; &quot;2011-02-09T10:11:14&quot;^^xsd:dateTime;
    &lt;ddi:VersionRationale&gt; &quot;Publishing study&quot;@en-us.
</pre>
<p></code><br />
Question 5 shows the use of multiple response domains.</p>
<p><code></p>
<pre class="brush: plain; title: ; notranslate">
@base &lt;http://data.colectica.com/item/us.colectica/6fc6291a-b9c1-4698-83f8-3983c2ec8cb4/28&gt;.

@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;.
@prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;.
@prefix xsd: &lt;http://www.w3.org/2001/XMLSchema#&gt;.
@prefix dc: &lt;http://purl.org/dc/elements/1.1/&gt;.
@prefix ddi: &lt;urn:ddirdf:&gt;.
@prefix ddit: &lt;urn:ddirdf:type:&gt;.

_:autos1 &lt;dc:description&gt; &quot;Apellido&quot;@es,
           &quot;First Name&quot;@en-us,
           &quot;Jina la Mwisho&quot;@sw,
           &quot;Mbiemri&quot;@sq,
           &quot;Nachname&quot;@de,
           &quot;Nom&quot;@fr;
         &lt;dc:title&gt; &quot;Apellido&quot;@es,
         &quot;First Name&quot;@en-us,
         &quot;Jina la Mwisho&quot;@sw,
         &quot;Mbiemri&quot;@sq,
         &quot;Nachname&quot;@de,
         &quot;Nom&quot;@fr;
         a &lt;ddit:TextDomain&gt;;
         &lt;ddi:ResponseDomainBlankIsMissingValue&gt; false.

_:autos2 &lt;dc:description&gt; &quot;Emri&quot;@sq,
           &quot;Jina la kwanza&quot;@sw,
           &quot;Last Name&quot;@en-us,
           &quot;Nombre&quot;@es,
           &quot;Prénom&quot;@fr,
           &quot;Vorname&quot;@de;
         &lt;dc:title&gt; &quot;Emri&quot;@sq,
         &quot;Jina la kwanza&quot;@sw,
         &quot;Last Name&quot;@en-us,
         &quot;Nombre&quot;@es,
         &quot;Prénom&quot;@fr,
         &quot;Vorname&quot;@de;
         a &lt;ddit:TextDomain&gt;;
         &lt;ddi:ResponseDomainBlankIsMissingValue&gt; false.

_:autos3 &lt;dc:description&gt; &quot;Emri i dytë&quot;@sq,
           &quot;Herufi ya Kati&quot;@sw,
           &quot;Inicial&quot;@es,
           &quot;Initiale 2e prénom&quot;@fr,
           &quot;MI&quot;@en-us,
           &quot;Mittl.Init.&quot;@de;
         &lt;dc:title&gt; &quot;Emri i dytë&quot;@sq,
         &quot;Herufi ya Kati&quot;@sw,
         &quot;Inicial&quot;@es,
         &quot;Initiale 2e prénom&quot;@fr,
         &quot;MI&quot;@en-us,
         &quot;Mittl.Init.&quot;@de;
         a &lt;ddit:TextDomain&gt;;
         &lt;ddi:ResponseDomainBlankIsMissingValue&gt; false.

&lt;http://data.colectica.com/item/us.colectica/6fc6291a-b9c1-4698-83f8-3983c2ec8cb4/28&gt; &lt;dc:title&gt; &quot;Q5&quot;@en-us;
    a &lt;ddit:Question&gt;;
    &lt;ddi:AgencyId&gt; &quot;us.colectica&quot;^^xsd:string;
    &lt;ddi:EstimatedTime&gt; &quot;PT0S&quot;^^xsd:dayTimeDuration;
    &lt;ddi:HasTextDomain&gt; _:autos1,
                   _:autos2,
                   _:autos3;
    &lt;ddi:Id&gt; &quot;6fc6291a-b9c1-4698-83f8-3983c2ec8cb4&quot;^^xsd:string;
    &lt;ddi:QuestionIntent&gt; &quot;Listing the name of each person in the household helps the respondent to include all members, particularly in large households where a respondent may forget who was counted and who was not. Also, names are needed if additional information about an individual must be obtained to complete the census form. Federal law protects the confidentiality of personal information, including names.&quot;@en-us;
    &lt;ddi:QuestionText&gt; &quot;¿Cuál es el nombre de la Persona 1?&quot;@es,
                  &quot;Jina la Mtu wa 1 ni lipi?&quot;@sw,
                  &quot;Quel est le nom de la Personne 1 ?&quot;@fr,
                  &quot;Si quhet Personi 1?&quot;@sq,
                  &quot;What is Person {PersonCounter}'s name?&quot;@en-us,
                  &quot;Wie lautet der Name von Person 1?&quot;@de;
    &lt;ddi:UserId&gt; &quot;Colectica:UserAssignedId:Q5&quot;^^xsd:string;
    &lt;ddi:Version&gt; 28 ;
    &lt;ddi:VersionDate&gt; &quot;2011-02-09T10:11:14&quot;^^xsd:dateTime;
    &lt;ddi:VersionRationale&gt; &quot;Publishing study&quot;@en-us.
</pre>
<p></code></p>
<h2>SPARQL Examples</h2>
<p>Lets take a look at some SPAQRL queries that I can run across the DDI 3 RDF stored in the Colectica Repository. The first one I will look for studies that I have created since January 2010.</p>
<p><code></p>
<pre class="brush: plain; title: ; notranslate">
PREFIX ddi: &lt;urn:ddirdf:&gt;
PREFIX ddit: &lt;urn:ddirdf:type:&gt;
PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;

SELECT ?study
WHERE
{
    ?study a ddit:StudyUnit;
    dc:date ?creation_date;
    dc:creator &lt;http://dan.smith.name/who#dan&gt;.
    FILTER ( xsd:dateTime(?creation_date) &gt; &quot;2010-01-01 00:00:00&quot;^^xsd:dateTime ) .
}
ORDER BY ?study
</pre>
<p></code></p>
<p>This second query will give us a count of how many times a variable has been reused/harmonized across datasets.</p>
<p><code></p>
<pre class="brush: plain; title: ; notranslate">
PREFIX ddi: &lt;urn:ddirdf:&gt;
PREFIX ddit: &lt;urn:ddirdf:type:&gt;
PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;

SELECT ?variable COUNT (?parent) AS c
WHERE
{
    ?parent ddi:HasVariable ?variable .
    ?parent a ddit:Dataset
}
GROUP BY ?variable
</pre>
<p></code></p>
<h2>Next Steps</h2>
<p>Colectica Repository DDI 3 RDF Services is now available as a community technology preview to interested customers. There are several items to take note of while using it:</p>
<ul>
<li>There is not yet an official DDI RDF vocabulary. The namespace and names of elements may change in the future.</li>
<li>Several external vocabularies are also currently used. These include rdf, rdfs, dc, dcterms, owl, xsd, and foaf.</li>
<li>Per metadata item level ACLs on items in the Colectica Repository are not yet implemented in the SPARQL interface. This means that all metadata items will be in a read state to all users, Deploy accordingly.</li>
<li>SPARQL UPDATE is disabled to maintain consistency with the versioned metadata items in the Repository.</li>
<li>You can set the location of your Colectica Web installation in the RDF Services so that the generated URLs for items are resolvable in the browser. This allows users to see a nice web based view of the information.</li>
</ul>
<p>Feedback is welcome!</p>
<p>Dan</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.smith.name/2011/10/ddi-3-meets-rdf-and-sparql-with-colectica-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documenting MIDUS Part 2: Importing Diverse Documentation Sources into DDI 3</title>
		<link>http://jeremy.blogs.colectica.com/2011/06/10/documenting-midus-part-2-importing-diverse-documentation-sources-into-ddi-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=documenting-midus-part-2-importing-diverse-documentation-sources-into-ddi-3-3</link>
		<comments>http://jeremy.blogs.colectica.com/2011/06/10/documenting-midus-part-2-importing-diverse-documentation-sources-into-ddi-3/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 14:00:00 +0000</pubDate>
		<dc:creator>Jeremy Iverson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Colectica]]></category>
		<category><![CDATA[DDI3]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[midus]]></category>

		<guid isPermaLink="false">http://3.41</guid>
		<description><![CDATA[This is the second in a series of articles describing the process of creating a comprehensive, canonical source of documentation for the Midlife in the United States (MIDUS) research project. The goal is to take the diverse set of sources &#8230; <a href="http://jeremy.blogs.colectica.com/2011/06/10/documenting-midus-part-2-importing-diverse-documentation-sources-into-ddi-3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is the second in a series of articles describing the process of creating a comprehensive, canonical source of documentation for the Midlife in the United States (MIDUS) research project. The goal is to take the diverse set of sources that currently document the MIDUS study and create a standardized, DDI 3-based set of documentation that better enables researchers to discover and use the MIDUS data. We chose DDI 3 because it is the only standardized metadata format capable of storing the breadth of information required for the MIDUS study. The project is a joint effort between MIDUS and Colectica. </p>
<ul>
<li><a href="http://jeremy.blogs.colectica.com/2011/06/01/documenting-midus-part-1-taking-inventory/">Part 1: Taking Inventory</a> </li>
<li>Part 2: Importing Diverse Documentation Sources into DDI 3 </li>
</ul>
<div id="outline-container-1" class="outline-3">
<h3 id="sec-1">A First Draft </h3>
<div class="outline-text-3" id="text-1">
<p>In Part 1 we took inventory of the available sources of documentation and decided how to map information from each of the sources to fields in DDI 3. </p>
<p> The next step is to create a first draft of the DDI 3 metadata. The table below, repeated from Part 1, shows the existing sources of documentation and how they will map to DDI 3 elements. </p>
<p> Converting these existing sources into a single, canonical, DDI 3-based source of documentation was accomplished using a combination of off-the-shelf tools and custom programming. The steps of this conversion process are discussed below. </p>
<table border="2" cellspacing="3" cellpadding="6" rules="groups" frame="hsides">
<caption></caption>
<colgroup>
<col class="left" />
<col class="left" /> </colgroup>
<thead>
<tr>
<th scope="col">Source</th>
<th scope="col">DDI 3 Mapping</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data Files</td>
<td>PhysicalInstance, Variable, VariableStatistics</td>
</tr>
<tr>
<td>Web documents and Codebooks</td>
<td>StudyUnit, FundingInformation, OtherMaterial</td>
</tr>
<tr>
<td>DDI 2</td>
<td>PhysicalInstance, Variable, QuestionItem, VariableStatistics</td>
</tr>
<tr>
<td>Spreadsheets</td>
<td>Variable, QuestionItem</td>
</tr>
<tr>
<td>CAI Source Code</td>
<td>Instrument, QuestionItem, ControlConstructSequence</td>
</tr>
<tr>
<td>PDF Documents</td>
<td>OtherMaterial</td>
</tr>
</tbody>
</table></div>
</p></div>
<div id="outline-container-2" class="outline-3">
<h3 id="sec-2">Step 1: Create the MIDUS project in Colectica </h3>
<div class="outline-text-3" id="text-2">
<p>The main tool used to manage the MIDUS DDI 3 upgrade project is Colectica. A MIDUS-specific deployment of Colectica Repository is used as the authoritative source of metadata. Colectica Designer is used to import, create, edit, and synchronize the metadata with the repository. </p>
<p> This means the first step is to fire up Colectica Designer and create the project that will hold each of the MIDUS studies. Since that&#8217;s fairly simple, let&#8217;s move on to more interesting steps. </p>
</div></div>
<div id="outline-container-3" class="outline-3">
<h3 id="sec-3">Step 2: Data Files and DDI 2 </h3>
<div class="outline-text-3" id="text-3">
<p>MIDUS is currently broken up into two waves: MIDUS 1 and MIDUS 2. MIDUS 1 contains two sub-projects, and MIDUS 2 contains 5 sub-projects. There is also a study called MIDUS Japan (MIDJA), which is a comparable study conducted in Japan. </p>
<p> Each of these projects has its own data file, and most of them had existing DDI 2 documentation. This made it very easy to bring in all the data-related information quickly.  </p>
<ul>
<li>First, for the projects that did not have DDI 2 file, we created one. This is a two step process using Colectica.
<ol>
<li>Use the Import SPSS feature to load the dataset in Colectica. </li>
<li>Use the Export to DDI 2 feature to create the DDI 2 file. </li>
</ol>
</li>
<li>Next, we wanted to bring each study&#8217;s dataset description into DDI 3. This is another two step process for each project.
<ol>
<li>In Colectica Designer, we used the Import DDI 2 feature to automatically create the corresponding information in DDI 3. </li>
<li>Navigate to the dataset view and use the Calculate Summary Statistics feature. As you might guess, this calculates descriptive statistics and frequencies for the entire dataset, and stores them in the DDI 3 metadata. </li>
</ol>
</li>
</ul></div>
</p></div>
<div id="outline-container-4" class="outline-3">
<h3 id="sec-4">Step 3: Spreadsheets </h3>
<div class="outline-text-3" id="text-4">
<p>While the SPSS files and DDI 2 contain a decent amount of metadata, MIDUS also has spreadsheets that hold lengthier variable labels, question text, and notes. These are highly structured files where each row has a column for the variable&#8217;s name, followed by columns holding the extended information. </p>
<p> Since there isn&#8217;t an off-the-shelf tool that can merge these custom spreadsheets with the DDI 3 metadata, this step required some custom programming. Using Colectica SDK this was a fairly quick task. Here is a rough outline of the custom program: </p>
<ul>
<li>For each row in the spreadsheet:
<ul>
<li>Read the variable name and retrieve the variable from Colectica Repository </li>
<li>If an extended label is specified for the variable, update the variable&#8217;s label </li>
<li>If a description is specified for the variable, set the variable&#8217;s description </li>
<li>If question text is specified:
<ul>
<li>Create a new DDI 3 question item with the appropriate text </li>
<li>Add the question to the repository </li>
<li>Associate the variable with the new question </li>
</ul>
</li>
<li>Finally, save the updated variable and continue to the next row </li>
</ul>
</li>
<li>After processing the spreadsheet, synchronize the changes with the repository </li>
</ul></div>
</p></div>
<div id="outline-container-5" class="outline-3">
<h3 id="sec-5">Step 4: Web documents and Codebooks </h3>
<div class="outline-text-3" id="text-5">
<p>The MIDUS web site contains abstracts, funding information, citation information, and more details that give a broad overview of the MIDUS study. DDI 3 provides fields for this information, so we simply copied and pasted the information from the web site into the corresponding fields in Colectica Designer. </p>
<p> The advantage of managing this information in Colectica instead of as simple HTML files is that from now on, changes to the information will be tracked as new versions. This results in a full audit log and version history for the MIDUS documentation. </p>
<p> The MIDUS web site also linked to codebooks describing each of the MIDUS datasets. These codebooks don&#8217;t contain any information that isn&#8217;t also found in the DDI 2, data files, or spreadsheets. That makes the codebooks easy to deal with: we just ignored them. A future article will describe how we automatically generated new, more interactive codebooks from the DDI 3 metadata. </p>
</div></div>
<div id="outline-container-6" class="outline-3">
<h3 id="sec-6">Step 5: PDF Documents </h3>
<div class="outline-text-3" id="text-6">
<p>The MIDUS web site also links to many PDF documents that contain additional information useful to researchers. Adding these links to the DDI 3 was straightforward with Colectica Designer. </p>
<ol>
<li>Enter the document title, documentation type, and URL in each study&#8217;s Related Materials section </li>
<li>Use the Detect MIME Type feature to automatically set the content type of each document </li>
</ol></div>
</p></div>
<div id="outline-container-7" class="outline-3">
<h3 id="sec-7">Step 6: Computer Assisted Interviewing (CAI) Source Code </h3>
<div class="outline-text-3" id="text-7">
<p>The MIDUS surveys were conducted using the CASES computer assisted interviewing (CAI) system. Since Colectica Designer supports importing CASES source code, this was a simple step. We just used the Import CASES feature to bring in all the questions and the flow logic of the survey. </p>
<p> But what about the questions that were created when we imported from DDI 2 and merged the information from the custom spreadsheets? MIDUS researchers decided that the CAI source code should be canonical when question text differed, since it is the language respondents actually heard or saw. A future article will detail how we made this happen. </p>
</div></div>
<div id="outline-container-8" class="outline-3">
<h3 id="sec-8">Where does this leave us? </h3>
<div class="outline-text-3" id="text-8">
<p>This article describes how we used off-the-shelf tools, with a bit of custom programming, to convert documentation from a wide range of resources into a single, standards-based format. The MIDUS documentation is now stored in one authoritative repository. With this repository, we can reuse resources like classifications, questions, and variable descriptions; track all changes to the MIDUS project; and generate rich forms of documentation.   </p>
</div></div>
<div id="outline-container-9" class="outline-3">
<h3 id="sec-9">Future Articles </h3>
<div class="outline-text-3" id="text-9">
<p>Since MIDUS is a longitudinal study, many classifications, questions, and variables are repeated in each wave of data collection. The next article will explore how we automatically harmonized these resources. It will also discuss how we merged the questions that were described in the DDI 2 metadata with the actual question text found in the computer-assisted interviewing system source code. </p>
<p> Subsequent articles will show how we used this harmonized metadata to generate modern, interactive codebooks that make it easy for researchers to discover the data they need. </p>
</div></div>
]]></content:encoded>
			<wfw:commentRss>http://jeremy.blogs.colectica.com/2011/06/10/documenting-midus-part-2-importing-diverse-documentation-sources-into-ddi-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documenting MIDUS Part 1: Taking Inventory</title>
		<link>http://jeremy.blogs.colectica.com/2011/06/01/documenting-midus-part-1-taking-inventory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=documenting-midus-part-1-taking-inventory-2</link>
		<comments>http://jeremy.blogs.colectica.com/2011/06/01/documenting-midus-part-1-taking-inventory/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 07:04:00 +0000</pubDate>
		<dc:creator>Jeremy Iverson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Colectica]]></category>
		<category><![CDATA[DDI3]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[midus]]></category>

		<guid isPermaLink="false">http://3.34</guid>
		<description><![CDATA[This is the first in a series of articles describing the process of creating a comprehensive, canonical source of documentation for the Midlife in the United States (MIDUS) research project. The goal is to take the diverse set of sources &#8230; <a href="http://jeremy.blogs.colectica.com/2011/06/01/documenting-midus-part-1-taking-inventory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is the first in a series of articles describing the process of creating a comprehensive, canonical source of documentation for the Midlife in the United States (MIDUS) research project. The goal is to take the diverse set of sources that currently document the MIDUS study and create a standardized, DDI 3-based set of documentation that better enables researchers to discover and use the MIDUS data. We chose DDI 3 because it is the only standardized metadata format capable of storing the breadth of information required for the MIDUS study. The project is a joint effort between MIDUS and Colectica. </p>
<ul>
<li>Part 1: Taking Inventory </li>
<li><a href="http://jeremy.blogs.colectica.com/2011/06/10/documenting-midus-part-2-importing-diverse-documentation-sources-into-ddi-3/">Part 2: Importing Diverse Documentation Sources into DDI 3</a> </li>
</ul>
<div id="outline-container-1" class="outline-3">
<h3 id="sec-1">About MIDUS </h3>
<div class="outline-text-3" id="text-1">
<p>MIDUS is a large, longitudinal study operated by the University of Wisconsin. From the <a href="http://midus.wisc.edu/">MIDUS web site</a>: </p>
<blockquote>
<p>The first MIDUS investigation was conducted in 1994/95 with a sample of over 7000 Americans, aged 25 to 74. It was funded by the John D. and Catherine T. MacArthur Foundation. In 2002, the National Institute on Aging provided a grant to the Institute on Aging at the University of Wisconsin, Madison to carry out a longitudinal follow-up. Data collection for this second wave began in 2004 and was completed in 2009.
</p>
</blockquote>
<p> A new round of data collection will begin in 2011. </p>
<p> MIDUS data are used by social science researchers throughout the world, and an important goal of the project is to make its data easily accessible and understandable by these researchers. </p>
</div></div>
<div id="outline-container-2" class="outline-3">
<h3 id="sec-2">Existing Documentation and Resources </h3>
<div class="outline-text-3" id="text-2">
<p>The first step toward creating a comprehensive set of documentation for the MIDUS study is to take an inventory of the available sources of data and documentation. Some of these sources are available through the MIDUS web site or through the ICPSR archive, while others are internal resources. </p>
<p> Let&#8217;s take a look at each type of resource and see what information it provides for our desired documentation. </p>
</p></div>
<div id="outline-container-2_1" class="outline-4">
<h4 id="sec-2_1">Data Files </h4>
<div class="outline-text-4" id="text-2_1">
<p>MIDUS data are made available in SAS, SPSS, and Stata formats both through the MIDUS web site and through ICPSR. These files contain variable and value labels, and of course they can be used to calculate summary statistics and frequencies. </p>
</div></div>
<div id="outline-container-2_2" class="outline-4">
<h4 id="sec-2_2">Web Documents and Codebooks </h4>
<div class="outline-text-4" id="text-2_2">
<p>The MIDUS web site provides detailed descriptions for each of its sub-projects, funding sources, links to related materials, and codebooks that contain more extended labels than are found in the SPSS data files. We will want to maintain all this information in the new, standardized documentation. </p>
</div></div>
<div id="outline-container-2_3" class="outline-4">
<h4 id="sec-2_3">DDI 2 </h4>
<div class="outline-text-4" id="text-2_3">
<p>Many of these web documents are automatically generated from DDI 2. The MIDUS DDI 2 describes codebook level details such as dataset contents, variable labels, summary statistics, and frequencies. It also has the question text that was used to collect data for each variable. </p>
</div></div>
<div id="outline-container-2_4" class="outline-4">
<h4 id="sec-2_4">Spreadsheets </h4>
<div class="outline-text-4" id="text-2_4">
<p>MIDUS staff use several spreadsheets to document their data and internal processes. </p>
<ul>
<li id="sec-2-4-1">Extended Metadata <br/> These spreadsheets list variables found in the data and provide longer labels, text of source questions, and other related information. </li>
</ul>
<ul>
<li id="sec-2-4-2">Concept Mapping <br/> These spreadsheets define concepts studied by MIDUS, and associate the concepts with the related variables found in the MIDUS datasets. </li>
</ul>
<ul>
<li id="sec-2-4-3">Translations <br/> These spreadsheets list variables from the main MIDUS studies along with Japanese language question text for the corresponding variables in the MIDUS Japan project. </li>
</ul></div>
</p></div>
<div id="outline-container-2_5" class="outline-4">
<h4 id="sec-2_5">Computer Assisted Interviewing Source Code (CASES) </h4>
<div class="outline-text-4" id="text-2_5">
<p>    The surveys used to collect the MIDUS data were administered by interviewers using the CASES computer assisted interviewing system. The CASES source code for these surveys is still available, and provides the one true representation of the survey respondents answered, with precise question text and routing instructions. </p>
</div></div>
<div id="outline-container-2_6" class="outline-4">
<h4 id="sec-2_6">PDF Documents </h4>
<div class="outline-text-4" id="text-2_6">
<p>MIDUS makes available many documents as PDF downloads. These include information about classification systems, methodological decisions, and more. </p>
</div></div>
</p></div>
<div id="outline-container-3" class="outline-3">
<h3 id="sec-3">Putting it all Together </h3>
<div class="outline-text-3" id="text-3">
<p>This is a lot of stuff, and it&#8217;s spread widely across different web sites and organizations. There isn&#8217;t one source where MIDUS data users can access everything. The goal of this project is to wrap all this information into one package using a standardized metadata model. Once we have that package, we will generate the types of documentation that researchers find useful, including: </p>
<ul>
<li>Web sites </li>
<li>Codebooks, both printable and interactive </li>
<li>Cross reference/concordance tables </li>
<li>User manuals </li>
</ul>
<p>Besides being able to generate these types of documentation, the resulting package can be shared with archives like ICPSR. The archive will then have the full set of information necessary for researchers to understand the MIDUS data well into the future. Archives can also ingest the standardized package into their own metadata systems to generate the types of documentation important to their users. </p>
<p> The sources of information about MIDUS map quite well to the DDI 3 elements. The table below summarized how the existing MIDUS sources will be mapped to DDI 3. </p>
<table border="2" cellspacing="3" cellpadding="6" rules="groups" frame="hsides">
<caption></caption>
<colgroup>
<col class="left" />
<col class="left" /> </colgroup>
<thead>
<tr>
<th scope="col">Source</th>
<th scope="col">DDI 3 Mapping</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data Files</td>
<td>PhysicalInstance, Variable, VariableStatistics</td>
</tr>
<tr>
<td>Web documents and Codebooks</td>
<td>StudyUnit, FundingInformation, OtherMaterial</td>
</tr>
<tr>
<td>DDI 2</td>
<td>PhysicalInstance, Variable, QuestionItem, VariableStatistics</td>
</tr>
<tr>
<td>Spreadsheets</td>
<td>Variable, QuestionItem</td>
</tr>
<tr>
<td>CAI Source Code</td>
<td>Instrument, QuestionItem, ControlConstructSequence</td>
</tr>
<tr>
<td>PDF Documents</td>
<td>OtherMaterial</td>
</tr>
</tbody>
</table></div>
</p></div>
<div id="outline-container-4" class="outline-3">
<h3 id="sec-4">Future Articles </h3>
<div class="outline-text-3" id="text-4">
<p>The next article will detail how we created the first draft of a DDI 3 metadata package using the MIDUS project&#8217;s existing resources. Subsequent articles will show how we expanded on this initial draft and automatically generated end-user documentation. </p>
</div></div>
]]></content:encoded>
			<wfw:commentRss>http://jeremy.blogs.colectica.com/2011/06/01/documenting-midus-part-1-taking-inventory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ranking DDI 3 metadata items in search results</title>
		<link>http://dan.smith.name/2011/05/ranking-ddi-3-metadata-items-in-search-results/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ranking-ddi-3-metadata-items-in-search-results-4</link>
		<comments>http://dan.smith.name/2011/05/ranking-ddi-3-metadata-items-in-search-results/#comments</comments>
		<pubDate>Fri, 27 May 2011 23:03:07 +0000</pubDate>
		<dc:creator>Dan Smith</dc:creator>
				<category><![CDATA[Colectica]]></category>
		<category><![CDATA[DDI3]]></category>
		<category><![CDATA[Repository]]></category>

		<guid isPermaLink="false">http://2.44</guid>
		<description><![CDATA[We were recently at UW-Madison to visit with Dr. Barry T Radler and the MIDUS longitudinal survey. We are working with them to document their series of longitudinal studies in DDI 3 to enable the generation of very detailed and &#8230; <a href="http://dan.smith.name/2011/05/ranking-ddi-3-metadata-items-in-search-results/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We were recently at UW-Madison to visit with <a href="http://aging.wisc.edu/research/affil.php?Ident=152">Dr. Barry T Radler</a> and the <a href="http://midus.wisc.edu/">MIDUS</a> longitudinal survey. We are working with them to document their series of longitudinal studies in DDI 3 to enable the generation of very detailed and cross linked codebooks. During our meeting Dr. Radler mentioned that the way the search results on Colectica Web were listed could be improved, as they were currently ordered based solely on information specific to each individual item.</p>
<p>Colectica Web offers faceted searching of DDI items, and even searching within arbitrary sets such as a specific study, instance, package, scheme, etc. The question is how to return the results with the most relevant DDI 3 item listed first. DDI 3 allows for massive reuse of items through its referencing mechanisms. For example, the same concept can be used to describe multiple questions or the same code scheme can be the representation of many different variables. Colectica Repository tracks all of this extra relationship and contextual information about DDI items, so we decided to use it in the search rankings.</p>
<h3>Introducing DDI 3 metadata ranking</h3>
<p><a href="http://dan.smith.name/files/2011/05/metadata-rank-example.png"><img class="alignnone size-full wp-image-45" style="border: solid black 1px;" title="metadata-rank-example" src="http://dan.smith.name/files/2011/05/metadata-rank-example.png" alt="" width="592" height="422" /></a></p>
<p>The search results, show for Gender above, now use not only the information from the DDI 3 item for ranking, they also take into account the how often an item is reused and harmonized across waves of this longitudinal study.</p>
<p>This is also a great new feature for users of Colectica Designer. When a user opens the item picker to create a reference, their search results will also list the most reused items more prominently. This will help users find the items that already have the most influence and <strong>increase the comparability of their published research</strong>. Please let me know what you think of the new search rankings or if you have any ideas for how they can be even further refined.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.smith.name/2011/05/ranking-ddi-3-metadata-items-in-search-results/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPF DataGrid and the Backspace Character</title>
		<link>http://jeremy.blogs.colectica.com/2011/05/24/wpf-datagrid-and-the-backspace-character/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wpf-datagrid-and-the-backspace-character</link>
		<comments>http://jeremy.blogs.colectica.com/2011/05/24/wpf-datagrid-and-the-backspace-character/#comments</comments>
		<pubDate>Tue, 24 May 2011 17:11:00 +0000</pubDate>
		<dc:creator>Jeremy Iverson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[datagrid]]></category>
		<category><![CDATA[wpf]]></category>

		<guid isPermaLink="false">http://3.6</guid>
		<description><![CDATA[Colectica uses the DataGrid throughout its user interface for displaying editable lists. Today, while editing some metadata, I wanted to remove the text in a particular column for many rows. This is pretty quick if you get into the rhythm &#8230; <a href="http://jeremy.blogs.colectica.com/2011/05/24/wpf-datagrid-and-the-backspace-character/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Colectica uses the DataGrid throughout its user interface for displaying editable lists. Today, while editing some metadata, I wanted to remove the text in a particular column for many rows. This is pretty quick if you get into the rhythm of F2-Backspace-Enter, F2-Backspace-Enter, F2-Backspace-Enter&hellip;. </p>
<p> Things don&#8217;t go quite so well if you miss the F2 part of the pattern and just press Backspace-Enter on a cell. The WPF DataGrid will actually replace the contents of the cell with the backspace character. Depending on how you look at your string, this might show up as 0&#215;08, &amp;#x8;, u0008, or b. </p>
<p> <a href="http://wpf.codeplex.com/workitem/10246?ProjectName=wpf">This CodePlex post</a> confirms the bug in the DataGrid and includes some workarounds. On our end, the current fix is simply to ignore strings that have a backspace character in them. This way they don&#8217;t end up in the XML, which is good because in XML 1.0 the backspace is an illegal character. </p>
]]></content:encoded>
			<wfw:commentRss>http://jeremy.blogs.colectica.com/2011/05/24/wpf-datagrid-and-the-backspace-character/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to register a 11179 item in Colectica Repository</title>
		<link>http://dan.smith.name/2011/05/how-to-register-a-11179-item-in-colectica-repository/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-register-a-11179-item-in-colectica-repository</link>
		<comments>http://dan.smith.name/2011/05/how-to-register-a-11179-item-in-colectica-repository/#comments</comments>
		<pubDate>Mon, 23 May 2011 03:48:08 +0000</pubDate>
		<dc:creator>Dan Smith</dc:creator>
				<category><![CDATA[Colectica]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DDI3]]></category>

		<guid isPermaLink="false">http://2.22</guid>
		<description><![CDATA[Colectica Repository can store any metadata items that conform to the ISO 11179 naming scheme for registered items. The DDI 3 Addin for Colectica Repository additionally allows for indexing of contextual and relationship information. Here is a brief code example &#8230; <a href="http://dan.smith.name/2011/05/how-to-register-a-11179-item-in-colectica-repository/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Colectica Repository can store any metadata items that conform to the <a title="Metadata registries (MDR) -- Part 5: Naming and identification principles" href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=35347" target="_blank">ISO 11179 naming</a> scheme for registered items. The DDI 3 Addin for Colectica Repository additionally allows for indexing of contextual and relationship information. Here is a brief code example showing how DDI 3 items can be registered in the Colectica Repository.</p>
<p>First we will create some DDI 3 based metadata using the <a title="Colectica DDI 3 SDK" href="http://www.colectica.com/software/sdk" target="_blank">Colectica SDK</a>. If you don&#8217;t have the SDK you can create the DDI 3 by hand or using your favorite XML library.</p>
<pre class="brush: csharp; title: ; notranslate">
// Create a DDI 3 Concept using the Colectica SDK
Concept concept = new Concept() { AgencyId = &quot;example.org&quot; };
concept.ItemName[&quot;en-US&quot;] = &quot;Given Name&quot;;
concept.Description[&quot;en-US&quot;] = @&quot;A character-string (e.g. `Billy' and `Peter')
        given to people as a first name (or, in most Western countries, as a
        middle name), usually shortly after birth.&quot;;

// Create a DDI 3 Question using the Colectica SDK
Question q1 = new Question() { AgencyId = &quot;example.org&quot; };
q1.QuestionText[&quot;en-US&quot;] = &quot;What is your first name?&quot;;
TextDomain domain = new TextDomain();
domain.Label[&quot;en-US&quot;] = &quot;First Name&quot;;
q1.ResponseDomains.Add(domain);

// Link the question and concept
q1.Concepts.Add(concept);
</pre>
<p>Then we will create the repository client, using the supplied credentials.</p>
<pre class="brush: csharp; title: ; notranslate">
// Create the web services client
var client = new WcfRepositoryClient(
    &quot;username&quot;, &quot;password&quot;, &quot;localhost&quot;, 19893);
</pre>
<p>We can Register any object made by the Colectica SDK using the built in mappings.</p>
<pre class="brush: csharp; title: ; notranslate">
// Register a 11179 administered item using
// the Repository Client helper functions
client.RegisterItem(concept, new CommitOptions());
</pre>
<p>Alternatively, we can access the web services layer and construct the proper SOAP payload.</p>
<pre class="brush: csharp; title: ; notranslate">
// Register a 11179 administered item using the Web Services directly
Collection&lt;Note&gt; notes = new Collection&lt;Note&gt;();
string serialization = q1.GetXmlRepresentation(notes).OuterXml;
RepositoryItem ri = new RepositoryItem()
{
    CompositeId = q1.CompositeId,   // agency, id, and version
    Item = serialization,           // item's serialization
    ItemType = q1.ItemType,         // model defined item type identifier
    IsDepricated = false,
    IsPublished = q1.IsPublished,
    IsProvisional = false,          // only used in the local repository
    Notes = notes,                  // notes about the item being registered
    VersionDate = q1.VersionDate,
    VersionRationale = q1.VersionRationale,
    VersionResponsibility = q1.VersionResponsibility
};
client.RegisterItem(ri, new CommitOptions());
</pre>
<p>As you can see, we added both the DDI concept and the DDI question item to the repository. The Colectica SDK has methods to gather all items that are linked and create sets of items to be registered. It also has the ability to detect changed items automatically, so a program can quickly determine which items should have new versions registered after a user action.</p>
<h2>Update 1: Registering items in a DDI instance</h2>
<p>Here is more information about registering items in the Repository based on some followup questions.</p>
<blockquote><p>When adding a concept to a question, the hierarchical relationship is established. Is this inline, or by reference at the XML level?.</p></blockquote>
<p>The DDI 3 standard allows for either including items inline or by references in many locations. Colectica Repository will process and store items using either format. If it is a DDI 3 item, the Repository will additionally index the text and relationship information about the item using the DDI 3 Addin. Note that only the item being registered and its relationship are processed, each item must still be registered individually or in a batch operation.</p>
<p>Colectica Designer will always use the referencing mechanisms in DDI when interacting with the Repository. This is for speed of processing and to allow the easiest sharing and harmonization of items across multiple Studies and Instances. You can learn more about how Designer determines item boundaries by reading about <a title="CBD - Concise Bounded Description" href="http://www.w3.org/Submission/CBD/" target="_blank">Concise Bounded Descriptions</a>.</p>
<blockquote><p>How can I register all items in a DDI Instance? How can I update only the changed items in a DDI instance?</p></blockquote>
<p>If you are using DDI with an XML library, you can use the following xpath queries to find all the items in your Instance to register.</p>
<pre class="brush: plain; title: ; notranslate">
//*[@isVersionable]
//*[@isMaintainable]
</pre>
<p>You can then loop over the XML nodes returned by the XPath and register the results. If you are using the Colectica SDK, you can find all items in an Instance as follows:</p>
<pre class="brush: csharp; title: ; notranslate">
// obtain your DDI Instance in some fashion
DdiInstance instance = YourDdiInstance();

// Find all items
ItemGatherer gatherer = new ItemGatherer();
instance.Accept(gatherer);
Collection&lt;IVersionable&gt; allItems = gatherer.Items;

// You can also find only the modified items
DirtyItemGatherer gatherer = new DirtyItemGatherer();
instance.Accept(gatherer);
Collection&lt;IVersionable&gt; changedItems = gatherer.DirtyItems;
</pre>
<blockquote><p>How do I export a whole instance to DDI3?</p></blockquote>
<p>There are several ways to export a DDI instance from the Repository. One way is to use the Repositoy&#8217;s command line tools and to write an XML document. Another is to programmatically export a DDI instance using the SDK:</p>
<pre class="brush: csharp; title: ; notranslate">
// obtain your DDI Instance in some fashion.
// Only the identification is needed since we will populate the instance
DdiInstance instance = YourDdiInstance();

// populate the entire class hierarchy from the Repository
GraphPopulator populator = new GraphPopulator(client);
instance.Accept(populator);

// Create the XML document for the DDI Instance
DDIWorkflowSerializer serializer = new DDIWorkflowSerializer();
XmlDocument doc = serializer.Serialize(instance);
</pre>
<p>A third option is to use an XML library and construct the DDI Instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.smith.name/2011/05/how-to-register-a-11179-item-in-colectica-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Colectica Repository access methods</title>
		<link>http://dan.smith.name/2011/05/new-colectica-repository-access-methods/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-colectica-repository-access-methods</link>
		<comments>http://dan.smith.name/2011/05/new-colectica-repository-access-methods/#comments</comments>
		<pubDate>Fri, 20 May 2011 00:34:21 +0000</pubDate>
		<dc:creator>Dan Smith</dc:creator>
				<category><![CDATA[Colectica]]></category>
		<category><![CDATA[DDI3]]></category>
		<category><![CDATA[Repository]]></category>

		<guid isPermaLink="false">http://2.13</guid>
		<description><![CDATA[Colectica Repository is used as both a registry and resolution service for various pieces of identified metadata. Both Colectica Designer and Web communicate with it to perform all of the neat tasks listed on their features pages. Users can communicate &#8230; <a href="http://dan.smith.name/2011/05/new-colectica-repository-access-methods/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Colectica Repository" href="http://www.colectica.com/software/repository" target="_blank">Colectica Repository</a> is used as both a registry and resolution service for various pieces of identified metadata. Both <a title="Colectica Designer" href="http://www.colectica.com/software/designer" target="_blank">Colectica Designer</a> and <a title="Colectica Web" href="http://www.colectica.com/software/web" target="_blank">Web</a> communicate with it to perform all of the neat tasks listed on their features pages. Users can communicate with these same service calls to create their own applications and leverage all of this built in functionality. By default, we supply a SOAP 1.2 WS-* and net.tcp endpoints to communicate with the server remotely. These are the industry heavyweights in enterprise SOA architecture.</p>
<p>Recently we had a client request to use the SOAP 1.1 WS-Basic profile. Due to the Repository&#8217;s decoupled design, we were able to add this very quickly. All of these endpoints use a secure transport channel such as SSL/TLS. The quickness of adding new access methods got me thinking what other types of endpoints and serializations might be useful. Adding both SPARQL and REST immediately came to mind.</p>
<p>Colectica Repository already has an excellent relationship and set based querying system. Adding a SPARQL endpoint would allow users to use a standardized query language to process those relationships and associated data. The RDF serialization would be a subset of the official DDI object model. When the DDI urn format is agreed upon I will look into this more. If you like this idea, tell us you would like to see feature ticket #1181 implemented.</p>
<p>REST services make it very convenient for users on various platforms to create access clients. Since all metadata stored in the Repository are identified consistently it should be simple to make a basic access model. Exposing some of the Repository&#8217;s more advanced functions would be a bit  more challenging, but for simple resolution this would work well. REST could also make use of already existing HTTP caching, as published versions of the metadata do not change.</p>
<p>Aside from native DDI 3, JSON is an obvious candidate for the serialization format, but speed is always a concern. I have been looking at several new binary serialization formats:</p>
<ul>
<li>Google Protocol Buffers: <a href="http://code.google.com/apis/protocolbuffers/" target="_blank">Protocol buffers</a> are fast, simple, compact, and cross platform. I have seen benchmarks where they are faster than the net.tcp binary serialization we currently ship.</li>
<li>BSON: <a href="http://bsonspec.org/" target="_blank">Binary JSON</a> is another option and is very similar to the protocol buffers, but is not tied to a schema.</li>
</ul>
<p>I&#8217;ve added REST support as feature ticket #1182, again let us know if that interests you. The next version of Colectica Repository now additionally supports SOAP 1.1, are there any other ways that you would like to access the services?</p>
]]></content:encoded>
			<wfw:commentRss>http://dan.smith.name/2011/05/new-colectica-repository-access-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

