[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Tue Dec 14 18:58:20 UTC 2004


kawas
Tue Dec 14 13:58:19 EST 2004
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv9852

Modified Files:
	Central.pm CommonSubs.pm CrossReference.pm OntologyServer.pm 
Log Message:
hopefully fixed the cdata bug - eddie

moby-live/Perl/MOBY Central.pm,1.142,1.143 CommonSubs.pm,1.54,1.55 CrossReference.pm,1.3,1.4 OntologyServer.pm,1.46,1.47
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2004/11/18 17:41:14	1.142
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2004/12/14 18:58:19	1.143
@@ -392,7 +392,7 @@
 	my $obj    = $Object->nodeName;
 	return undef unless ( $obj eq 'registerObjectClass' );
 	my $term    = &_nodeTextContent( $Object, "objectType" );
-	my $desc    = &_nodeTextContent( $Object, "Description" );
+	my $desc    = &_nodeCDATAContent( $Object, "Description" );
 	my $authURI = &_nodeTextContent( $Object, "authURI" );
 	my $email   = &_nodeTextContent( $Object, "contactEmail" );
 	my $clobber = &_nodeTextContent( $Object, "Clobber" );
@@ -696,7 +696,7 @@
 	my $type  = &_nodeTextContent( $Object, "serviceType" );
 	my $email = &_nodeTextContent( $Object, "contactEmail" );
 	my $auth  = &_nodeTextContent( $Object, "authURI" );
-	my $desc  = &_nodeTextContent( $Object, "Description" );
+	my $desc  = &_nodeCDATAContent( $Object, "Description" );
 	my %relationships;
 	my $x                = $doc->getElementsByTagName( "Relationship" );
 	my $no_relationships = $x->size();
@@ -881,7 +881,7 @@
 	return undef unless ( $obj eq 'registerNamespace' );
 	my $type    = &_nodeTextContent( $Object, "namespaceType" );
 	my $authURI = &_nodeTextContent( $Object, "authURI" );
-	my $desc    = &_nodeTextContent( $Object, "Description" );
+	my $desc    = &_nodeCDATAContent( $Object, "Description" );
 	my $contact = &_nodeTextContent( $Object, "contactEmail" );
 	return ( $type, $authURI, $desc, $contact );
 }
@@ -1593,7 +1593,7 @@
 	  &_nodeTextContent( $Object, "authoritativeService" );
 	my $URL          = &_nodeTextContent( $Object, "URL" );
 	my $signatureURL = &_nodeTextContent( $Object, "signatureURL" );
-	my $desc         = &_nodeTextContent( $Object, "Description" );
+	my $desc         = &_nodeCDATAContent( $Object, "Description" );
 	my $INPUTS  = &_nodeRawContent( $Object, "Input" );     # returns array ref
 	my $OUTPUTS = &_nodeRawContent( $Object, "Output" );    # returns array ref
 	my $SECONDARIES =
@@ -2388,6 +2388,9 @@
 		my $wsdl =
 		  &_getServiceWSDL( $SI, $InputXML, $OutputXML, $SecondaryXML );
 		if ( $wsdl ) {
+			if ($wsdl =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+				$wsdl = $1;
+			}
 			$wsdls .= "<Service><![CDATA[$wsdl]]></Service>\n";
 		}
 
@@ -2519,6 +2522,9 @@
 	my %types = %{ $OS->retrieveAllServiceTypes() };
 	my $types = "<serviceTypes>\n";
 	while ( my ( $serv, $desc ) = each %types ) {
+		if ($desc =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+			$desc = $1;
+		}
 		$types .=
 "<serviceType name='$serv'>\n<Description><![CDATA[$desc]]></Description>\n</serviceType>\n";
 	}
@@ -2558,6 +2564,9 @@
 	while ( my ( $name, $authdesc ) = each %types ) {
 		my $auth = $authdesc->[0];
 		my $desc = $authdesc->[1];
+		if ($desc =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+			$desc = $1;
+		}
 		$types .=
 "<relationshipType relationship='$name' authority='$auth'>\n<Description><![CDATA[$desc]]></Description>\n</relationshipType>\n";
 	}
