Print a message before the compilation of bigger vocabulary namespaces
This commit is contained in:
parent
be2f10f5cd
commit
f475f910d4
1 changed files with 5 additions and 0 deletions
|
@ -14,6 +14,7 @@ defmodule RDF.Vocabulary.Namespace do
|
||||||
alias RDF.Utils.ResourceClassifier
|
alias RDF.Utils.ResourceClassifier
|
||||||
|
|
||||||
@vocabs_dir "priv/vocabs"
|
@vocabs_dir "priv/vocabs"
|
||||||
|
@big_vocab_threshold 300
|
||||||
|
|
||||||
defmacro __using__(_opts) do
|
defmacro __using__(_opts) do
|
||||||
quote do
|
quote do
|
||||||
|
@ -34,6 +35,10 @@ defmodule RDF.Vocabulary.Namespace do
|
||||||
{:data, data} -> {rdf_data_vocab_terms(data, base_uri), data}
|
{:data, data} -> {rdf_data_vocab_terms(data, base_uri), data}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if data && RDF.Data.subject_count(data) > @big_vocab_threshold do
|
||||||
|
IO.puts("Compiling vocabulary namespace for #{base_uri} may take some time")
|
||||||
|
end
|
||||||
|
|
||||||
terms =
|
terms =
|
||||||
terms
|
terms
|
||||||
|> term_mapping!(opts)
|
|> term_mapping!(opts)
|
||||||
|
|
Loading…
Reference in a new issue