Polish the obsolete_URI script.
This commit is contained in:
parent
1bf36caef7
commit
4e3f69fda7
4 changed files with 75 additions and 2 deletions
|
@ -1,4 +1,10 @@
|
||||||
class Event
|
class Event
|
||||||
|
attr_reader :path
|
||||||
|
attr_reader :line_number
|
||||||
|
attr_reader :line
|
||||||
|
attr_reader :string
|
||||||
|
attr_reader :is_localname
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
private
|
private
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -68,6 +68,12 @@ class KnownExceptions
|
||||||
|
|
||||||
def skip?(file, line_number = -1, string = "@!#IMPOSSIBLE#!@")
|
def skip?(file, line_number = -1, string = "@!#IMPOSSIBLE#!@")
|
||||||
@skippers.each() do |skipper|
|
@skippers.each() do |skipper|
|
||||||
|
if line_number == -1
|
||||||
|
next if skipper.is_a?(LineSkipper)
|
||||||
|
else
|
||||||
|
next if skipper.is_a?(ExtensionSkipper) || skipper.is_a?(PathSkipper)
|
||||||
|
end
|
||||||
|
|
||||||
if skipper.skip?(file, line_number, string)
|
if skipper.skip?(file, line_number, string)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,6 +19,25 @@ class Report
|
||||||
@extensions_count.sort.each do |pair|
|
@extensions_count.sort.each do |pair|
|
||||||
puts " #{pair[0]} #{pair[1]}"
|
puts " #{pair[0]} #{pair[1]}"
|
||||||
end
|
end
|
||||||
|
puts "-----------------------------------------------------------------"
|
||||||
|
puts
|
||||||
|
end
|
||||||
|
|
||||||
|
def collate_and_list_events()
|
||||||
|
hash = Hash.new{|h, k| []}
|
||||||
|
@events.each do |event|
|
||||||
|
hash[event.path] = hash[event.path] << event
|
||||||
|
end
|
||||||
|
|
||||||
|
# puts "FLAT: #{hash.to_a.flatten}"
|
||||||
|
hash.sort.each do |path, events|
|
||||||
|
puts "#{path}"
|
||||||
|
events.sort{|a, b| a.line_number <=> b.line_number }.each do |e|
|
||||||
|
puts " #{e.line_number} #{e.line}"
|
||||||
|
puts " #{e.is_localname ? "Localname" : "URI"} #{e.string}"
|
||||||
|
end
|
||||||
|
puts "--------------------"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_events()
|
def list_events()
|
||||||
|
@ -50,6 +69,7 @@ class Report
|
||||||
def report()
|
def report()
|
||||||
state_arguments()
|
state_arguments()
|
||||||
file_summary()
|
file_summary()
|
||||||
list_events()
|
# list_events()
|
||||||
|
collate_and_list_events()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
.GIF
|
||||||
|
.as
|
||||||
|
.class
|
||||||
|
.fla
|
||||||
|
.gif
|
||||||
|
.gz
|
||||||
|
.ico
|
||||||
|
.jar
|
||||||
|
.jpg
|
||||||
|
.psd
|
||||||
|
.png
|
||||||
|
.swf
|
||||||
|
.war
|
||||||
|
.zip
|
||||||
|
|
||||||
|
#
|
||||||
|
# first_pass: no excluded files. everything was duplicated in the .bin directory, and
|
||||||
|
# probably in the .build directory also. Ran against the repository, so VIVO
|
||||||
|
# only.
|
||||||
|
#
|
||||||
|
# 7498 89730 2277668 first_pass.output
|
||||||
|
#
|
||||||
|
|
||||||
|
test/edu/cornell/mannlib/vitro/webapp/search/solr/NIHVIVO3853_DataSet1.rdf
|
||||||
|
productMods/WEB-INF/ontologies/update/oldVersion/vivo-event-1.5.owl
|
||||||
|
productMods/WEB-INF/ontologies/update/oldAnnotations/vivo-core-1.5-annotations.rdf
|
||||||
|
productMods/WEB-INF/ontologies/update/diff.tab.txt
|
||||||
|
|
||||||
|
#
|
||||||
|
# second_pass: excluded these nasty files. Ran against a clean distro, with VIVO and
|
||||||
|
# Vitro, but no .bin or .build
|
||||||
|
#
|
||||||
|
# 1798 5159 170092 second_pass.output
|
||||||
|
#
|
||||||
|
|
||||||
|
productMods/WEB-INF/ontologies/update/oldVersion/vivo-foaf-1.5.owl
|
||||||
|
productMods/WEB-INF/ontologies/update/oldVersion/vivo-core-1.5.owl
|
||||||
|
productMods/WEB-INF/ontologies/update/oldVersion/vivo-bibo-1.5.owl
|
||||||
|
productMods/WEB-INF/ontologies/update/oldVersion/scires-1.5.owl
|
||||||
|
productMods/WEB-INF/ontologies/update/oldVersion/vivo-dcterms-1.5.owl
|
||||||
|
productMods/WEB-INF/ontologies/update/oldVersion/vivo-dcelements-1.5.owl
|
Loading…
Add table
Reference in a new issue