Changeset 12628


Ignore:
Timestamp:
2006-08-31T14:03:55+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/downloaders/BasDownload.pm

    r12546 r12628  
    9999    my $self = shift(@_);
    100100    my $header = shift(@_);
     101    my $high_level_information_only = shift(@_);
    101102   
    102103    # XML output is always in UTF-8
     
    106107    &PrintUsage::print_xml_header("download");
    107108    }
    108     $self->print_xml();
     109    $self->print_xml($high_level_information_only);
    109110}
    110111
     
    113114{
    114115    my $self = shift(@_);
     116    my $high_level_information_only = shift(@_);
     117
    115118    my $optionlistref = $self->{'option_list'};
    116119    my @optionlist = @$optionlistref;
     
    126129    gsprintf(STDERR, "  <Abstract>$downloadoptions->{'abstract'}</Abstract>\n");
    127130    gsprintf(STDERR, "  <Inherits>$downloadoptions->{'inherits'}</Inherits>\n");
    128     gsprintf(STDERR, "  <Arguments>\n");
    129     if (defined($downloadoptions->{'args'})) {
    130     &PrintUsage::print_options_xml($downloadoptions->{'args'});
    131     }
    132     gsprintf(STDERR, "  </Arguments>\n");
    133     # Recurse up the download hierarchy
    134     $self->print_xml();
     131    unless (defined($high_level_information_only)) {
     132    gsprintf(STDERR, "  <Arguments>\n");
     133    if (defined($downloadoptions->{'args'})) {
     134        &PrintUsage::print_options_xml($downloadoptions->{'args'});
     135    }
     136    gsprintf(STDERR, "  </Arguments>\n");
     137
     138    # Recurse up the download hierarchy
     139    $self->print_xml();
     140    }
    135141    gsprintf(STDERR, "</DownloadInfo>\n");
    136142}
  • trunk/gsdl/perllib/plugouts/BasPlugout.pm

    r12618 r12628  
    140140    my $self = shift(@_);
    141141    my $header = shift(@_);
     142    my $high_level_information_only = shift(@_);
    142143   
    143144    # XML output is always in UTF-8
     
    147148    &PrintUsage::print_xml_header("plugout");
    148149    }
    149     $self->print_xml();
     150    $self->print_xml($high_level_information_only);
    150151}
    151152
     
    154155{
    155156    my $self = shift(@_);
     157    my $high_level_information_only = shift(@_);
     158
    156159    my $optionlistref = $self->{'option_list'};
    157160    my @optionlist = @$optionlistref;
     
    167170    gsprintf(STDERR, "  <Abstract>$plugoutoptions->{'abstract'}</Abstract>\n");
    168171    gsprintf(STDERR, "  <Inherits>$plugoutoptions->{'inherits'}</Inherits>\n");
    169     gsprintf(STDERR, "  <Arguments>\n");
    170 
    171     if (defined($plugoutoptions->{'args'})) {
    172     &PrintUsage::print_options_xml($plugoutoptions->{'args'});
    173     }
    174 
    175     gsprintf(STDERR, "  </Arguments>\n");
    176     # Recurse up the plugout hierarchy
    177     $self->print_xml();
     172    unless (defined($high_level_information_only)) {
     173    gsprintf(STDERR, "  <Arguments>\n");
     174    if (defined($plugoutoptions->{'args'})) {
     175        &PrintUsage::print_options_xml($plugoutoptions->{'args'});
     176    }
     177    gsprintf(STDERR, "  </Arguments>\n");
     178
     179    # Recurse up the plugout hierarchy
     180    $self->print_xml();
     181    }
    178182    gsprintf(STDERR, "</PlugoutInfo>\n");
    179183}
Note: See TracChangeset for help on using the changeset viewer.