« June 2009 | Main | August 2009 »

July 2009 Archives

July 31, 2009

TMCore07 SP4 Released

NetworkedPlanet today announces the release of latest version of the TMCore topic map engine. TMCore is the premiere toolkit for developers on .NET looking to harness the full power of Topic Maps in their applications. Built from the ground-up using .NET technologies, TMCore provides a flexible set of APIs and builds on the robustness, scalability, performance of Microsoft's SQL Server.

The new SP4 release of TMCore07 provides a number of bug fixes and performance enhancements and is a recommended upgrade for all customers. Customers having a current support contract receive TMCore07 SP4 free of charge. For download details please email us at contact@networkedplanet.com.

The following fixes and updates have been made in this release:

BUGFIX: TMEditor now properly displays non-latin characters in browsers that have support for rendering them correctly.
PERFORMANCE: Performance of the stored procedures for duplicate suppression has been greatly increased while also decreasing the amount of server memory required to complete the duplicate removal process on large topic maps.
BUGFIX: TMEditor now supports editing association role constraints for reflexive associations
BUGFIX: The NPCL import process now allows importing duplicate association role constraints on an association. This fix enables users to define reflexive associations using multiple association role constraints with the same role type.
BUGFIX: The tm_npcl* views have been fixed to eliminate duplicate entries and improve performance.
BUGFIX: tmimport.exe and tmexport.exe now return a non-zero status code when an error is encountered.
BUGFIX: XTM export has been fixed to not export associations with no roles in order to avoid generating invalid XTM output.
BUGFIX: The NPCL Forms export has been fixed to avoid generating invalid output when the NPCL schema contains inconsistencies.

July 28, 2009

Implementing Topic Maps Content Management Integration using Atom and Live Mesh

One of the most common scenarios for Topic Maps is to use them as the primary paradigm for organising, classifying and finding content in a content management system. The basic strategy involved in these integrations is to create topics for each content item in the CMS and then associate the content topics to other topics in the the topic map. We call this process 'content item proxification and classification'. This builds up a nice graph that can then be exploited in search and navigation controls either within the CMS or as part of some other publishing process.

The key to making this work is to somehow hook into what is happening within the CMS so that the topic map view of the content items correctly reflects things in the CMS. i.e. if a document is deleted its topic shouldn't show up in the topicmap.

The integrations we have done for EPiServer and SharePoint have taken the approach of event handlers installed into the CMS product. This means that as things happen in the CMS our handlers are notified and can ensure that the topic map is in a consistent state.

However, more and more, we are looking at online content systems, and how to integrate these content stores with Topic Maps systems.The following sections discuss a generic pull approach to synchronisation and then give some detailed insights into implementing this approach with Live Mesh. Live Mesh is an online service from Microsoft for collborating, file syncing and generally supporting dynamic ad-hoc work groups. It is of course missing a powerful metadata management and classification aspect.

OK, so first up is the general notion of a pull based approach to integrating a Topic Maps system with a CMS. This approach was inspired by the TMShare protocol that was developed at CEN. This was an Atom based protocol that published a feed of changes that had occurred inside the system. A client could process this feed to get the current state of each item that had changed. Note: this approach didn't say what had changed, just that a given topic has changed and here was the address of its representation. The client could then update its local store to be aligned with the 'server' node.

So, instead of syncing between two topic maps this approach looks to sync the Atom feed from Live Mesh into a topicmap.

The Live Mesh environment consists of an online virtual folder and file hierarchy and optionally corresponding syncronised folders on multiple devices. However, when synced all the 'actions' performed can be found in an Atom feed for each users' Mesh. The news feed for a Mesh can be found at the following URL (note that the base of the URL will change as this is the CTP):


https://user-ctp.windows.net/V0.1/Mesh/News

This feed contains a series of entries. Each entry corresponds to some event that has occurred; such as a file being added or a folder deleted, renamed etc.

Our syncronising application runs as a background process on the users' machine. The process will fetch the feed of events and then update the topicmap accordingly (this topic map could be local or in some online Topic Maps service). In a local TMCore instance I have already set up an ontology consisting of File, Folder, Mesh Space, Concept and Person. The items in Mesh will map to their obvious counterparts in this ontology.

The TMShare protocol provides links to representations of things that have changed. The client is expected to pull the representation and update its local version. Mesh has a more transaction based approach where is lists the actions that have been performed. However, if a client application just sticks to doing changes rather than updating full representations then there is no way for a client to get back in sync if an event is lost or if some events simply are not published (except for an out of bound action). For this integration we consider each event to simply be a notification that a given Mesh entity has been updated / deleted. We then fetch that entity's Atom entry and from that update the topic representation. For most content management integrations we can accept some delay in getting in sync but we would like it to happen.

Drivin the sync process is the News feed. It contains an entry for each event that has occurred. Here is the basic structure of a 'Live Mesh Event Atom Entry':

<entry>
    <id>urn:uuid:2979996d-57a0-e3c7-d7bd-b5f1a2b33bcb</id>
    <title type="text">LiveMesh.LiveFolderAdd</title>
    <published>2009-07-28T12:43:35Z</published>
    <updated>2009-07-28T12:43:35Z</updated>
    <author>
      <name>Graham Moore</name>
      <uri>email-graham_moore@live.com/Profiles</uri>
      <email>graham_moore@live.com</email>
    </author>
    <link rel="self" type="application/atom+xml;type=entry" title="self" href="Mesh/News/T3KY45PHG5AEXAQHVDZ4IC6WKM-NWMXSKNAK7D6HV55WXY2FMZ3ZM" />
    <link rel="edit" type="application/atom+xml;type=entry" title="edit" href="Mesh/News/T3KY45PHG5AEXAQHVDZ4IC6WKM-NWMXSKNAK7D6HV55WXY2FMZ3ZM" />
    <link rel="LiveFX/AuthorProfile" type="application/atom+xml;type=feed" title="LiveFX/AuthorProfile" href="email-graham_moore@live.com/Profiles" />
    <category term="NewsItem" label="NewsItem" scheme="http://user.windows.net/Resource" />
    <content type="application/xml">
      <NewsItemContent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://user.windows.net">
        <CoalesceCount>1</CoalesceCount>
        <Contexts>
          <NewsItemContext>
            <Kind>Scope</Kind>
            <Relationship>LiveFX/MeshObject</Relationship>
            <TargetLink>Mesh/MeshObjects/3XDCEOEAANZUPFD5OV7TLE3IFM</TargetLink>
            <Text>documents41</Text>
            <Type>LiveFX/MeshObject</Type>
          </NewsItemContext>
          <NewsItemContext>
            <Kind>Target</Kind>
            <Relationship>LiveFX/MeshObject</Relationship>
            <TargetLink>Mesh/MeshObjects/3XDCEOEAANZUPFD5OV7TLE3IFM</TargetLink>
            <Text>documents41</Text>
            <Type>LiveFX/MeshObject</Type>
          </NewsItemContext>
        </Contexts>
      </NewsItemContent>
    </content>
  </entry>

The key things that we use from the above Atom entry is the Title element value. This is the unique key for the event type. I would have preferred to see this implemented a little more robustly, either in a custom attribute/element in the entry or as part of the content. I certainly would have liked to see it as a URI rather than just a string.

The following are the list of event types that can occur in the Live Mesh Environment:

LiveMesh.FolderRename - Occurs when a folder is renamed (note there is no event created when a LiveFolder is renamed.)

LiveMesh.FolderAdd - Occurs when a new folder is added.

LiveMesh.MemberAdd - Occurs when a member is added to Folder.

LiveMesh.LiveFolderAdd - Occurs when a new LiveFolder is added. Why the need for the special cases? If the scope was set to the Mesh that would be enough.

LiveMesh.LiveFolderDelete - Occurs when a LiveFolder is deleted. Note: no events are raised for all the sub files and folders that are also removed.

LiveMesh.FileAdd - Occurs when a file is added to a folder.

LiveMesh.FileUpdate - Occurs when a file is updated or renamed.

