amalgame/commit
IMPROVED: do not send out bulky properties dict in json
author | Jacco van Ossenbruggen |
---|---|
Thu May 14 17:35:15 2015 +0200 | |
committer | Jacco van Ossenbruggen |
Thu May 14 17:35:15 2015 +0200 | |
commit | 64f488b02802a2b55a9f523b5b4d6415afaee289 |
tree | bfd17e86225e9ec5bd6f60d43b3dd67900d12242 |
parent | eae1644710774d23c11f7b4a65aeb4a47e6cda50 |
Diff style: patch stat
diff --git a/api/node_info.pl b/api/node_info.pl index 79dfeea..6dab632 100644 --- a/api/node_info.pl +++ b/api/node_info.pl @@ -188,8 +188,8 @@ amalgame_info(URL, Strategy, Stats) :- ), option(labels(Labels), MStats), - option(source(SLabels), Labels), option(target(TLabels), Labels), - option(properties(SPDict), SLabels), option(properties(TPDict), TLabels), + option(source(SLabels), Labels), option(target(TLabels), Labels), + option('@properties'(SPDict), SLabels), option('@properties'(TPDict), TLabels), label_property_stats(SPDict, PSstats, [totalCount(SN0), role(src)]), label_property_stats(TPDict, PTstats, [totalCount(TN0), role(trg)]), @@ -206,7 +206,7 @@ amalgame_info(Scheme, Strategy, Stats) :- !, node_stats(Strategy, Scheme, NStats, []), option(structure(DDict), NStats, _{}), - option(properties(PDict), NStats, _{}), + option('@properties'(PDict), NStats, _{}), BasicStats = [ 'type:' - Virtual, diff --git a/components/amalgame/startpage.pl b/components/amalgame/startpage.pl index 74a9ebb..ccace4a 100644 --- a/components/amalgame/startpage.pl +++ b/components/amalgame/startpage.pl @@ -205,7 +205,7 @@ html_vocab_rows([]) --> !. html_vocab_rows([Scheme|Vs]) --> { ( node_stats(_Strategy, Scheme, Stats, [compute(false)]) -> option(totalCount(ConceptCount), Stats), - option(properties(PDict), Stats, pdict{}), + option('@properties'(PDict), Stats, pdict{}), rdf_equal(skos:prefLabel, PL), rdf_equal(skos:altLabel, AL), ( get_dict(PL, PDict, PrefLangs)-> true; PrefLangs = []), diff --git a/lib/amalgame/json_util.pl b/lib/amalgame/json_util.pl index 3f73ece..b826614 100644 --- a/lib/amalgame/json_util.pl +++ b/lib/amalgame/json_util.pl @@ -118,7 +118,7 @@ node_prop(S, R, label, Label) :- literal_text(Lit, Label). node_prop(S, R, stats, Censored) :- node_stats(S,R,Stats, [compute(false)]), - select_dict(_{'@private':_}, Stats, Censored). + select_dict(_{'@private':_, '@properties':_}, Stats, Censored). node_prop(_S, R, type, Type) :- ( rdfs_individual_of(R, amalgame:'AlignmentStrategy') diff --git a/lib/amalgame/scheme_stats.pl b/lib/amalgame/scheme_stats.pl index 751a0ea..669b0de 100644 --- a/lib/amalgame/scheme_stats.pl +++ b/lib/amalgame/scheme_stats.pl @@ -62,7 +62,7 @@ compute_label_stats(Concepts, Stats) :- Stats = scheme_stats_dict{ formats: Formats, languages: Languages, - properties: LanguagesDict, + '@properties': LanguagesDict, totalLabelCount: TotalLabelCount }, % compute all (prop:lang)-label pairs for skos and skosxl labels: diff --git a/lib/amalgame/vocabulary.pl b/lib/amalgame/vocabulary.pl index 83f4502..a9b15aa 100644 --- a/lib/amalgame/vocabulary.pl +++ b/lib/amalgame/vocabulary.pl @@ -143,7 +143,7 @@ expand_vocab(Scheme, VocSpec) :- expand_node(Strategy, Scheme, VocSpec). get_amb_concepts(Property, Lang, Stats, Concepts) :- - get_dict(properties, Stats, PropsStats), + get_dict('@properties', Stats, PropsStats), get_dict(Property, PropsStats, PropStats), get_dict(Lang, PropStats, LocalStats), get_dict(ambiguousConcepts, LocalStats, Concepts).