Permalink
Browse files

Fixed URIs for media files

  • Loading branch information...
1 parent 159053d commit de4cda472a3aa659300328e2001f01dd903a290d @ldodds committed Mar 7, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/FilmFiles.rb
View
@@ -12,7 +12,7 @@ def initialize(film, data)
@film = film
@id = film.fields["identifier"]
- @uri = RDF::URI.new( "#{BASE_URL}/#{film.fields["identifier"]}" )
+ @uri = RDF::URI.new( Util.canonicalize( "/film//#{film.fields["identifier"]}" ) )
@files = []
@root.find("file").each do |tag|
@@ -37,7 +37,7 @@ def generate_statements()
@statements = []
@files.each do |file|
- uri = RDF::URI.new( Util.canonicalize( "/film/#{@id}/#{file["name"]}"))
+ uri = RDF::URI.new( "#{BASE_URL}/#{@id}/#{file["name"]}" )
case file["format"]
when "Metadata"
@@ -58,7 +58,7 @@ def generate_statements()
add_statement( uri, RDF::DC.isVersionOf, @uri )
add_statement( @uri, RDF::DC.hasVersion, uri )
else
- original = RDF::URI.new( Util.canonicalize( "/film/#{@id}/#{file["original"]}" ) )
+ original = RDF::URI.new( "#{BASE_URL}/#{@id}/#{file["original"]}" )
add_statement( uri, RDF::DC.isFormatOf, original )
add_statement( original, RDF::DC.hasFormat, uri )
end

0 comments on commit de4cda4

Please sign in to comment.