LiveMesh.FileDelete - Occurs when a file is deleted.

LiveMesh.MemberInvite - Occurs when a member is invited to join a folder.

With the event detected we can then pull information out of the Contexts element. This data structure isn't the cleanest for pulling out the key information but it tells us on which item the event has occurred and in what context (folder). The NewsContext provides links to the items being affected. These items can then be fetched and the state replicated into the topicmap. This includes creating and deleting topics for files and folders, maintaing relationships between files and folders and folders and their parents.

As Live Mesh doesnt raise events for recursive deletes, we fire a pseudo delete event when there is a LiveMesh.LiveFolderDelete event for all descendent files and folders.

All of this processing means we then have a topicmap synced with the state in a given Live Mesh account.

The trade off we see between an event based integration and a pull integration is that the pull integration is more lightweight, robust at dealing with failure, and easier to evolve over time. The value of the integrated event model based approach is that information moves in near real time from the CMS into the Topic Maps system.

So by using the Atom feed of changes to a Live Mesh environment we are able to create and maintain proxy topics for all files and folders. This gives us a baseline on which to build further functionality such as advanced metadata management, classification, search etc.

Now all we need is a nice Silverlight UI to allow users to navigate, query and further classify all their nice Mesh file topics ;)


July 21, 2009

SharePoint Module 3.1 Hotfix 2 now available

A new hotfix package is available for version 3.1 of the TMCore SharePoint Module. This package addresses a number of bugs and performance issues. The full change list can be found below.

Systems Affected

This hotfix should be applied to any installation of the TMCore SharePoint Module 3.1 downloaded before 21st July 2009. If you downloaded your copy of the software from our site on or after this date, the hotfix is included in the package and you do not need to apply it again.

To determine if your system is affected, check the File Version property of the assembly NetworkedPlanet.SharePoint in the GAC (browse to C:\Windows\ASSEMBLY, locate the NetworkedPlanet.SharePoint assembly, right-click and choose Properties. The File Version can be found on the Version tab above Description and Copyright). This hotfix updates the File Version of the NetworkedPlanet.SharePoint assembly to 2.1.2.0 - if the file version shown is greater than or equal to 2.1.2.0, then you do not need to apply this hotfix.

Upgrade Instructions
1. Download the Hotfix2 package.
2. The package is provided in a compressed ZIP file. Unzip the package on a machine in the server farm.
3. Upgrade Enterprise Serivices to Enterprise Services 1.1.0.0 included in the zip file.
4. Upgrade the NPSharePoint.wsp solution. The exact command-line you use will depend on how you want to schedule the upgrade, but will be similar to:
stsadm -o upgradesolution -name NPSharePoint.wsp -filename NPSharePoint.wsp -allowgacdeployment -allowcaspolicies -local
5. Upgrade the NPOfficeServer.wsp solution. Use the following STSADM command:
stsadm -o upgradesolution -name NPOfficeServer.wsp -filename NPOfficeServer.wsp -allowgacdeployment -allowcaspolicies -local
6. Force resource file deployment by using the following STSADM command:
stsadm -o copyappbincontent
7. Restart IIS and Windows SharePoint Services Timer
8. Deactivate and reactivate the NPClassification feature on all content urls that use the feature.

