6 #ifndef CHECK_ONTOLOGY_ID_HPP_
7 #define CHECK_ONTOLOGY_ID_HPP_
18 virtual void operator()(std::string
const& iri, std::string
const&)
const {
19 if( iri.empty() ) BOOST_THROW_EXCEPTION(
21 << Err::msg_t(
"empty ontologyIRI")
30 void operator()(std::string
const& , std::string
const&)
const {}
38 Check_iri(std::string
const& iri) : iri_(iri) {}
40 void operator()(std::string
const& iri, std::string
const& ver)
const {
41 Check_id::operator ()(iri, ver);
42 if( iri_ != iri && iri_ != ver ) BOOST_THROW_EXCEPTION(
44 << Err::msg_t(
"ontology IRI mismatch")
51 const std::string iri_;
60 Check_both(std::string
const& iri, std::string
const& ver)
61 : iri_(iri), ver_(ver) {}
63 void operator()(std::string
const& iri, std::string
const& ver)
const {
64 Check_id::operator ()(iri, ver);
65 if( iri_ != iri ) BOOST_THROW_EXCEPTION(
67 << Err::msg_t(
"ontology IRI mismatch")
71 if( ver_ != ver ) BOOST_THROW_EXCEPTION(
73 << Err::msg_t(
"ontology versionIRI mismatch")
79 const std::string iri_;
80 const std::string ver_;