~juan457/+junk/zorba

« back to all changes in this revision

Viewing changes to src/runtime/full_text/thesaurus.cpp

  • Committer: Markos Zaharioudakis
  • Date: 2012-07-11 15:38:39 UTC
  • mfrom: (10924 zorba)
  • mto: This revision was merged to the branch mainline in revision 10932.
  • Revision ID: markos_za@yahoo.com-20120711153839-0mkh15cg2ubknchd
work in progress

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
    return nullptr;
105
105
 
106
106
  switch ( thesaurus_impl::find( scheme_name ) ) {
107
 
    case thesaurus_impl::xqftts: {
108
 
      //
 
107
    case thesaurus_impl::xqftts:
 
108
#   ifdef ZORBA_WITH_FILE_ACCESS
 
109
    {
109
110
      // Currently, we presume that an "xqftts:" URL should be used exactly
110
111
      // like a "file:" URL.
111
112
      //
114
115
      zstring const t_path( fs::get_normalized_path( t_uri ) );
115
116
      return new xqftts::provider( t_path );
116
117
    }
 
118
#   endif /* ZORBA_WITH_FILE_ACCESS */
 
119
    case thesaurus_impl::wordnet:
117
120
#   ifdef ZORBA_WITH_FILE_ACCESS
118
 
    case thesaurus_impl::wordnet: {
119
 
      //
 
121
    {
120
122
      // Wordnet, on the other hand, needs to find its data file in Zorba's
121
123
      // library path using the mangled form of the original URI.  So, mangle
122
124
      // here for convenience.
126
128
      return new wordnet::provider( t_path );
127
129
    }
128
130
#   endif /* ZORBA_WITH_FILE_ACCESS */
 
131
#   ifndef ZORBA_WITH_FILE_ACCESS
 
132
      throw XQUERY_EXCEPTION( zerr::ZXQP0017_FILE_ACCESS_DISABLED );
 
133
#   endif /* ZORBA_WITH_FILE_ACCESS */
129
134
    default:
130
135
      throw XQUERY_EXCEPTION( err::FTST0018, ERROR_PARAMS( url ) );
131
136
  }