Skip to content

Commit

Permalink
ADDED: hdt_node/2
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterbeek committed Sep 9, 2017
1 parent 9f0dfce commit 633979a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions prolog/hdt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
hdt_predicate/2, % +HDT, -Predicate
hdt_shared/2, % +HDT, -Shared
hdt_object/2, % +HDT, -Object
hdt_node/2, % +HDT, ?Node

hdt_suggestions/5, % +HDT, +Base, +Role, +MaxCount, -List
hdt_property/2, % +HTD, -Property
Expand Down Expand Up @@ -142,6 +143,7 @@
%% hdt_predicate(+HDT, -IRI) is nondet.
%% hdt_object(+HDT, -Object) is nondet.
%% hdt_shared(+HDT, -IRI) is nondet.
%% hdt_node(+HDT, ?Node) is nondet.
%
% Enumerate possible values for the individual components of the
% triples represented in the HDT. Note that these enumarators do
Expand Down Expand Up @@ -190,6 +192,18 @@
-> true
).

hdt_node(HDT, Node) :-
( var(Node)
-> ( hdt_column_(HDT, shared, Node)
; hdt_column_(HDT, subject, Node)
; hdt_column_(HDT, object, Node)
)
; hdt_search(HDT, Node, _, _)
-> true
; hdt_search(HDT, _, _, Node)
-> true
).


%% pre_object(+HDT, ?O, -OHDT) is det.
%% post_object(?O, +OHDT) is det.
Expand Down

0 comments on commit 633979a

Please sign in to comment.