@@ -2589,6 +2598,9 @@
 	my %types = %{ $OS->retrieveAllObjectTypes() };
 	my $obj   = "<objectNames>\n";
 	while ( my ( $name, $desc ) = each %types ) {
+		if ($desc =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+			$desc = $1;
+		}
 		$obj .=
 "<Object name='$name'>\n<Description><![CDATA[$desc]]></Description>\n</Object>\n";
 	}
@@ -2639,6 +2651,9 @@
 	  ; # will return undef if this term does not exist, and does not look like an LSID
 	return "<retrieveObjectDefinition/>" unless $def;
 	my %def = %{ $OS->retrieveObject( node => $term ) };
+	if ($def{description} =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+		$def{description}= $1;
+	}
 	my $response;
 	$response = "<retrieveObjectDefinition>
 	<objectType>$def{objectType}</objectType>
@@ -2685,6 +2700,9 @@
 	my %types = %{ $OS->retrieveAllNamespaceTypes() };
 	my $ns    = "<Namespaces>\n";
 	while ( my ( $namespace, $desc ) = each %types ) {
+		if ($desc =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+			$desc = $1;
+		}
 		$ns .=
 "<Namespace name='$namespace'>\n<Description><![CDATA[$desc]]></Description>\n</Namespace>\n";
 	}
@@ -3002,6 +3020,9 @@
 		$response .= "<Category>$cat</Category>\n";
 		$response .= "<serviceType>$type</serviceType>\n";
 		$response .= "<outputObject>$objectOUT</outputObject>\n";
+		if ($desc =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+			$desc = $1;
+		}
 		$response .= "<Description><![CDATA[$desc]]></Description>\n";
 		$response .= "</Service>\n";
 		if ( $max_return ) { --$max_return; last unless $max_return }
@@ -3035,6 +3056,9 @@
 	my $serviceName = $SI->servicename;
 	my $AuthURI     = $SI->authority_uri;
 	my $desc        = $SI->description;
+	if ($desc =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+		$desc = $1;
+	}
 	my $URL         = $SI->url;
 	my $IN          = "NOT_YET_DEFINED_INPUTS";
 	my $OUT         = "NOT_YET_DEFINED_OUTPUTS";
@@ -3075,6 +3099,9 @@
 	my $sth = $dbh->prepare( $sth{get_server_parameters} );
 	$sth->execute( $id );
 	my ( $Object, $sprintf, $in ) = $sth->fetchrow_array();
+	if ($sprintf=~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+		$sprintf = $1;
+	}
 	return "<GETstring><![CDATA[$sprintf]]></GETstring>";
 }
 
@@ -3197,7 +3224,30 @@
 	}
 	return $content;
 }
+sub _nodeCDATAContent{
 
+	# will get text of **all** child $node from the given $DOM
+	# regardless of their depth!!
+	my ( $DOM, $node ) = @_;
+	$debug && &_LOG( "_nodeTextContent received DOM:  ",
+					 $DOM->toString, "\nsearching for node $node\n" );
+	my $x = $DOM->getElementsByTagName( $node );
+	return undef unless $x->get_node( 1 );
+	my @child = $x->get_node( 1 )->childNodes;
+	my $content;
+	foreach ( @child ) {
+		$debug
+		  && &_LOG( $_->nodeType, "\t", $_->toString, "\n" );
+
+		#next unless $_->nodeType == TEXT_NODE;
+		if ($_->toString =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+			$content .= $1;
+		} else {
+			$content .= $_->toString;
+		}
+	}
+	return $content;
+}
 #Eddie - converted
 sub _nodeRawContent {
 
@@ -3341,6 +3391,9 @@
 			 $authoritative,    $email,        $signatureURL
 		  )
 		  = $sth->fetchrow_array;
