summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguest <guest@f059d3a0-6783-47b7-97ff-1fe0bbf25129>2008-10-16 15:42:22 +0000
committerguest <guest@f059d3a0-6783-47b7-97ff-1fe0bbf25129>2008-10-16 15:42:22 +0000
commit62d1c9e1ef2a8ccf090759b44b5101a8f24c7a70 (patch)
tree101f06404971c42c7c8175b07af13d2390af66c7
parent3302ba62a4160ee9a430bb44cadfde44483e572c (diff)
included yalpindexer in ant build script
git-svn-id: http://manut.eu/svn/yalp/trunk@17 f059d3a0-6783-47b7-97ff-1fe0bbf25129
-rw-r--r--build.xml21
-rw-r--r--src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/Browser.java12
-rw-r--r--src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileBrowser.java22
-rw-r--r--src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileInfoManager.java14
-rw-r--r--src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/YalpPGSQLIndexer.java8
5 files changed, 34 insertions, 43 deletions
diff --git a/build.xml b/build.xml
index 24f0fe1..abe42b2 100644
--- a/build.xml
+++ b/build.xml
@@ -8,7 +8,7 @@
<property name="srcAuth" value="src/YalpAuth"/>
<property name="srcServer" value="src/YalpServer"/>
<property name="srcClients" value="src/YalpClients"/>
-
+ <property name="srcPgSqlInputIndexer" value="${srcInputs}/YalpPGSqlInput/YalpPGSQLIndexer"/>
<property name="srcVlcTelnetOutput" value="${srcOutputs}/YalpVlcTelnetOutput"/>
<property name="srcPGSqlInput" value="${srcInputs}/YalpPGSqlInput"/>
<property name="srcPGSqlAuth" value="${srcAuth}/YalpPGSqlAuth"/>
@@ -26,6 +26,7 @@
<property name="log4jLibs" value="lib/log4j-1.2.15.jar"/>
<property name="vlctelnetLibs" value="lib/commons-net-1.4.1.jar"/>
<property name="swtLibs" value="/usr/share/swt-3/lib/swt.jar /usr/lib/java/swt.jar"/>
+ <property name="indexerLibs" value="lib/yajil-0.3.3.jar"/>
<property name="dbLibs" value="lib/postgresql-8.1-404.jdbc3.jar"/>
<property name="idlj" value="../idlj.sh"/>
@@ -37,7 +38,7 @@
<pathelement path="${additional.path}"/>
</path>
- <target name="all" depends="vlctelnetoutput, pgsqlinput, pgsqlauth, server, swtclient" description="builds server and client">
+ <target name="all" depends="vlctelnetoutput, pgsqlinput, pgsqlindexer, pgsqlauth, server, swtclient" description="builds server and client">
<echo>Doing all</echo>
</target>
@@ -104,6 +105,22 @@
</jar>
</target>
+ <target name="pgsqlindexer" description="indexer for pgsqlinputplugin">
+ <javac debug="true" srcdir="${srcPgSqlInputIndexer}" destdir="${build}/indexer"/>
+ <jar destfile="yalpPGSqlIndexer.jar" basedir="${build}">
+ <path id="project.class.path">
+ <pathelement location="${lib}"/>
+ <pathelement path="${java.class.path}"/>
+ <pathelement path="${additional.path}"/>
+ </path>
+ <manifest>
+ <attribute name="Built-By" value="${user.name}"/>
+ <attribute name="Main-Class" value="YalpInputs.YalpPGSqlInput.YalpPGSQLIndexer.YalpPGSQLIndexer"/>
+ <attribute name="Class-Path" value="${indexerLibs}"/>
+ </manifest>
+ </jar>
+ </target>
+
<target name ="auth" description="builds auth base files">
<javac debug="true" srcdir="${srcAuth}" destdir="${build}"/>
</target>
diff --git a/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/Browser.java b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/Browser.java
index 2b2e65a..4ab592f 100644
--- a/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/Browser.java
+++ b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/Browser.java
@@ -6,7 +6,6 @@
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: Manuel Traut and Volker Dahnke
- */
package YalpClients.SwtClient.GUI;
@@ -24,7 +23,6 @@ import org.eclipse.swt.widgets.*;
import java.util.LinkedList;
-/*
* Class Browser
*
* <em></em>
@@ -32,7 +30,7 @@ import java.util.LinkedList;
* @author Volker Dahnke / Manuel Traut
*
* @version 1 02-04-2006<br>
- */
+
public class Browser extends Composite{
private Composite parentComposite;
private Display display1;
@@ -73,14 +71,14 @@ public class Browser extends Composite{
this.tree.setLayoutData(treeGrid);
TreeItem tmp;
- /*
+
for(YalpFile aFile : model.getDir("/")){
tmp = new TreeItem(this.tree, SWT.NULL);
tmp.setText(aFile.name);
if(aFile.isDir) tmp.setImage(new Image(display1, "folder.gif"));
else tmp.setImage(new Image(display1, "yalpV2_klein.gif"));
}
- */
+
this.tree.addSelectionListener (
new SelectionAdapter() {
@@ -89,7 +87,7 @@ public class Browser extends Composite{
if(!alreadyBrowsed.contains(path)){
alreadyBrowsed.add(path);
TreeItem tmp;
- /*
+
for(YalpFile aFile : model.getDir(path)){
tmp = new TreeItem(tree.getSelection()[0],SWT.NULL);
tmp.setText(aFile.name);
@@ -97,7 +95,6 @@ public class Browser extends Composite{
else tmp.setImage(new Image(display1, "yalpV2_klein.gif"));
tmp.getParentItem().setExpanded(true);
}
- */
}
}
}
@@ -158,3 +155,4 @@ public class Browser extends Composite{
parentComposite.setEnabled(bool);
}
}
+*/
diff --git a/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileBrowser.java b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileBrowser.java
index 2f2a3a5..d622eec 100644
--- a/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileBrowser.java
+++ b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileBrowser.java
@@ -6,7 +6,6 @@
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: Manuel Traut and Volker Dahnke
- */
package YalpServer;
@@ -16,7 +15,6 @@ import java.io.Serializable;
import YalpInterfaces.*;
-/*
* Class FileBrowser
*
* <em>each Admin Client has his own FileBrowser, to browse through the
@@ -27,7 +25,6 @@ import YalpInterfaces.*;
* @version 0.6 14-12-2005<br>
*
* @see client.GUI.Browser
- */
public class FileBrowser {
@@ -36,10 +33,8 @@ public class FileBrowser {
private String userName;
private ArrayList<YalpFile> fileList;
- /* t.b.d. add some more types */
private String[] extensions = {".mp3",".mpg",".mpeg",".avi"};
-/*
* Constructor starts Browsing in startDir
*
* @param startdir
@@ -48,7 +43,6 @@ public class FileBrowser {
* of the Browser (IP of the Client)
* @param userName
* of the Admin using this browser
- */
public FileBrowser(String startdir, String owner,String userName) {
this.owner = owner;
@@ -58,47 +52,39 @@ public class FileBrowser {
this.fileList = new ArrayList<YalpFile>();
}
-/*
* returns owner of the browser
*
* @return String
* owner
- */
public String getOwner(){
return this.owner;
}
-/*
* returns user of the browser
*
* @return String
* user
- */
public String getUserName(){
return this.userName;
}
-/*
* returns list of all files in actual Folder
* (none recursive)
*
* @return ArrayList<YalpFile>
* list of all files
- */
public ArrayList<YalpFile> getFiles(){
return this.fileList;
}
-/*
* returns list of all files in actual Folder
* (recursive)
*
* @return ArrayList<YalpFile>
* list of all files
- */
public ArrayList<File> findAll() {
@@ -109,12 +95,10 @@ public class FileBrowser {
return ff.getFiles();
}
-/*
* change actual Folder
*
* @param dirName
* String dir to change to
- */
public void changeDir(String dirName) {
@@ -123,7 +107,6 @@ public class FileBrowser {
if(actualFile.isDirectory()) {
for ( File aFile : this.actualFile.listFiles() ) {
- /* add to fileList if extension is allowed or File is a Directory */
if (match(aFile.getName(), extensions) || aFile.isDirectory())
{
YalpFile tmp = new YalpFile();
@@ -136,11 +119,9 @@ public class FileBrowser {
}
}
-/*
* prints current directory out to console
*
* (for debugging)
- */
public void printActualDir(){
for(YalpFile one : this.fileList){
@@ -150,7 +131,6 @@ public class FileBrowser {
}
}
-/*
* checks if file extension matches or not
*
* @param s
@@ -159,7 +139,6 @@ public class FileBrowser {
* Array of allowed Extensions
* @return boolean
* true if yalp can handle this extension, else false
- */
private static boolean match( String s, String suffixes[] ) {
for ( String suffix : suffixes ) {
@@ -173,3 +152,4 @@ public class FileBrowser {
return false;
}
}
+*/
diff --git a/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileInfoManager.java b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileInfoManager.java
index 34fe49b..47dd62a 100644
--- a/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileInfoManager.java
+++ b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/FileInfoManager.java
@@ -6,7 +6,6 @@
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: Manuel Traut and Volker Dahnke
- */
package YalpServer;
@@ -18,7 +17,6 @@ import de.hampelratte.id3.*;
import YalpInterfaces.*;
-/*
* Class FileInfoManager
*
* <em>Creates a Result out of FileInformations (ID3, etc)</em>
@@ -28,18 +26,15 @@ import YalpInterfaces.*;
* @version 0.1 14-12-2005<br>
*
* @see ServerControl
- */
public class FileInfoManager {
private Media fileInfo;
private EncodingType eType;
-/*
* Constructor: tries to get all Informations about a file
*
* @param file
- */
public FileInfoManager(File file) {
@@ -48,7 +43,6 @@ public class FileInfoManager {
this.fileInfo.path = file.getParent()+file.separator;
this.fileInfo.fileName = file.getName();
- /* check extensions is mp3 */
if( this.fileInfo.fileName.substring( this.fileInfo.fileName.length() - 3,
this.fileInfo.fileName.length()).equalsIgnoreCase( "mp3" ) )
{
@@ -59,31 +53,26 @@ public class FileInfoManager {
case EncodingType._MP3:
try
{
- /* opening mp3 file for reading and writing */
MP3File mp3 = new de.hampelratte.id3.MP3File(file.toString(), "r");
this.fileInfo.type = MediaType.SOUND;
if(mp3.hasID3v1Tag){
ID3v1Tag tag = mp3.readID3v1Tag();
- /* t.b.d. create StringProperties
this.fileInfo.album = tag.getAlbum();
this.fileInfo.author = tag.getArtist();
this.fileInfo.category = tag.getGenre();
this.fileInfo.name = tag.getTrack() +" - "+tag.getTitle();
this.fileInfo.year = tag.getYear();
- */
}
if(mp3.hasID3v2Tag){
// reading the ID3v2Tag
ID3v2Tag tag = mp3.readID3v2Tag();
- /* t.b.d. create StringProperties
this.fileInfo.album = tag.getAlbum();
this.fileInfo.author = tag.getArtist();
this.fileInfo.category = tag.getGenre();
this.fileInfo.year = tag.getYear();
- */
if( !(tag.getTrack().equals(""))){
this.fileInfo.name = tag.getTrack() +" - "+tag.getTitle();
} else {
@@ -114,13 +103,12 @@ public class FileInfoManager {
}
}
-/*
* returns the information to an media, found
* @return MediaChange
* Informations about the media
- */
public Media getInfo(){
return this.fileInfo;
}
}
+*/
diff --git a/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/YalpPGSQLIndexer.java b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/YalpPGSQLIndexer.java
new file mode 100644
index 0000000..c5cedaa
--- /dev/null
+++ b/src/YalpInputs/YalpPGSqlInput/YalpPGSQLIndexer/YalpPGSQLIndexer.java
@@ -0,0 +1,8 @@
+package YalpInputs.YalpPGSqlInput.YalpPGSQLIndexer;
+
+class YalpPGSQLIndexer {
+
+ public static void main(String args[]) {
+ System.out.println("YalpPGSQLIndexer");
+ }
+};