Skip to content

Instantly share code, notes, and snippets.

@justgo129
Created May 31, 2016 12:10
Show Gist options
  • Save justgo129/f5943c2092e6db3121e5857737f59db9 to your computer and use it in GitHub Desktop.
Save justgo129/f5943c2092e6db3121e5857737f59db9 to your computer and use it in GitHub Desktop.
% layout 'default', namespaces => [qw/dcterms skos xsd gcis dbpprop org place prov owl/];
%= filter_lines_with empty_predicate() => begin
<<%= current_resource %>>
dcterms:identifier "<%= $organization->identifier %>";
skos:prefLabel "<%= $organization->name %>"^^xsd:string;
gcis:hasURL "<%= $organization->url %>"^^xsd:anyURI;
% if (my $type = $organization->organization_type) {
dbpprop:organizationType "<%= $type->identifier %>";
% }
% #
a gcis:Organization .
%# We now explore relationships between organizations:
% if (my @maps = $organization->organization_maps) {
% my $first = 1;
% for my $map (@maps) {
% if ($first) {
% $first = 0;
## This organization is related to one or more others as follows:
% }
<<%= current_resource %>>
% for ($map = division_of; $map = department_of) {
org:unitOf <<%= uri($map->other_organization) %>>;
% } else {
org:linkedTo <<%= uri($map->other_organization) %>>;
% }
% }
% }
% if (my @maps = $organization->organization_maps_objs) {
% my $first = 1;
% for my $map (@maps) {
% if ($first) {
% $first = 0;
## Other organizations are related to this one as follows:
% }
<<%= uri($map->organization) %>>
org:linkedto <<%= current_resource %>>.
% }
% }
% end
%= include 'organization/contributors';
%= include 'other_identifiers', gcid => $organization->uri($self);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment