14
15
16:- module(get_owl_output, [
17 get_owl_output/6
18 ]).
28:- use_module(drs_to_owlswrl). 29:- use_module(owlfss_owlrdfxml). 30:- use_module(owlswrl_to_xml). 31:- use_module(owlswrl_to_fss). 32:- use_module('../../logger/error_logger'). 33
34:- use_module('../xmlterm_to_xmlatom', [
35 xmlterm_to_xmlatom/2
36 ]). 37
38:- use_module('../serialize_term', [
39 serialize_term_into_atom/2
40 ]).
52get_owl_output(owlrdf, Comment, Drs, Uri, 'text/xml', Output) :-
53 ignore(drs_to_owlswrl:drs_to_owlswrl(Drs, Uri, Comment, OwlFss)),
54 (
55 get_messages_with_type(owl, [])
56 ->
57 owlfss_owlrdfxml:owlfss_owlrdfxml(OwlFss, OwlRdfxml),
58 xmlterm_to_xmlatom(OwlRdfxml, Output)
59 ;
60 Output = ''
61 ).
62
63get_owl_output(owlfss, Comment, Drs, Uri, 'text/plain', Output) :-
64 ignore(drs_to_owlswrl:drs_to_owlswrl(Drs, Uri, Comment, OwlFss)),
65 (
66 get_messages_with_type(owl, [])
67 ->
68 serialize_term_into_atom(OwlFss, Output)
69 ;
70 Output = ''
71 ).
72
73get_owl_output(owlfsspp, Comment, Drs, Uri, 'text/plain', Output) :-
74 ignore(drs_to_owlswrl:drs_to_owlswrl(Drs, Uri, Comment, OwlFss)),
75 (
76 get_messages_with_type(owl, [])
77 ->
78 owlswrl_to_fss:owlswrl_to_fss(OwlFss, Output)
79 ;
80 Output = ''
81 ).
82
83get_owl_output(owlxml, Comment, Drs, Uri, 'text/xml', Output) :-
84 ignore(drs_to_owlswrl:drs_to_owlswrl(Drs, Uri, Comment, OwlFss)),
85 (
86 get_messages_with_type(owl, [])
87 ->
88 owlswrl_to_xml:owlswrl_to_xml(OwlFss, OwlXml),
89 xmlterm_to_xmlatom(OwlXml, Output)
90 ;
91 Output = ''
92 )
Interface for the OWL outputs
*/