Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
d9c1967a
Kaydet (Commit)
d9c1967a
authored
May 08, 2001
tarafından
Andreas Bille
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Initial revision
test program for XmlSearch engine
üst
90660540
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
367 additions
and
0 deletions
+367
-0
abidebug.hxx
xmlhelp/source/cxxhelp/test/abidebug.hxx
+66
-0
makefile.mk
xmlhelp/source/cxxhelp/test/makefile.mk
+122
-0
searchdemo.cxx
xmlhelp/source/cxxhelp/test/searchdemo.cxx
+179
-0
No files found.
xmlhelp/source/cxxhelp/test/abidebug.hxx
0 → 100644
Dosyayı görüntüle @
d9c1967a
/*************************************************************************
*
* $RCSfile: abidebug.hxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: abi $ $Date: 2001-05-08 12:08:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include <iostream>
#ifndef _RTL_USTRING_
#include <rtl/ustring>
#endif
ostream
&
operator
<<
(
ostream
&
out
,
const
rtl
::
OUString
&
bla
);
xmlhelp/source/cxxhelp/test/makefile.mk
0 → 100644
Dosyayı görüntüle @
d9c1967a
#*************************************************************************
#
# $RCSfile: makefile.mk,v $
#
# $Revision: 1.1 $
#
# last change: $Author: abi $ $Date: 2001-05-08 12:08:05 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
#
# - GNU Lesser General Public License Version 2.1
# - Sun Industry Standards Source License Version 1.1
#
# Sun Microsystems Inc., October, 2000
#
# GNU Lesser General Public License Version 2.1
# =============================================
# Copyright 2000 by Sun Microsystems, Inc.
# 901 San Antonio Road, Palo Alto, CA 94303, USA
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
#
# Sun Industry Standards Source License Version 1.1
# =================================================
# The contents of this file are subject to the Sun Industry Standards
# Source License Version 1.1 (the "License"); You may not use this file
# except in compliance with the License. You may obtain a copy of the
# License at http://www.openoffice.org/license.html.
#
# Software provided under this License is provided on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
# See the License for the specific provisions governing your rights and
# obligations concerning the Software.
#
# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
#
# Copyright: 2000 by Sun Microsystems, Inc.
#
# All Rights Reserved.
#
# Contributor(s): _______________________________________
#
#
#
#*************************************************************************
PRJ
=
..
$/
..
$/
..
PRJNAME
=
xmlhelp
TARGET
=
searchdemo
TARGETTYPE
=
CUI
LIBTARGET
=
NO
ENABLE_EXCEPTIONS
=
TRUE
# --- Settings ---
.INCLUDE
:
svpre.mk
.INCLUDE
:
settings.mk
.INCLUDE
:
sv.mk
# --- Files ---
.IF
"$(depend)"
!=
""
OBJFILES
=
\
$(OBJ)$/
searchdemo.obj
.ENDIF
# depend
#SRSFILES= $(SRS)$/ucbdemo.srs
#
# UCBDEMO
#
APP1TARGET
=
searchdemo
APP1OBJS
=
\
$(OBJ)$/
searchdemo.obj
#APP1RES= $(RES)$/searchdemo.res
#.IF "$(COMPHELPERLIB)"==""
#.IF "$(GUI)" == "UNX"
#COMPHELPERLIB=-licomphelp2
#.ENDIF # unx
#.IF "$(GUI)"=="WNT"
#COMPHELPERLIB=icomphelp2.lib
#.ENDIF # wnt
#.ENDIF
APP1STDLIBS
=
\
$(SALLIB)
\
$(VOSLIB)
\
jaqe.lib
\
jadb.lib
\
jautil.lib
APP1DEF
=
$(MISC)
\$
(
APP1TARGET
)
.def
# --- Targets ---
.INCLUDE
:
target.mk
xmlhelp/source/cxxhelp/test/searchdemo.cxx
0 → 100644
Dosyayı görüntüle @
d9c1967a
/*************************************************************************
*
* $RCSfile: searchdemo.cxx,v $
*
* $Revision: 1.1 $
*
* last change: $Author: abi $ $Date: 2001-05-08 12:08:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include <rtl/string.hxx>
#include <osl/file.hxx>
#include <db/Block.hxx>
#include <db/Schema.hxx>
#include <db/BtreeDictParameters.hxx>
#include <db/BtreeDict.hxx>
#include <util/RandomAccessStream.hxx>
#include <db/DBEnv.hxx>
#include <qe/QueryProcessor.hxx>
#ifdef ABIDEBUG
#include <abidebug.hxx>
#endif
using
namespace
xmlsearch
::
util
;
using
namespace
xmlsearch
::
db
;
using
namespace
xmlsearch
::
qe
;
extern
RandomAccessStream
*
theFile
();
// ostream& operator<<( ostream& out,const rtl::OUString& bla )
// {
// out << bla.getLength() << endl;
// rtl::OString bluber = rtl::OString( bla.getStr(),bla.getLength(),RTL_TEXTENCODING_UTF8 );
// char* bluberChr = new char[ 1+bluber.getLength() ];
// const sal_Char* jux = bluber.getStr();
// for( int i = 0; i < bluber.getLength(); ++i )
// bluberChr[i] = jux[i];
// bluberChr[ bluber.getLength() ] = 0;
// return out << bluberChr;
// }
extern
void
bla
();
extern
void
blu
();
int
main
(
int
argc
,
char
*
argv
[]
)
{
QueryResults
*
queryResults
=
0
;
try
{
rtl
::
OUString
installDir
=
rtl
::
OUString
::
createFromAscii
(
"//./home/ab106281/work/index"
);
QueryProcessor
queryProcessor
(
installDir
);
std
::
vector
<
rtl
::
OUString
>
Query
(
1
);
Query
[
0
]
=
(
rtl
::
OUString
::
createFromAscii
(
"text*"
)
);
rtl
::
OUString
Scope
=
rtl
::
OUString
::
createFromAscii
(
""
);
int
HitCount
=
100
;
QueryStatement
queryStatement
(
HitCount
,
Query
,
Scope
);
queryResults
=
queryProcessor
.
processQuery
(
queryStatement
);
rtl
::
OUString
translations
[
2
];
translations
[
0
]
=
rtl
::
OUString
::
createFromAscii
(
"#HLP#"
);
translations
[
1
]
=
rtl
::
OUString
::
createFromAscii
(
"vnd.sun.star.help://"
);
PrefixTranslator
*
translator
=
PrefixTranslator
::
makePrefixTranslator
(
translations
,
2
);
QueryHitIterator
*
it
=
queryResults
->
makeQueryHitIterator
();
while
(
it
->
next
()
)
;
// cout << it->getHit( translator )->getDocument() << endl;
delete
it
;
}
catch
(
...
)
{
}
return
0
;
}
// This is the main line of programming
// Indexccessor indexAcc( rtl::OUString::createFromAscii( "/home/ab106281/work/index" ) );
// Schema schema( indexAcc,false );
// BtreeDictParameters params( schema,
// rtl::OUString::createFromAscii( "DICTIONARY" ) );
// blu();
// std::vector< rtl::OUString > terms( 1 );
// terms[0] = rtl::OUString::createFromAscii( "text" );
// QueryStatement statement( 100,terms,rtl::OUString::createFromAscii( "" ) );
// QueryProcessor queryProcessor( 0 );
// QueryResults* results = queryProcessor.processQuery( statement );
// rtl::OString bluber = rtl::OString( bla.getStr(),bla.getLength(),RTL_TEXTENCODING_UTF8 );
// cout << bluber.getStr() << endl;
/*
public static void main(String[] args) {
try {
Schema schema = new Schema( new IndexAccessor( args[0] ), false);
BtreeDictParameters params = new BtreeDictParameters(schema, "DICTIONARY");
BtreeDict source = new BtreeDict(params);
source.test();
}
catch (Exception e) {
System.err.println(e);
e.printStackTrace();
}
}
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment