db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
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
Date Sat, 19 Mar 2005 00:37:29 GMT
Author: mbo
Date: Fri Mar 18 16:37:28 2005
New Revision: 158170

URL: http://svn.apache.org/viewcvs?view=rev&rev=158170
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=auto&rev=158170
==============================================================================
--- incubator/jdo/trunk/btree/maven.xml (added)
+++ incubator/jdo/trunk/btree/maven.xml Fri Mar 18 16:37:28 2005
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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 implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<project default="default"
+    xmlns:j="jelly:core"
+    xmlns:ant="jelly:ant"
+    xmlns:maven="jelly:maven"
+    >
+
+    <!-- ==================== -->
+    <!-- Default Global Goals -->
+    <!-- ==================== -->
+
+    <goal name="default">
+        <attainGoal name="jar:install"/>
+    </goal>
+
+    <goal name="build">
+        <attainGoal name="default"/>
+    </goal>
+
+    <goal name="rebuild">
+        <attainGoal name="clean"/>
+        <attainGoal name="build"/>
+    </goal>
+
+    <goal name="clobber">
+        <attainGoal name="clean"/>
+        <delete dir="mdr" includeEmptyDirs="true"/>
+    </goal>
+
+    <!-- Checkout btree sources from nebeans repository -->
+    <preGoal name="java:prepare-filesystem">
+        <echo>Using cvsroot ${netbeans.cvsroot}</echo>
+        <cvs cvsRoot="${netbeans.cvsroot}"
+             command="checkout -l ${netbeans.cvs.tag}"
+             package="mdr/src/org/netbeans/mdr/persistence"/>
+        <cvs cvsRoot="${netbeans.cvsroot}"
+             command="checkout ${netbeans.cvs.tag}"
+	     package="mdr/src/org/netbeans/mdr/persistence/btreeimpl"/>
+        <cvs cvsRoot="${netbeans.cvsroot}"
+             command="checkout ${netbeans.cvs.tag}"
+	     package="mdr/src/org/netbeans/mdr/util/MapEntryImpl.java"/>
+    </preGoal>
+
+    <!-- Need multiple source diretories: --> 
+    <!--   mdr - the netbeans sources     -->
+    <!--   src - local source files       -->
+    <preGoal name="java:compile">
+       <ant:path id="mdr.src" location="${basedir}/mdr/src"/>
+       <maven:addPath id="maven.compile.src.set" refid="mdr.src"/>
+    </preGoal>
+
+</project>

Added: incubator/jdo/trunk/btree/project.properties
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/btree/project.properties?view=auto&rev=158170
==============================================================================
--- 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 implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#
+
+# The cvsroot of the netbeans repository. 
+# 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 
+# http://www.netbeans.org/community/sources for more info. 
+# If you are inside SWAN you can use a proxy cvsnetbeansorg.sfbay.sun.com.
+
+netbeans.cvsroot=:pserver:anoncvs@cvs.netbeans.org:/cvs
+# SWAN proxy
+#netbeans.cvsroot=:pserver:anoncvs@cvsnetbeansorg.sfbay.sun.com:/cvs
+
+# We need btree sources that compile with -target 1.3, 
+# so use a specific btree version
+netbeans.cvs.tag=-r release36-BLD200409100900
+

Added: incubator/jdo/trunk/btree/project.xml
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/btree/project.xml?view=auto&rev=158170
==============================================================================
--- incubator/jdo/trunk/btree/project.xml (added)
+++ incubator/jdo/trunk/btree/project.xml Fri Mar 18 16:37:28 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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 implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project>
+    <pomVersion>3</pomVersion>
+    <extend>../project.xml</extend>
+    <!-- ============== -->
+    <!-- Identification -->
+    <!-- ============== -->
+    <name>Binary Tree for FOStore JDO</name>
+    <artifactId>jdo-btree</artifactId>
+    <currentVersion>1.1</currentVersion>
+    <package>org.netbeans.mdr</package>
+    <shortDescription>Binary Tree for FOStore JDO</shortDescription>
+    <description>This project takes the Netbeans mdr btree implementation and provides
it as a library.</description>
+    <repository />
+    <!-- ============ -->
+    <!-- Dependencies -->
+    <!-- ============ -->
+    <!-- =================== -->
+    <!-- Build Specification -->
+    <!-- =================== -->
+    <build>
+        <sourceDirectory>src/java</sourceDirectory>
+    </build>
+</project>
+

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/netbeans/mdr/util/Logger.java?view=auto&rev=158170
==============================================================================
--- incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/util/Logger.java (added)
+++ incubator/jdo/trunk/btree/src/java/org/netbeans/mdr/util/Logger.java Fri Mar 18 16:37:28
2005
@@ -0,0 +1,90 @@
+/*
+ * 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 implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+package org.netbeans.mdr.util;
+
+import java.io.PrintStream;
+
+/** 
+ * Logger utility.
+ * 
+ * This class replaces the implementation of the Logger class in package 
+ * org.netbeans.mdr.util from the NetBeans open source mdr project. 
+ * The NetBeans implemenation uses a non-mdr class
+ * (org.openide.ErrorManager). This imposes a dependency on other NetBeans 
+ * modules which makes it harder to use the btree implemenatation as a
+ * library. 
+ * 
+ * @author Michael Bouschen
+ */
+public class Logger {
+
+    /** */
+    public static final int INFORMATIONAL = 0x00000001;
+    public static final int WARNING = 0x00000010;
+    public static final int USER = 0x00000100;
+    public static final int EXCEPTION = 0x00001000;
+    public static final int ERROR = 0x00010000;
+
+    /** */
+    public static final PrintStream out = System.out;
+    
+    /** */
+    private static final Logger logger = new Logger();
+    
+
+    /** The name of the boolean system property to enable btree logging. */
+    public static final String VERBOSE_PROPERTY = 
+        "org.netbeans.mdr.persistence.verbose";
+
+    /** */
+    private boolean verbose;
+
+    /** */
+    public static Logger getDefault() {
+        return logger;
+    }
+
+    /** */
+    protected Logger() {
+        verbose = Boolean.getBoolean(VERBOSE_PROPERTY);
+    }
+
+    /** */
+    public void notify(int level, Exception e) {
+        if (verbose && (e != null))
+            log(e.toString());
+    }
+    
+    /** */
+    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;
+    }
+}



Mime
View raw message