Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite2e84a1

Browse files
author
Peter Mount
committed
First batch of the tools merged in...
1 parent5bbad66 commite2e84a1

31 files changed

+3526
-9
lines changed

‎contrib/retep/CHANGELOG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
Fri Mar 02 16:08:00 GMT 2001 peter@retep.org.uk
2+
- Started importing in the rest of the retep tools.
3+
14
Tue Jan 23 10:19:00 GMT 2001 peter@retep.org.uk
2-
- Finished the XML Export classes
5+
- Finished the XML Export classes
36
- First of the test data suite now in CVS.
47

‎contrib/retep/Implementation

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
Retep Tools Implementation
2+
--------------------------
3+
4+
5+
The tools are designed to be put into a single jar file, but each one is
6+
executable either individually or part of one single application.
7+
8+
To run the big application, you can either:
9+
10+
java -jar retepTools.jar
11+
12+
or with the retepTools.jar in the classpath run:
13+
14+
java uk.org.retep.tools.Main
15+
16+
Windows users: For you you can also double click the retepTools.jar as windows
17+
will automatically run javac for you.
18+
19+
To run the individual tools, you must have the .jar file in your classpath and
20+
then run the relevant Main class.
21+
22+
Tool Type Class
23+
------------------------------------------------------------------------------
24+
pg_hba.conf Editor/repairer Editor uk.org.retep.util.hba.Main
25+
Properties Editor Editor uk.org.retep.util.proped.Main
26+
27+
28+
Layout of the classes
29+
---------------------
30+
31+
Simply, tools that work on property files (Java properties, resource files,
32+
configuration settings - pg_hba.conf for example) go under uk.org.retep.util in
33+
their own package. Other utility classes (like PropertyIO) go in to the
34+
uk.org.retep.util.misc package except for certain ones where they are related.
35+
36+
ie: TableModels. In swing you have JTable which uses a TableModel to display
37+
(and possibly update) some data. These go under uk.org.retep.util.models where
38+
you will find PropertiesTableModel for example. This one allows a Properties
39+
object to be displayed & updated.
40+
41+
Come core classes like Logger, ExceptionDialog etc go into the main
42+
uk.org.retep.util package.
43+
44+
Directory/Package Contents
45+
------------------------------------------------------------------------------
46+
uk.org.retep Home of the tools.properties file
47+
uk.org.retep.tools The main all-in-one application
48+
uk.org.retep.dtu The Data Transform Unit
49+
uk.org.retep.util Core utility classes
50+
uk.org.retep.util.hba pg_hba.conf editor/repairer
51+
uk.org.retep.util.misc Misc utility classes
52+
uk.org.retep.util.models Swing table models
53+
uk.org.retep.util.proped Property Editor
54+
uk.org.retep.util.xml.core Basic XML Factory
55+
uk.org.retep.util.xml.jdbc JDBC/XML interface
56+
uk.org.retep.util.xml.parser Simple SAX parser
57+
58+
Structure of a tool
59+
-------------------
60+
61+
Each tool has at least 2 base classes, and an entry in the tools.properties
62+
file. For this example, I'll show you the Properties Editor:
63+
64+
Base package uk.org.retep.util.proped
65+
Main tool class uk.org.retep.util.proped.PropertyEditor
66+
Standalone class uk.org.retep.util.proped.Main
67+
68+
The main tool class is the entry point used by the main application. Because
69+
they are used in a GUI, this class must extend javax.swing.JComponent and
70+
implement the uk.org.retep.tools.Tool interface. (NB: You will find I always
71+
use JPanel, but JComponent is used here so that any swing class can be used
72+
you are not limited to JPanel.)
73+
74+
The standalone class is a basic static class that implements the main method.
75+
It should extend the uk.org.retep.misc.StandaloneApp class and be written along
76+
the lines of the following example:
77+
78+
import uk.org.retep.util.StandaloneApp;
79+
import javax.swing.JComponent;
80+
81+
public class Main extends StandaloneApp
82+
{
83+
public Main(String[] args)
84+
throws Exception
85+
{
86+
super(args);
87+
}
88+
89+
public JComponent init()
90+
throws Exception
91+
{
92+
// Your initialisation here. In this case the PropertyEditor
93+
PropertyEditor panel = new PropertyEditor();
94+
95+
// do stuff here, ie load a file if supplied
96+
97+
// return the tool
98+
return panel;
99+
}
100+
101+
public static void main(String[] args)
102+
throws Exception
103+
{
104+
Main main = new Main(args);
105+
main.pack();
106+
main.setVisible(true);
107+
}
108+
}
109+
110+
you will find a template in the uk.org.retep.util.Main class. Simply copy this
111+
classes source, as it gives you the basic stub. Just add your own implementation
112+
if init() like the one above. Look at the full Main class for the
113+
PropertiesEditor to see how to get at the command line args.
114+
115+
By convention, the standalone class is named Main.
116+

