From jdo-commits-return-160-apmail-db-jdo-commits-archive=www.apache.org@db.apache.org Sat Mar 19 04:58:29 2005 Return-Path: Delivered-To: apmail-db-jdo-commits-archive@www.apache.org Received: (qmail 79895 invoked from network); 19 Mar 2005 04:58:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Mar 2005 04:58:29 -0000 Received: (qmail 81270 invoked by uid 500); 19 Mar 2005 04:58:28 -0000 Mailing-List: contact jdo-commits-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-commits@db.apache.org Delivered-To: moderator for jdo-commits@db.apache.org Received: (qmail 61980 invoked by uid 99); 19 Mar 2005 00:37:31 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Message-ID: <20050319003730.17046.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Sat, 19 Mar 2005 00:37:29 -0000 Subject: svn commit: r158170 - in incubator/jdo/trunk/btree: ./ maven.xml project.properties project.xml src/ src/java/ src/java/org/ src/java/org/netbeans/ src/java/org/netbeans/mdr/ src/java/org/netbeans/mdr/util/ src/java/org/netbeans/mdr/util/Logger.java To: jdo-commits@db.apache.org From: mbo@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: mbo Date: Fri Mar 18 16:37:28 2005 New Revision: 158170 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D158170 Log: btree subproject Added: incubator/jdo/trunk/btree/ incubator/jdo/trunk/btree/maven.xml incubator/jdo/trunk/btree/project.properties incubator/jdo/trunk/btree/project.xml incubator/jdo/trunk/btree/src/ incubator/jdo/trunk/btree/src/java/ incubator/jdo/trunk/btree/src/java/org/ incubator/jdo/trunk/btree/src/java/org/netbeans/ incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/ incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/util/ incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/util/Logger.java Added: incubator/jdo/trunk/btree/maven.xml URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/btree/maven.xml?view= =3Dauto&rev=3D158170 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jdo/trunk/btree/maven.xml (added) +++ incubator/jdo/trunk/btree/maven.xml Fri Mar 18 16:37:28 2005 @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Using cvsroot ${netbeans.cvsroot} + + + + + + =20 + + + + + + + + Added: incubator/jdo/trunk/btree/project.properties URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/btree/project.proper= ties?view=3Dauto&rev=3D158170 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jdo/trunk/btree/project.properties (added) +++ incubator/jdo/trunk/btree/project.properties Fri Mar 18 16:37:28 2005 @@ -0,0 +1,30 @@ +# +# Copyright 2005 The Apache Software Foundation +# +# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implie= d=2E +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# The cvsroot of the netbeans repository.=20 +# The official netbeans cvs host is cvs.netbeans.org. This might not work = if you +# are behind a firewall that blocks the cvs port. Please consult=20 +# http://www.netbeans.org/community/sources for more info.=20 +# If you are inside SWAN you can use a proxy cvsnetbeansorg.sfbay.sun.com. + +netbeans.cvsroot=3D:pserver:anoncvs@cvs.netbeans.org:/cvs +# SWAN proxy +#netbeans.cvsroot=3D:pserver:anoncvs@cvsnetbeansorg.sfbay.sun.com:/cvs + +# We need btree sources that compile with -target 1.3,=20 +# so use a specific btree version +netbeans.cvs.tag=3D-r release36-BLD200409100900 + Added: incubator/jdo/trunk/btree/project.xml URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/btree/project.xml?vi= ew=3Dauto&rev=3D158170 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jdo/trunk/btree/project.xml (added) +++ incubator/jdo/trunk/btree/project.xml Fri Mar 18 16:37:28 2005 @@ -0,0 +1,42 @@ + + + + + 3 + ../project.xml + + + + Binary Tree for FOStore JDO + jdo-btree + 1.1 + org.netbeans.mdr + Binary Tree for FOStore JDO + This project takes the Netbeans mdr btree implementation = and provides it as a library. + + + + + + + + + src/java + + + Added: incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/util/Logger.java URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/btree/src/java/org/n= etbeans/mdr/util/Logger.java?view=3Dauto&rev=3D158170 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/util/Logger.java (a= dded) +++ incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/util/Logger.java Fr= i Mar 18 16:37:28 2005 @@ -0,0 +1,90 @@ +/* + * Copyright 2005 The Apache Software Foundation. + *=20 + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at=20 + *=20 + * http://www.apache.org/licenses/LICENSE-2.0 + *=20 + * Unless required by applicable law or agreed to in writing, software=20 + * distributed under the License is distributed on an "AS IS" BASIS,=20 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied= .=20 + * See the License for the specific language governing permissions and=20 + * limitations under the License. + */ +package org.netbeans.mdr.util; + +import java.io.PrintStream; + +/**=20 + * Logger utility. + *=20 + * This class replaces the implementation of the Logger class in package=20 + * org.netbeans.mdr.util from the NetBeans open source mdr project.=20 + * The NetBeans implemenation uses a non-mdr class + * (org.openide.ErrorManager). This imposes a dependency on other NetBeans=20 + * modules which makes it harder to use the btree implemenatation as a + * library.=20 + *=20 + * @author Michael Bouschen + */ +public class Logger { + + /** */ + public static final int INFORMATIONAL =3D 0x00000001; + public static final int WARNING =3D 0x00000010; + public static final int USER =3D 0x00000100; + public static final int EXCEPTION =3D 0x00001000; + public static final int ERROR =3D 0x00010000; + + /** */ + public static final PrintStream out =3D System.out; + =20 + /** */ + private static final Logger logger =3D new Logger(); + =20 + + /** The name of the boolean system property to enable btree logging. */ + public static final String VERBOSE_PROPERTY =3D=20 + "org.netbeans.mdr.persistence.verbose"; + + /** */ + private boolean verbose; + + /** */ + public static Logger getDefault() { + return logger; + } + + /** */ + protected Logger() { + verbose =3D Boolean.getBoolean(VERBOSE_PROPERTY); + } + + /** */ + public void notify(int level, Exception e) { + if (verbose && (e !=3D null)) + log(e.toString()); + } + =20 + /** */ + public void log(String msg) { + if (verbose) out.println(msg); + } + + /** */ + public void log(int severity, String msg) { + if (verbose) out.println(msg); + } + + /** */ + public final Throwable annotate(Throwable t, String localizedMessage) { + return t; + } + + /** */ + public final Throwable annotate(Throwable target, Throwable t) { + return target; + } +}