view src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorInput.java @ 9:e63a64652f4d

added comments
author dwinter
date Mon, 03 Jan 2011 16:53:48 +0100
parents 83c58ea33792
children 1a7940ac5169
line wrap: on
line source

package de.mpg.mpiwg.itgroup.digilib.plugin.editors;

import org.eclipse.core.resources.IFile;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

/**
 * Editor input for {@link de.mpg.mpiwg.itgroup.digilib.plugin.editors.DigilibLinkEditorPart}
 * @author dwinter
 *
 */
public class DigilibLinkEditorInput implements IEditorInput {

	private IFile file;
	public static int INDEX_META=0;
	private int type;

	/**
	 * @return
	 */
	public IFile getFile() {
		return file;
	}

	public void setFile(IFile indexMetaFile) {
		this.file = indexMetaFile;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	/**
	 *
	 * @param file File to be worked with
	 * @param type currently only @see {{@value #INDEX_META}, file has to be an index.meta file following the 
	 * standards of the MPIWG
	 *
	 */
	public DigilibLinkEditorInput(IFile file, int type) {
		this.file = file;
		setType(type);
	}

	public Object getAdapter(Class adapter) {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean exists() {
		// TODO Auto-generated method stub
		return false;
	}

	public ImageDescriptor getImageDescriptor() {
		// TODO Auto-generated method stub
		return null;
	}

	public String getName() {
		
		String name = file.getName();
		return name;
	}

	public IPersistableElement getPersistable() {
		// TODO Auto-generated method stub
		return null;
	}

	public String getToolTipText() {
		
		return file.getFullPath().toOSString();
	}

}