From 1b49016390b105f5090cf5f4d8bb69631cbdbf5a Mon Sep 17 00:00:00 2001
From: jprocter <jprocter@compbio.dundee.ac.uk>
Date: Thu, 28 Jun 2007 20:16:43 +0000
Subject: [PATCH] debug message for default mapping

git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@422 be28352e-c001-0410-b1a7-c7978e42abec
---
 src/uk/ac/vamsas/objects/utils/Range.java |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/uk/ac/vamsas/objects/utils/Range.java b/src/uk/ac/vamsas/objects/utils/Range.java
index f66df31..e9c2eff 100644
--- a/src/uk/ac/vamsas/objects/utils/Range.java
+++ b/src/uk/ac/vamsas/objects/utils/Range.java
@@ -15,6 +15,7 @@ import uk.ac.vamsas.objects.core.Seg;
  *
  */
 public class Range {
+  static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getFactory().getLog(Range.class);
 
   /**
    * get start<end range of segment, adjusting for inclusivity flag and
@@ -236,6 +237,15 @@ public class Range {
    */
   public static MapList parsemapType(MapType map)
   {
+    if (!map.getLocal().hasUnit() || map.getMapped().hasUnit())
+    {
+      if (log.isDebugEnabled())
+      { 
+        log.debug(
+                "using default mapping length of 1:1 for map "
+              +(map.isRegistered() ? map.getVorbaId().toString() : ("<no Id registered> "+map.toString())));
+      }
+    }
     return parsemapType(map, 1, 1); 
   }
 
-- 
1.7.10.2