Merge branch 'maint-rel-1.6' of https://github.com/vivo-project/VIVO into maint-rel-1.6
This commit is contained in:
commit
c1c7a5ab31
10 changed files with 132 additions and 26 deletions
|
@ -7,7 +7,7 @@ PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||||
CONSTRUCT {
|
CONSTRUCT {
|
||||||
?s arg:ARG_2000028 _:vcard .
|
?s arg:ARG_2000028 _:vcard .
|
||||||
_:vcard arg:ARG_2000029 ?s .
|
_:vcard arg:ARG_2000029 ?s .
|
||||||
_:vcard a v:Individual .
|
_:vcard a v:Kind .
|
||||||
} WHERE {
|
} WHERE {
|
||||||
?s vivo:webpage ?webpage
|
?s vivo:webpage ?webpage
|
||||||
FILTER NOT EXISTS { ?s a foaf:Agent }
|
FILTER NOT EXISTS { ?s a foaf:Agent }
|
||||||
|
|
|
@ -194,12 +194,6 @@
|
||||||
<owl:allValuesFrom rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
|
<owl:allValuesFrom rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
|
||||||
</owl:Restriction>
|
</owl:Restriction>
|
||||||
</rdfs:subClassOf>
|
</rdfs:subClassOf>
|
||||||
<rdfs:subClassOf>
|
|
||||||
<owl:Restriction>
|
|
||||||
<owl:onProperty rdf:resource="http://purl.org/ontology/bibo/numPages"/>
|
|
||||||
<owl:allValuesFrom rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
|
|
||||||
</owl:Restriction>
|
|
||||||
</rdfs:subClassOf>
|
|
||||||
<rdfs:subClassOf>
|
<rdfs:subClassOf>
|
||||||
<owl:Restriction>
|
<owl:Restriction>
|
||||||
<owl:onProperty rdf:resource="http://vivoweb.org/ontology/core#publisher"/>
|
<owl:onProperty rdf:resource="http://vivoweb.org/ontology/core#publisher"/>
|
||||||
|
@ -313,6 +307,12 @@
|
||||||
<owl:allValuesFrom rdf:resource="http://purl.org/ontology/bibo/DocumentPart"/>
|
<owl:allValuesFrom rdf:resource="http://purl.org/ontology/bibo/DocumentPart"/>
|
||||||
</owl:Restriction>
|
</owl:Restriction>
|
||||||
</rdfs:subClassOf>
|
</rdfs:subClassOf>
|
||||||
|
<rdfs:subClassOf>
|
||||||
|
<owl:Restriction>
|
||||||
|
<owl:onProperty rdf:resource="http://purl.org/ontology/bibo/numPages"/>
|
||||||
|
<owl:allValuesFrom rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
|
||||||
|
</owl:Restriction>
|
||||||
|
</rdfs:subClassOf>
|
||||||
</owl:Class>
|
</owl:Class>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,8 @@
|
||||||
<!-- http://purl.org/ontology/bibo/reproducedIn -->
|
<!-- http://purl.org/ontology/bibo/reproducedIn -->
|
||||||
|
|
||||||
<owl:ObjectProperty rdf:about="http://purl.org/ontology/bibo/reproducedIn">
|
<owl:ObjectProperty rdf:about="http://purl.org/ontology/bibo/reproducedIn">
|
||||||
|
<rdfs:range rdf:resource="http://purl.org/ontology/bibo/Document"/>
|
||||||
|
<rdfs:domain rdf:resource="http://purl.org/ontology/bibo/Document"/>
|
||||||
<rdfs:subPropertyOf rdf:resource="http://purl.obolibrary.org/obo/BFO_0000050"/>
|
<rdfs:subPropertyOf rdf:resource="http://purl.obolibrary.org/obo/BFO_0000050"/>
|
||||||
</owl:ObjectProperty>
|
</owl:ObjectProperty>
|
||||||
|
|
||||||
|
@ -447,9 +448,19 @@
|
||||||
<owl:ObjectProperty rdf:about="http://vivoweb.org/ontology/core#hasSubjectArea">
|
<owl:ObjectProperty rdf:about="http://vivoweb.org/ontology/core#hasSubjectArea">
|
||||||
|
|
||||||
<rdfs:subPropertyOf rdf:resource="http://vivoweb.org/ontology/core#hasAssociatedConcept"/>
|
<rdfs:subPropertyOf rdf:resource="http://vivoweb.org/ontology/core#hasAssociatedConcept"/>
|
||||||
|
<owl:inverseOf rdf:resource="http://vivoweb.org/ontology/core#subjectAreaOf"/>
|
||||||
</owl:ObjectProperty>
|
</owl:ObjectProperty>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- http://vivoweb.org/ontology/core#hasSubjectArea -->
|
||||||
|
|
||||||
|
<owl:ObjectProperty rdf:about="http://vivoweb.org/ontology/core#subjectAreaOf">
|
||||||
|
<rdfs:subPropertyOf rdf:resource="http://vivoweb.org/ontology/core#conceptAssociatedWith"/>
|
||||||
|
|
||||||
|
</owl:ObjectProperty>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- http://vivoweb.org/ontology/core#hasSuccessorOrganization -->
|
<!-- http://vivoweb.org/ontology/core#hasSuccessorOrganization -->
|
||||||
|
|
||||||
|
|
|
@ -583,6 +583,23 @@ vivo:researchAreaOf
|
||||||
vitro:selectFromExistingAnnot
|
vitro:selectFromExistingAnnot
|
||||||
"true"^^xsd:boolean .
|
"true"^^xsd:boolean .
|
||||||
|
|
||||||
|
vivo:subjectAreaOf
|
||||||
|
rdfs:label "subject area of"@en-US ;
|
||||||
|
vitro:displayLimitAnnot
|
||||||
|
"5"^^xsd:int ;
|
||||||
|
vitro:displayRankAnnot
|
||||||
|
"10"^^xsd:int ;
|
||||||
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot
|
||||||
|
<http://vitro.mannlib.cornell.edu/ns/vitro/role#public> ;
|
||||||
|
vitro:inPropertyGroupAnnot
|
||||||
|
<http://vivoweb.org/ontology#vitroPropertyGroupoverview> ;
|
||||||
|
vitro:offerCreateNewOptionAnnot
|
||||||
|
"true"^^xsd:boolean ;
|
||||||
|
vitro:prohibitedFromUpdateBelowRoleLevelAnnot
|
||||||
|
<http://vitro.mannlib.cornell.edu/ns/vitro/role#public> ;
|
||||||
|
vitro:selectFromExistingAnnot
|
||||||
|
"true"^^xsd:boolean .
|
||||||
|
|
||||||
geo:populationTotal
|
geo:populationTotal
|
||||||
rdfs:label "total population"@en-US ;
|
rdfs:label "total population"@en-US ;
|
||||||
vitro:hiddenFromDisplayBelowRoleLevelAnnot
|
vitro:hiddenFromDisplayBelowRoleLevelAnnot
|
||||||
|
|
7
utilities/ISF-transition/obsoleteUris/doit2
Executable file
7
utilities/ISF-transition/obsoleteUris/doit2
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
ruby obsoleteUriChecker.rb /Users/jeb228/git/VIVO \
|
||||||
|
../../../productMods/WEB-INF/ontologies/update/diff.tab.txt \
|
||||||
|
vivo_known_exceptions_2.txt complete > scan_VIVO_maint_branch
|
||||||
|
ruby obsoleteUriChecker.rb /Users/jeb228/git/Vitro \
|
||||||
|
../../../productMods/WEB-INF/ontologies/update/diff.tab.txt \
|
||||||
|
vivo_known_exceptions_2.txt complete > scan_Vitro_maint_branch
|
||||||
|
|
|
@ -5,10 +5,16 @@ class Event
|
||||||
attr_reader :string
|
attr_reader :string
|
||||||
attr_reader :is_localname
|
attr_reader :is_localname
|
||||||
|
|
||||||
|
require 'pathname'
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
private
|
private
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def relativize(root, path)
|
||||||
|
Pathname.new(path).relative_path_from(Pathname.new(root)).to_s
|
||||||
|
end
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
public
|
public
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
@ -21,7 +27,11 @@ class Event
|
||||||
@is_localname = string[0] == ?:
|
@is_localname = string[0] == ?:
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s()
|
def to_s(directory_root = nil)
|
||||||
"#{@path} \n #{@line_number} #{@line} \n #{@string} #{@is_localname ? "Localname" : "URI"}"
|
if directory_root
|
||||||
|
"#{relativize(directory_root, @path)} \n #{@line_number} #{@line} \n #{@string} #{@is_localname ? "Localname" : "URI"}"
|
||||||
|
else
|
||||||
|
"#{@path} \n #{@line_number} #{@line} \n #{@string} #{@is_localname ? "Localname" : "URI"}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,22 @@
|
||||||
|
require 'pathname'
|
||||||
|
|
||||||
class KnownExceptionsError < StandardError; end
|
class KnownExceptionsError < StandardError; end
|
||||||
|
|
||||||
|
class GlobSkipper
|
||||||
|
def initialize(root_path, glob)
|
||||||
|
@root_path = root_path
|
||||||
|
@glob = glob
|
||||||
|
end
|
||||||
|
|
||||||
|
def relativize(path)
|
||||||
|
Pathname.new(path).relative_path_from(Pathname.new(@root_path)).to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
def skip?(path, line, uri)
|
||||||
|
return File.fnmatch(@glob, relativize(path))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class ExtensionSkipper
|
class ExtensionSkipper
|
||||||
def initialize(extension)
|
def initialize(extension)
|
||||||
@extension = extension
|
@extension = extension
|
||||||
|
@ -44,10 +61,11 @@ class KnownExceptions
|
||||||
line.strip!
|
line.strip!
|
||||||
next if line.length == 0 || line[0..0] == '#' || line[0] == ?!
|
next if line.length == 0 || line[0..0] == '#' || line[0] == ?!
|
||||||
|
|
||||||
if line =~ /^\.[^\/]*$/
|
# if line =~ /^\.[^\/]*$/
|
||||||
skippers << ExtensionSkipper.new(line)
|
# skippers << ExtensionSkipper.new(line)
|
||||||
elsif line =~ /^(\S+)\s*$/
|
if line =~ /^(\S+)\s*$/
|
||||||
skippers << PathSkipper.new(@root_path, $1)
|
# skippers << PathSkipper.new(@root_path, $1)
|
||||||
|
skippers << GlobSkipper.new(@root_path, $1)
|
||||||
elsif line =~ /^(\S+)\s*(\d+)\s*$/
|
elsif line =~ /^(\S+)\s*(\d+)\s*$/
|
||||||
skippers << LineSkipper.new(@root_path, $1, $2.to_i)
|
skippers << LineSkipper.new(@root_path, $1, $2.to_i)
|
||||||
else
|
else
|
||||||
|
@ -71,7 +89,7 @@ class KnownExceptions
|
||||||
if line_number == -1
|
if line_number == -1
|
||||||
next if skipper.is_a?(LineSkipper)
|
next if skipper.is_a?(LineSkipper)
|
||||||
else
|
else
|
||||||
next if skipper.is_a?(ExtensionSkipper) || skipper.is_a?(PathSkipper)
|
next if skipper.is_a?(ExtensionSkipper) || skipper.is_a?(PathSkipper) || skipper.is_a?(GlobSkipper)
|
||||||
end
|
end
|
||||||
|
|
||||||
if skipper.skip?(file, line_number, string)
|
if skipper.skip?(file, line_number, string)
|
||||||
|
|
|
@ -80,8 +80,8 @@ class ObsoleteUriChecker
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def initialize(args)
|
def initialize(args)
|
||||||
@report = Report.new(args)
|
|
||||||
@directory_root, @obsolete_uris, @known_exceptions, @complete = parse_arguments(args)
|
@directory_root, @obsolete_uris, @known_exceptions, @complete = parse_arguments(args)
|
||||||
|
@report = Report.new(args, @directory_root)
|
||||||
rescue UsageError => e
|
rescue UsageError => e
|
||||||
puts "\n----------------\nUsage error\n----------------\n\n#{e}\n\n----------------\n\n"
|
puts "\n----------------\nUsage error\n----------------\n\n#{e}\n\n----------------\n\n"
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -3,6 +3,10 @@ class Report
|
||||||
private
|
private
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
def relativize(path)
|
||||||
|
Pathname.new(path).relative_path_from(Pathname.new(@directory_root)).to_s
|
||||||
|
end
|
||||||
|
|
||||||
def state_arguments()
|
def state_arguments()
|
||||||
puts
|
puts
|
||||||
puts "-----------------------------------------------------------------"
|
puts "-----------------------------------------------------------------"
|
||||||
|
@ -29,9 +33,8 @@ class Report
|
||||||
hash[event.path] = hash[event.path] << event
|
hash[event.path] = hash[event.path] << event
|
||||||
end
|
end
|
||||||
|
|
||||||
# puts "FLAT: #{hash.to_a.flatten}"
|
|
||||||
hash.sort.each do |path, events|
|
hash.sort.each do |path, events|
|
||||||
puts "#{path}"
|
puts "#{relativize(path)}"
|
||||||
events.sort{|a, b| a.line_number <=> b.line_number }.each do |e|
|
events.sort{|a, b| a.line_number <=> b.line_number }.each do |e|
|
||||||
trimmed =
|
trimmed =
|
||||||
if e.line.size <= 100
|
if e.line.size <= 100
|
||||||
|
@ -46,18 +49,13 @@ class Report
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_events()
|
|
||||||
@events.each do |event|
|
|
||||||
puts "Event: #{event}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
public
|
public
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def initialize(args)
|
def initialize(args, directory_root)
|
||||||
@args = args;
|
@args = args;
|
||||||
|
@directory_root = directory_root
|
||||||
@file_count = 0
|
@file_count = 0
|
||||||
@extensions_count = Hash.new(0)
|
@extensions_count = Hash.new(0)
|
||||||
@events = []
|
@events = []
|
||||||
|
@ -75,7 +73,6 @@ class Report
|
||||||
def report()
|
def report()
|
||||||
state_arguments()
|
state_arguments()
|
||||||
file_summary()
|
file_summary()
|
||||||
# list_events()
|
|
||||||
collate_and_list_events()
|
collate_and_list_events()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
.*
|
||||||
|
bin
|
||||||
|
|
||||||
|
*.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