Change Log


  • BUGFIX: RelatedTopicLinkField and RelatedTopicNameField first save fix (values were only saving
    when an item was updated).
    NPClassification feature must be reactivated for this fix to take effect.

  • BUGFIX: Fixed an error in ContentTypeCreator.exe that caused feature generation
    to fail when a SUBCLASS topic type mapping.

  • ENHANCEMENT: This Hotfix now includes the updated Enterprise Services version 1.1.0.0

  • ENHANCEMENT: The npspc.resx resource file has been extended to allow translation for all
    custom properties on NetworkedPlanet SharePoint module Web Parts, custom controls
    and pages.

  • FEATURE: A configurable property has been to XSLT based web parts to enable processing of
    XSLT scripts.

  • FEATURE: XSLT based Web Parts now have a new custom property of Max Retries which allow
    the Site Administrator to set how many times the Web Part should attempt to retrieve
    the Context Topic for the Web Part before showing an error message.

    The One Hop and Two Hop Web Parts allow the error message to be configurable through
    a custom property on the Web Part itself rather than using the default message set
    in the NetworkedPlanet resource file.


  • FEATURE: Added support for setting the site topic map through the Feature.xml file. Add the
    properties shown below to the Properties section of the Feature.xml generated by the
    NPCL Schema Extensions Editor.
    <Properties>
    <Property Key="TopicMap" Value="simpleorg" />
    <Property Key="PropagateTopicMap" Value="false" />
    </Properties>
    The second property, PropagateTopicMap is optional. When it is not present PropagateTopicMap
    is set to true and therefore all sub-sites are also set to the specified topic map.

  • BUGFIX: Changed stsadm remapurls command so that the content type mappings are also updated
    based on the rules set out in NPUrlMap.xml config file.

  • BUGFIX: The Topic Type Mapping page on a content type and the Content Type To Topic Types
    Mapping Page in site settings now show an error and disable use of the page when
    the occurrence type for content type mapping is not found. Message is to import the
    XTM file shipped with the SharePoint Module that contains the types needed.

  • BUGFIX: Fixed a bug that was caused by trying to add a site column of type Related Topic Name
    field or Related Topic Link field before any Related Topics fields had been added to
    the site's fields collection.

  • BUGFIX: The interface for adding a new Related Topics field to a content type has been updated
    so that it now allows the creation of Related Topics fields for associations whose
    schema consists of a single role type that is allowed twice (i.e. with a single association
    role constraint with minimum and maximum cardinality set to 2).

  • BUGFIX: Fixed a rendering error of related topics fields when shown with a SharePoint column description. Description now shows on new line.

  • BUGFIX: Replaced missing images in the NPCL Schema Editor Extensions documentation.

  • BUGFIX: Added paths for Windows Server 2008 in NPCL Schema Editor Extensions documentation

  • BUGFIX: Fixed an bug in the ContentTypeCreator command that caused an exception when generating a
    feature from a schema that required the use of a Topic Type Selector field.

  • BUGFIX: TopicID property was throwing an exception on sealed classes when language was not EN.

  • BUGFIX: Paged Faceted Search Results Web Part was showing paging information but no result set.
    Paging information is now filtered so that if empty records are returned from Enterprise
    Services they do not affect the paging labels.

  • BUGFIX: Documentation updates for the Administrators, Site Developers and Web Parts Guides.

  • BUGFIX: Console output of loggers were showing the full trace category rather than the specific
    trace category name.

July 2, 2009

Sharepoint Module: Adding Related Topic Name fields programmatically

Related Topic Name and Related Topic Link Fields are custom fields which you may want to add to the site columns collection programmatically. However SharePoint sometimes returns exceptions when trying to use SPFieldCollection.CreateNewField(), the code below shows how to use an feature receiver to create the custom fields programmatically and add them to the site columns.

public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
try
{
var site = properties.Feature.Parent as SPSite;
if (site != null)
{
SPWeb web = site.RootWeb;

const string typeName = "RelatedTopicName"; //important - the type name must be correct

const string displayName = "Related Themes";
const string internalName = "RTN_Related_Themes_001";

const string relatedTopicFieldSource = "37d6a246-0cd3-449c-8c06-6ccd75bc1c8c";
const string showDrafts = "true";
const string showVersionInfo = "false";

string customisation = String.Format(@"SourceFieldId{0}ShowDrafts{1}ShowVersionInformation{2}", relatedTopicFieldSource, showDrafts, showVersionInfo);

string fldxml = String.Format(@"{3}", typeName, displayName, internalName, customisation);

web.Fields.AddFieldAsXml(fldxml);
}
}
catch (Exception e)
{
//Log the error
throw;
}
}

About July 2009

This page contains all entries posted to NetworkedPlanet On Topic in July 2009. They are listed from newest to oldest.

June 2009 is the previous archive.

August 2009 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Subscribe to this blog's feed