+		if ($desc =~ /<!\[CDATA\[((?>[^\]]+))\]\]>/) {
+			$desc = $1;
+		}
 
 #print "\n\nAFTER EXECUTE $category, $servicename, $service_type_uri, $authority_id, $desc, $authoritative\n\n";
 		$signatureURL ||= "";

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm	2004/11/18 17:41:14	1.54
+++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm	2004/12/14 18:58:19	1.55
@@ -31,7 +31,7 @@
         # [SIMPLE, $queryID, $simple]
         # the first element is an exported constant SIMPLE, COLLECTION, SECONDARY
         # the second element is the queryID (required for enumerating the responses)
-        # the third element is the XML::DOM for the Simple, Collection, or Parameter block    
+        # the third element is the XML::LibXML for the Simple, Collection, or Parameter block    
     my (@inputs)= genericServiceInputParser($data); 
         # or fail properly with an empty response
     return SOAP::Data->type('base64' => responseHeader("my.authURI.com") . responseFooter()) unless (scalar(@inputs));
@@ -258,9 +258,9 @@
                 1. COLLECTION|SIMPLE (i.e. constants 1, 2)
                 2. queryID
                 3. $data - the data takes several forms
-                         a. $article XML::DOM node for Simples
+                         a. $article XML::LibXML node for Simples
                             <mobyData...>...</mobyData>
-                         b. \@article XML:DOM nodes for Collections
+                         b. \@article XML:LibXML nodes for Collections
 
             for example, the input message:
             
@@ -303,7 +303,7 @@
 	my ( $message ) = @_;    # get the incoming MOBY query XML
 	my @inputs;              # set empty response
 	my @queries =
-	  getInputs( $message );   # returns XML::DOM nodes <mobyData>...</mobyData>
+	  getInputs( $message );   # returns XML::LibXML nodes <mobyData>...</mobyData>
 	foreach my $query ( @queries ) {
 		my $queryID =
 		  getInputID( $query );    # get the queryID attribute of the mobyData
@@ -331,7 +331,7 @@
  name     : DO NOT USE!!
  function : to take a MOBY message and break the objects out of it.  This is identical
             to the genericServiceInputParser method above, except that it returns the data as
-            Objects rather than XML::DOM nodes.  This is an improvement!
+            Objects rather than XML::LibXML nodes.  This is an improvement!
  usage    : my @inputs = serviceInputParser($MOBY_mssage));
  args     : $message - this is the SOAP payload; i.e. the XML document containing the MOBY message
  returns  : @inputs - the structure of @inputs is a list of listrefs.
@@ -346,7 +346,7 @@
 	my ( $message ) = @_;    # get the incoming MOBY query XML
 	my @inputs;              # set empty response
 	my @queries =
-	  getInputs( $message );   # returns XML::DOM nodes <mobyData>...</mobyData>
+	  getInputs( $message );   # returns XML::LibXML nodes <mobyData>...</mobyData>
 
 # mark, this doesn't work for complex services.  We need to allow more than one input per invocation
 	foreach my $query ( @queries ) {
@@ -402,7 +402,7 @@
                              [SECONDARY, $DOM_cutoff]  # $DOM_cutoff= <Parameter> block
                            ]
 
-            Please see the XML::DOM pod documentation for information about how
+            Please see the XML::LibXML pod documentation for information about how
             to parse XML DOM objects.
 
 
@@ -431,7 +431,7 @@
                              [SECONDARY, $DOM_cutoff]  # $DOM_cutoff = <Parameter> Block
                            ]
 
-            Please see the XML::DOM pod documentation for information about how
+            Please see the XML::LibXML pod documentation for information about how
             to parse XML DOM objects.
 
 
@@ -441,7 +441,7 @@
 	my ( $message ) = @_;    # get the incoming MOBY query XML
 	my @inputs;              # set empty response
 	my @queries =