‎contrib/retep/README

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Before you ask what retepTools are, they are my personal suite of utilities.
2+
About 90% of them are JDBC related (either they use JDBC, or I use them in
3+
developing the JDBC driver).
4+
5+
Now, because of various reasons I won't go into now, in January 2001 I decided
6+
to release the entire lot to the public. I could have used something like
7+
SourceForge, but as they are mainly JDBC related I thought here is the best
8+
place.
9+
10+
Now all (bar retepPDF, see end-note) will over the next few months be going
11+
into the /contrib/retep directory. They range from simple XML Inport/Export
12+
classes to entire sub-systems that can be plugged into applications.
13+
14+
All this lot were never released, so I'm placing them under PostgreSQL's
15+
licence.
16+
17+
Please refer to Implementation for details of what package does what.
18+
19+
It all requires Java2SE (JDK1.2) as a minimum. I do have some plans for some
20+
EJB tools later, so those will need Java2EE, but not yet ;-)
21+
22+
Peter Mount
23+
peter@retep.org.uk
24+
March 2 2001
25+
26+
retepPDF: This is not included for two reasons:
27+
28+
1: It's big and not really related in any way to PostgreSQL
29+
2: More importantly, I (may be foolishly) released it some 3 years ago under
30+
the LGPL. As a few people have added to it, it's not really possible to
31+
change the licence, and I don't want to polute PostgreSQL's source tree ;-)
32+
33+
retepGraph: This was an old graphics library. It's been obsolete for 3 years
34+
now, so it's not going in.
35+

‎contrib/retep/build.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
build file to build the donated retep tools packages
44
5-
$Id: build.xml,v 1.2 2001/01/23 10:22:18 peter Exp $
5+
$Id: build.xml,v 1.3 2001/03/05 09:15:35 peter Exp $
66
77
-->
88

@@ -35,16 +35,16 @@
3535
</target>
3636

3737
<!-- Builds the XML Tools-->
38-
<targetname="xml"depends="checks,prepare"if="xml">
38+
<targetname="compile"depends="checks,prepare">
3939
<javacsrcdir="${src}"destdir="${dest}">
40-
<includename="${package}/xml/**" />
40+
<includename="${package}/**" />
4141
</javac>
4242
</target>
4343

4444
<!-- Builds the various jar files-->
45-
<targetname="jar"depends="xml">
45+
<targetname="jar"depends="compile">
4646
<jarjarfile="${jars}/retepTools.jar"basedir="${dest}">
47-
<includename="${package}/xml/**"if="xml" />
47+
<includename="${package}/**" />
4848
</jar>
4949
</target>
5050

‎contrib/retep/retep.jpx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<project>
55
<propertycategory="idl"name="ProcessIDL"value="false" />
66
<propertycategory="runtime.0"name="RunnableType"value="com.borland.jbuilder.runtime.ApplicationRunner" />
7+
<propertycategory="runtime.0"name="application.class"value="uk.org.retep.util.hba.Main" />
8+
<propertycategory="runtime.0"name="application.parameters"value="-d2 pg_hba.conf" />
9+
<propertycategory="runtime.0"name="appserver.ejbJarsSaved"value="1" />
10+
<propertycategory="runtime.0"name="appserver.parameters"value="-jts -jns -jss -jdb" />
11+
<propertycategory="runtime.0"name="appserver.servername"value="ejbcontainer" />
12+
<propertycategory="runtime.0"name="appserver.vmparameters"value="" />
713
<propertycategory="runtime.0"name="jsprunner.docbase"value="." />
814
<propertycategory="runtime.0"name="jsprunner.jspfile"value="E%|/docs/java/xml/example6" />
915
<propertycategory="sys"name="AuthorLabel"value="@author" />
@@ -15,7 +21,7 @@
1521
<propertycategory="sys"name="CompanyLabel"value="Company:" />
1622
<propertycategory="sys"name="Copyright"value="Copyright (c) 2001" />
1723
<propertycategory="sys"name="CopyrightLabel"value="Copyright:" />
18-
<propertycategory="sys"name="DefaultPackage"value="uk.org.retep.xml.jdbc" />
24+
<propertycategory="sys"name="DefaultPackage"value="uk.org.retep.util.misc" />
1925
<propertycategory="sys"name="Description"value="" />
2026
<propertycategory="sys"name="DescriptionLabel"value="Description:" />
2127
<propertycategory="sys"name="DocPath"value="doc" />
@@ -25,7 +31,7 @@
2531
<propertycategory="sys"name="InstanceVisibility"value="0" />
2632
<propertycategory="sys"name="JDK"value="java 1.3.0-C" />
2733
<propertycategory="sys"name="LastTag"value="0" />
28-
<propertycategory="sys"name="Libraries"value="JAXP;Oracle JDBC" />
34+
<propertycategory="sys"name="Libraries"value="JAXP;Oracle JDBC;JDK1.3 JRE" />
2935
<propertycategory="sys"name="MakeStable"value="0" />
3036
<propertycategory="sys"name="OutPath"value="build" />
3137
<propertycategory="sys"name="SourcePath"value="." />
@@ -34,13 +40,17 @@
3440
<propertycategory="sys"name="Version"value="1.0" />
3541
<propertycategory="sys"name="VersionLabel"value="@version" />
3642
<propertycategory="sys"name="WorkingDirectory"value="." />
37-
<nodetype="Folder"name="core" />
43+
<nodetype="Package"name="uk.org.retep.app" />
44+
<nodetype="Package"name="uk.org.retep.dtu" />
45+
<nodetype="Package"name="uk.org.retep.tools" />
46+
<nodetype="Package"name="uk.org.retep.util" />
3847
<nodetype="Package"name="uk.org.retep.xml.core" />
3948
<nodetype="Package"name="uk.org.retep.xml.jdbc" />
4049
<nodetype="Package"name="uk.org.retep.xml.parser" />
4150
<filepath="build.xml" />
4251
<filepath="CHANGELOG" />
4352
<filepath="Implementation" />
53+
<filepath="uk/org/retep/util/models/PropertiesTableModel.java" />
4454
<filepath="README" />
4555
</project>
4656

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp