summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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
4 files changed, 15 insertions, 41 deletions
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");
+ }
+};