-	  getInputs( $message );   # returns XML::DOM nodes <mobyData>...</mobyData>
+	  getInputs( $message );   # returns XML::LibXML nodes <mobyData>...</mobyData>
 	my %input_parameters;      # $input_parameters{$queryID} = [
 	foreach my $query ( @queries ) {
 		my $queryID =
@@ -470,7 +470,7 @@
  name     : getArticles
  function : get the Simple/Collection/Parameter articles for a single mobyData
  usage    : @articles = getArticles($XML)
- args     : raw XML or XML::DOM of a queryInput, mobyData, or queryResponse block (e.g. from getInputs)
+ args     : raw XML or XML::LibXML of a queryInput, mobyData, or queryResponse block (e.g. from getInputs)
  returns  : a list of listrefs; each listref is one component of the queryInput or mobyData block
             a single block may consist of one or more named or unnamed
             simple, collection, or parameter articles.
@@ -508,7 +508,7 @@
 
 sub getArticles {
 	my ( $moby ) = @_;
-	unless ( ref( $moby ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $moby ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $moby );
 		$moby = $doc->getDocumentElement();
@@ -548,8 +548,8 @@
  usage    : my @ids = getSimpleArticleIDs("NCBI_gi", \@SimpleArticles);
             my @ids = getSimpleArticleIDs(\@SimpleArticles);
  args     : $Namespace  - (optional) a namespace stringfrom the MOBY namespace ontology, or undef if you don't care
-            \@Simples   - (required) a listref of Simple XML::DOM nodes
-                          i.e. the XML::DOM representing an XML structure like this:
+            \@Simples   - (required) a listref of Simple XML::LibXML nodes
+                          i.e. the XML::LibXML representing an XML structure like this:
                               <Simple>
                                   <Object namespace="NCBI_gi" id="163483"/>
                               </Simple>
@@ -643,8 +643,8 @@
  name     : getSimpleArticleNamespaceURI
  function : to get the namespace of a simple article
  usage    : my $ns = getSimpleArticleNamespaceURI($SimpleArticle);
- args     : $Simple   - (required) a single XML::DOM node representing a Simple Article
-                          i.e. the XML::DOM representing an XML structure like this:
+ args     : $Simple   - (required) a single XML::LibXML node representing a Simple Article
+                          i.e. the XML::LibXML representing an XML structure like this:
                               <Simple>
                                   <Object namespace="NCBI_gi" id="163483"/>
                               </Simple>
@@ -700,7 +700,7 @@
 	my ( $data, $articleName, $qID ) = @_;    # articleName optional
 	$qID = &_getQueryID( $qID )
 	  if ref( $qID ) =~
-	  /XML::DOM/;    # in case they send the DOM instead of the ID
+	  /XML::LibXML/;    # in case they send the DOM instead of the ID
 	$data        ||= '';    # initialize to avoid uninit value errors
 	$qID         ||= "";
 	$articleName ||= "";
@@ -726,7 +726,7 @@
 #Eddie - converted
 sub _getQueryID {
 	my ( $query ) = @_;
-	unless ( ref( $query ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $query ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $query );
 		$query = $doc->getDocumentElement();
@@ -849,10 +849,10 @@
 =head2 getInputs
 
  name     : getInputs
- function : get the mobyData block(s) as XML::DOM nodes
+ function : get the mobyData block(s) as XML::LibXML nodes
  usage    : @queryInputs = getInputArticles($XML)
- args     : the raw XML of a <MOBY> query, or an XML::DOM document
- returns  : a list of XML::DOM::Node's, each is a queryInput or mobyData block.
+ args     : the raw XML of a <MOBY> query, or an XML::LibXML document
+ returns  : a list of XML::LibXML::Node's, each is a queryInput or mobyData block.
  Note     : Remember that these blocks are enumerated!  This is what you
             pass as the third argument to the simpleResponse or collectionResponse
             subroutine to associate the numbered input to the numbered response
@@ -863,7 +863,7 @@
 sub getInputs {
 	my ( $XML ) = @_;
 	my $moby;
-	unless ( ref( $XML ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $XML ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $XML );
 		$moby = $doc->getDocumentElement();
@@ -887,7 +887,7 @@
  name     : getInputID
  function : get the value of the queryID element
  usage    : @queryInputs = getInputID($XML)
- args     : the raw XML or XML::DOM of a queryInput or mobyData block (e.g. from getInputs)
+ args     : the raw XML or XML::LibXML of a queryInput or mobyData block (e.g. from getInputs)
  returns  : integer, or ''
  Note     : Inputs and Responses are coordinately enumerated!
             The integer you get here is what you
@@ -898,7 +898,7 @@
 
 sub getInputID {
 	my ( $XML ) = @_;
-	unless ( ref( $XML ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $XML ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $XML );
 		$XML = $doc->getDocumentElement();
@@ -918,7 +918,7 @@
             or queryResponse node, rethrning them as SimpleArticle,
             SecondaryArticle, or ServiceInstance objects
  usage    : @articles = getArticles($XML)
- args     : raw XML or XML::DOM of a moby:mobyData block
+ args     : raw XML or XML::LibXML of a moby:mobyData block
  returns  :
 
 =cut
@@ -926,7 +926,7 @@
 #Eddie - converted
 sub getArticlesAsObjects {
 	my ( $moby ) = @_;
-	unless ( ref( $moby ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $moby ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $moby );
 		$moby = $doc->getDocumentElement();
@@ -964,14 +964,14 @@
  name     : getCollectedSimples
  function : get the Simple articles collected in a moby:Collection block
  usage    : @Simples = getCollectedSimples($XML)
- args     : raw XML or XML::DOM of a moby:Collection block
- returns  : a list of XML::DOM nodes, each of which is a moby:Simple block
+ args     : raw XML or XML::LibXML of a moby:Collection block
+ returns  : a list of XML::LibXML nodes, each of which is a moby:Simple block
 
 =cut
 
 sub getCollectedSimples {
 	my ( $moby ) = @_;
-	unless ( ref( $moby ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $moby ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $moby );
 		$moby = $doc->getDocumentElement();
@@ -997,7 +997,7 @@
  args     : the raw XML of a moby:MOBY query
  returns  : a list of listrefs, each listref is the input to a single query.
             Remember that the input to a single query may be one or more Simple
-            and/or Collection articles.  These are provided as XML::DOM nodes.
+            and/or Collection articles.  These are provided as XML::LibXML nodes.
             
             i.e.:  @queries = ([$SIMPLE_DOM_NODE], [$SIMPLE_DOM_NODE2])
             or  :  @queries = ([$COLLECTION_DOM_NODE], [$COLLECTION_DOM_NODE2])
@@ -1024,7 +1024,7 @@
 #Eddie - converted
 sub getInputArticles {
 	my ( $moby ) = @_;
-	unless ( ref( $moby ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $moby ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $moby );
 		$moby = $doc->getDocumentElement();
@@ -1054,7 +1054,7 @@
  name     : isSimpleArticle
  function : tests XML (text) or an XML DOM node to see if it represents a Simple article
  usage    : if (isSimpleArticle($node)){do something to it}
- input    : an XML::DOM node, an XML::DOM::Document or straight XML
+ input    : an XML::LibXML node, an XML::LibXML::Document or straight XML
  returns  : boolean
 
 =cut
@@ -1062,7 +1062,7 @@
 #Eddie - converted
 sub isSimpleArticle {
 	my ( $DOM ) = @_;
-	unless ( ref( $DOM ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $DOM ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc;
 		eval { $doc = $parser->parse_string( $DOM ); };
@@ -1079,7 +1079,7 @@
  name     : isCollectionArticle
  function : tests XML (text) or an XML DOM node to see if it represents a Collection article
  usage    : if (isCollectionArticle($node)){do something to it}
- input    : an XML::DOM node, an XML::DOM::Document or straight XML
+ input    : an XML::LibXML node, an XML::LibXML::Document or straight XML
  returns  : boolean
 
 =cut
@@ -1087,7 +1087,7 @@
 #Eddie - converted
 sub isCollectionArticle {
 	my ( $DOM ) = @_;
-	unless ( ref( $DOM ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $DOM ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc;
 		eval { $doc = $parser->parse_string( $DOM ); };
@@ -1104,7 +1104,7 @@
  name     : isSecondaryArticle
  function : tests XML (text) or an XML DOM node to see if it represents a Secondary article
  usage    : if (isSecondaryArticle($node)){do something to it}
- input    : an XML::DOM node, an XML::DOM::Document or straight XML
+ input    : an XML::LibXML node, an XML::LibXML::Document or straight XML
  returns  : boolean
 
 =cut
@@ -1112,7 +1112,7 @@
 #Eddie - converted
 sub isSecondaryArticle {
 	my ( $DOM ) = @_;
-	unless ( ref( $DOM ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $DOM ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc;
 		eval { $doc = $parser->parse( _string $DOM); };
@@ -1138,7 +1138,7 @@
 sub extractRawContent {
 	my ( $article ) = @_;
 	return "" unless $article;
-	return "" unless ref( $article ) =~ /XML::DOM/;
+	return "" unless ref( $article ) =~ /XML::LibXML/;
 	my $response;
 	foreach ( $article->childNodes ) {
 		$response .= $_->toString;
@@ -1154,7 +1154,7 @@
             or get the value of a Parameter element.
  usage    : @strings = getNodeContentWithArticle($node, $tagname, $articleName)
  args     : (in order)
-            $node        - an XML::DOM node, or straight XML.  It may even
+            $node        - an XML::LibXML node, or straight XML.  It may even
                            be the entire mobyData block.
             $tagname     - the tagname (effectively from the Object type ontology),
                            or "Parameter" if you are trying to get secondaries
@@ -1243,7 +1243,7 @@
 # carriage returns, as these might be meaningful!
 	my ( $node, $element, $articleName ) = @_;
 	my @contents;
-	return () unless ref( $node ) =~ /XML::DOM/;
+	return () unless ref( $node ) =~ /XML::LibXML/;
 	return () unless $element;
 	return () unless $articleName;
 	my $nodes = $node->getElementsByTagName( $element );
@@ -1355,9 +1355,9 @@
  function : get the DOM nodes corresponding to individual
             Simple or Collection outputs from a MOBY Response
  usage    : ($collections, $simples) = getResponseArticles($node)
- args     : $node - either raw XML or an XML::DOM::Document to be searched            
- returns  : an array-ref of Collection article XML::DOM::Node's
-            an array-ref of Simple article XML::DOM::Node's
+ args     : $node - either raw XML or an XML::LibXML::Document to be searched            
+ returns  : an array-ref of Collection article XML::LibXML::Node's
+            an array-ref of Simple article XML::LibXML::Node's
 
 =cut
 
@@ -1369,7 +1369,7 @@
 	my ( $result ) = @_;
 	return ( [], [] ) unless $result;
 	my $moby;
-	unless ( ref( $result ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $result ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $result );
 		$moby = $doc->getDocumentElement();
@@ -1426,7 +1426,7 @@
  name     : getServiceNotes
  function : to get the content of the Service Notes block of the MOBY message
  usage    : getServiceNotes($message)
- args     : $message is either the XML::DOM of the MOBY message, or plain XML
+ args     : $message is either the XML::LibXML of the MOBY message, or plain XML
  returns  : String content of the ServiceNotes block of the MOBY Message
 
 =cut
@@ -1436,7 +1436,7 @@
 	my ( $result ) = @_;
 	return ( "" ) unless $result;
 	my $moby;
-	unless ( ref( $result ) =~ /XML\:\:DOM/ ) {
+	unless ( ref( $result ) =~ /XML\:\:LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $result );
 		$moby = $doc->getDocumentElement();
@@ -1470,7 +1470,7 @@
  usage    : @xrefs = getCrossReferences($XML)
  args     : $XML is either a SIMPLE article (<Simple>...</Simple>)
             or an object (the payload of a Simple article), and
-            may be either raw XML or an XML::DOM node.
+            may be either raw XML or an XML::LibXML node.
  returns  : an array of MOBY::CrossReference objects
  example  : 
 
@@ -1492,7 +1492,7 @@
 #Eddie - converted
 sub getCrossReferences {
 	my ( $XML ) = @_;
-	unless ( ref( $XML ) =~ /XML::DOM/ ) {
+	unless ( ref( $XML ) =~ /XML::LibXML/ ) {
 		my $parser = XML::LibXML->new();
 		my $doc    = $parser->parse_string( $XML );
 		$XML = $doc->getDocumentElement();

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/CrossReference.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47




More information about the MOBY-guts mailing list