Index: /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
===================================================================
--- /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 16318)
+++ /trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 16319)
@@ -1,5 +1,5 @@
 # Copyright (c) 2006  Paul Price, Joshua Hoblitt
 #
-# $Id: Config.pm,v 1.73 2008-01-23 23:33:25 eugene Exp $
+# $Id: Config.pm,v 1.74 2008-02-06 01:55:43 price Exp $
 
 package PS::IPP::Config;
@@ -784,37 +784,35 @@
 }   
 
-# Return hash of tessellations, from TESSELLATIONS within the camera configuration
-sub tessellations
-{
-    my $self = shift;		# Configuration object
-
-    unless (defined $self) {
-	carp "Programming error";
-	exit($PS_EXIT_PROG_ERROR);
-    }
-
-    my $camera = $self->{camera}; # Camera configuration
-    unless (defined $camera) {
-	carp "Camera has not yet been defined.\n";
-	exit($PS_EXIT_PROG_ERROR);
-    }
-
-    my $tessellations = metadataLookupMD($camera, 'TESSELLATIONS'); # Tessellations
+# Return catdir for tessellation, from TESSELLATIONS within the site configuration
+sub tessellation_catdir
+{
+    my $self = shift;		# Configuration object
+    my $tess_id = shift;	# Tessellation identifier
+
+    unless (defined $self and defined $self->_ipprc and defined $tess_id) {
+	carp "Programming error";
+	exit($PS_EXIT_PROG_ERROR);
+    }
+
+    my $tessellations = metadataLookupMD($self->_ipprc, 'TESSELLATIONS'); # Tessellations
     unless (defined $tessellations) {
-	carp "Can't find TESSELLATIONS in camera configuration.\n";
-	exit($PS_EXIT_CONFIG_ERROR);
-    }
-
-    my %tessellations;		# Tessellations hash to return
-    foreach my $tess ( @$tessellations ) {
-	unless ($tess->{type} eq "STR") {
-	    carp "Type for " . $tess->{name} . " within TESSELLATIONS in camera config is not STR.\n";
-	    next;
-	}
-
-	$tessellations{$tess->{name}} = $tess->{value};
-    }
-
-    return \%tessellations;
+	carp "Can't find TESSELLATIONS in site configuration.\n";
+	exit($PS_EXIT_CONFIG_ERROR);
+    }
+
+    my $catdir = metadataLookupStr($tessellations, $tess_id);
+    unless (defined $catdir) {
+	carp "Can't find tessellation identifier $tess_id in TESSELLATIONS in site configuration.\n";
+	exit($PS_EXIT_CONFIG_ERROR);
+    }
+
+    ### Because DVO doesn't use psModules, it doesn't understand Nebulous --- check
+    my $scheme = file_scheme($catdir); # The scheme, e.g., file, path, neb
+    if (defined $scheme and lc($scheme) eq 'neb') {
+	carp "Tessellation $tess_id refers to a Nebulous path: $catdir\n";
+	exit($PS_EXIT_CONFIG_ERROR);
+    }
+
+    return $catdir
 }
 
