Changeset 12624 for trunk/gsdl


Ignore:
Timestamp:
2006-08-31T13:10:34+12:00 (18 years ago)
Author:
mdewsnip
Message:

Added an extra argument to print_xml_usage for specifying whether to display just the top-level information (name, description, abstract, etc.) or whether to display everything (top-level information, plus arguments, super plugins/classifiers, etc.)

Location:
trunk/gsdl/perllib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/classify/BasClas.pm

    r12546 r12624  
    112112    my $self = shift(@_);
    113113    my $header = shift(@_);
     114    my $high_level_information_only = shift(@_);
    114115   
    115116    # XML output is always in UTF-8
     
    119120    &PrintUsage::print_xml_header("classify");
    120121    }
    121     $self->print_xml();
     122    $self->print_xml($high_level_information_only);
    122123}
    123124
     
    126127{
    127128    my $self = shift(@_);
     129    my $high_level_information_only = shift(@_);
    128130
    129131    my $optionlistref = $self->{'option_list'};
     
    140142    &gsprintf(STDERR, "  <Abstract>$classifieroptions->{'abstract'}</Abstract>\n");
    141143    &gsprintf(STDERR, "  <Inherits>$classifieroptions->{'inherits'}</Inherits>\n");
    142     &gsprintf(STDERR, "  <Arguments>\n");
    143     if (defined($classifieroptions->{'args'})) {
    144     &PrintUsage::print_options_xml($classifieroptions->{'args'});
    145     }
    146     &gsprintf(STDERR, "  </Arguments>\n");
    147 
    148     # Recurse up the classifier hierarchy
    149     $self->print_xml();
    150 
     144    unless (defined($high_level_information_only)) {
     145    &gsprintf(STDERR, "  <Arguments>\n");
     146    if (defined($classifieroptions->{'args'})) {
     147        &PrintUsage::print_options_xml($classifieroptions->{'args'});
     148    }
     149    &gsprintf(STDERR, "  </Arguments>\n");
     150
     151    # Recurse up the classifier hierarchy
     152    $self->print_xml();
     153    }
    151154    &gsprintf(STDERR, "</ClassInfo>\n");
    152155}
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r12546 r12624  
    238238    my $self = shift(@_);
    239239    my $header = shift(@_);
     240    my $high_level_information_only = shift(@_);
    240241   
    241242    # XML output is always in UTF-8
     
    245246    &PrintUsage::print_xml_header("plugin");
    246247    }
    247     $self->print_xml();
     248    $self->print_xml($high_level_information_only);
    248249}
    249250
     
    252253{
    253254    my $self = shift(@_);
     255    my $high_level_information_only = shift(@_);
    254256
    255257    my $optionlistref = $self->{'option_list'};
     
    263265    $desc =~ s/</&amp;lt;/g; # doubly escaped
    264266    $desc =~ s/>/&amp;gt;/g;
    265    
    266267    gsprintf(STDERR, "  <Desc>$desc</Desc>\n");
    267268    gsprintf(STDERR, "  <Abstract>$pluginoptions->{'abstract'}</Abstract>\n");
    268269    gsprintf(STDERR, "  <Inherits>$pluginoptions->{'inherits'}</Inherits>\n");
    269270    gsprintf(STDERR, "  <Explodes>" . ($pluginoptions->{'explodes'} || "no") . "</Explodes>\n");
    270     gsprintf(STDERR, "  <Arguments>\n");
    271     if (defined($pluginoptions->{'args'})) {
    272     &PrintUsage::print_options_xml($pluginoptions->{'args'});
    273     }
    274     gsprintf(STDERR, "  </Arguments>\n");
    275     # Recurse up the plugin hierarchy
    276     $self->print_xml();
     271    unless (defined($high_level_information_only)) {
     272    gsprintf(STDERR, "  <Arguments>\n");
     273    if (defined($pluginoptions->{'args'})) {
     274        &PrintUsage::print_options_xml($pluginoptions->{'args'});
     275    }
     276    gsprintf(STDERR, "  </Arguments>\n");
     277
     278    # Recurse up the plugin hierarchy
     279    $self->print_xml();
     280    }
    277281    gsprintf(STDERR, "</PlugInfo>\n");
    278282}
Note: See TracChangeset for help on using the changeset viewer.