Skip to content

Instantly share code, notes, and snippets.

@bduggan
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bduggan/f34bc07d1afdf3c63055 to your computer and use it in GitHub Desktop.
Save bduggan/f34bc07d1afdf3c63055 to your computer and use it in GitHub Desktop.
[bduggan@lubber (master) tuba]$ find . -name '*.ttl.tut' |xargs perl -nle 'print "$1:$2" if /\b(\S+):([A-Z]\S+\b)/' |sort -u
bibo:Article
bibo:Book
bibo:Journal
bibo:Webpage
biro:BibliographicRecord
datacite:AlternateResourceIdentifier
dbpedia:Domain_Name
dbpedia:MIME
dbpedia:Natural_number
dbpedia:Region
dbpedia:SHA-1
dcterms:InteractiveResource
dcterms:Relation
dcterms:RightsStatement
dcterms:SizeOrDuration
fabio:ComputerFile
gcis:Activity
gcis:Array
gcis:Chapter
gcis:Dataset
gcis:Figure
gcis:Finding
gcis:Image
gcis:Instrument
gcis:Model
gcis:ModelRun
gcis:Organization
gcis:Person
gcis:Platform
gcis:Project
gcis:Report
gcis:Scenario
gcis:Software
gcis:Table
gcis:TemporalExtents
meth:Methodology
owl:SameAs
place:Country
prov:Activity
prov:Attribution
prov:Entity
skos:Concept
for i in `cat /tmp/out.list`; do
> find . -name '*.ttl.tut' | xargs perl -nle "print if /$i/" | grep '"'
> done
datacite:AlternateResourceIdentifier "<%= $dataset->native_id %>";
datacite:AlternateResourceIdentifier "<%= $dataset->native_id %>";
dbpedia:Domain_Name "<%= url_host($file->location) %>";
dbpedia:Domain_Name "<%= url_host($file->location) %>";
dbpedia:MIME "<%= $file->mime_type %>";
dbpedia:MIME "<%= $file->mime_type %>";
dbpedia:Natural_number "<%= $finding->ordinal %>"^^xsd:integer;
dbpedia:Natural_number "<%= $finding->ordinal %>"^^xsd:integer;
dbpedia:SHA-1 "<%= $file->sha1 %>";
dbpedia:SHA-1 "<%= $file->sha1 %>";
dcterms:InteractiveResource "<%= $activity->computing_environment %>"^^xsd:string;
dcterms:InteractiveResource "<%= $activity->computing_environment %>"^^xsd:string;
dcterms:RightsStatement "<%= $figure->usage_limits %>"^^xsd:string;
dcterms:RightsStatement "<%= $image->usage_limits %>"^^xsd:string;
dcterms:RightsStatement "<%= $figure->usage_limits %>"^^xsd:string;
dcterms:RightsStatement "<%= $image->usage_limits %>"^^xsd:string;
dcterms:SizeOrDuration "<%= human_duration ($activity->duration) %>"^^xsd:string;
dcterms:SizeOrDuration "<%= human_duration ($activity->duration) %>"^^xsd:string;
gcis:Software "<%= $activity->software %>"^^xsd:string;
gcis:Software "<%= $activity->software %>"^^xsd:string;
gcis:TemporalExtents "<%= $dataset->temporal_extent %>";
gcis:TemporalExtents "<%= $dataset->temporal_extent %>";
meth:Methodology "<%= $activity->methodology %>"^^xsd:string;
meth:Methodology "<%= $activity->methodology %>"^^xsd:string;
place:Country "<%= $country->name %>"^^xsd:string;
place:Country "<%= $country->name %>"^^xsd:string;
@justgo129
Copy link

Looks good. Just wondering: why are there duplicate lines in gistfile1.txt? If the term is used in multiple locations, shouldn't the variable differ between lines (e.g. $dataset in both instances of datacite:AlternateResourceIdentifier ).

@zednis
Copy link

zednis commented May 26, 2015

This is URIs being used as properties that begin with capital letters from the templates?

@justgo129
Copy link

fyi - owl:SameAs has since been changed to owl:sameAs in all relevant turtle templates.

@justgo129
Copy link

Following the merging of the various pull requests I created tonight, the only remaining predicate on the list at https://gist.github.com/bduggan/f34bc07d1afdf3c63055#file-gistfile1-txt will be dbpedia:Natural_number, used in the turtle for findings. The rationale behind that term was to enter a value to the right of the decimal point (e.g. the "6" in "Figure 2.6"). I'm not sure whether the way we did it for figures (https://github.com/USGCRP/gcis/blob/master/lib/Tuba/files/templates/figure/object.ttl.tut) will inform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment