8 |
'for=s' => \$Opt{For}, |
'for=s' => \$Opt{For}, |
9 |
'help' => \$Opt{help}, |
'help' => \$Opt{help}, |
10 |
'no-undef-check' => \$Opt{no_undef_check}, |
'no-undef-check' => \$Opt{no_undef_check}, |
|
'output-class' => \$Opt{output_class}, |
|
11 |
'output-for' => \$Opt{output_for}, |
'output-for' => \$Opt{output_for}, |
12 |
'output-local-class' => \$Opt{output_local_class}, |
'output-local-resource' => \$Opt{output_local_resource}, |
13 |
'output-module' => \$Opt{output_module}, |
'output-module' => \$Opt{output_module}, |
14 |
|
'output-resource' => \$Opt{output_resource}, |
15 |
) or pod2usage (2); |
) or pod2usage (2); |
16 |
if ($Opt{help}) { |
if ($Opt{help}) { |
17 |
pod2usage (0); |
pod2usage (0); |
98 |
} |
} |
99 |
}} |
}} |
100 |
|
|
101 |
if ($Opt{output_class}) { |
if ($Opt{output_resource}) { |
102 |
sub class_to_rdf ($;%); |
sub class_to_rdf ($;%); |
103 |
sub class_to_rdf ($;%) { |
sub class_to_rdf ($;%) { |
104 |
my ($mod, %opt) = @_; |
my ($mod, %opt) = @_; |
110 |
n3_literal $mod->{Name}) if length $mod->{Name}; |
n3_literal $mod->{Name}) if length $mod->{Name}; |
111 |
$result->add_triple ($uri =>ExpandedURI q<d:NameURI>=> $mod->{NameURI}) |
$result->add_triple ($uri =>ExpandedURI q<d:NameURI>=> $mod->{NameURI}) |
112 |
if defined $mod->{NameURI}; |
if defined $mod->{NameURI}; |
113 |
$result->add_triple ($uri =>ExpandedURI q<d:parentClass>=> |
$result->add_triple ($uri =>ExpandedURI q<d:parentResource>=> |
114 |
$opt{parent_class_uri}) |
$opt{parent_class_uri}) |
115 |
if defined $opt{parent_class_uri}; |
if defined $opt{parent_class_uri}; |
116 |
for (keys %{$mod->{Type}}) { |
for (keys %{$mod->{Type}}) { |
122 |
for (keys %{$mod->{Implement}}) { |
for (keys %{$mod->{Implement}}) { |
123 |
$result->add_triple ($uri =>ExpandedURI q<d:Implement>=> $_); |
$result->add_triple ($uri =>ExpandedURI q<d:Implement>=> $_); |
124 |
} |
} |
125 |
if ($Opt{output_local_class}) { |
if ($Opt{output_local_resource}) { |
126 |
for (keys %{$mod->{Class}}) { |
for (keys %{$mod->{Class}}) { |
127 |
class_to_rdf ($mod->{Class}->{$_}, parent_class => $mod, |
class_to_rdf ($mod->{Class}->{$_}, parent_class => $mod, |
128 |
parent_class_uri => $uri, |
parent_class_uri => $uri, |