Mercurial > hg > de.mpg.mpiwg.itgroup.digilib.core
view src/de/mpg/mpiwg/itgroup/digilib/plugin/editors/DigilibLinkEditorInput.java @ 32:d7a43156a79b default tip
new tabs
author | dwinter |
---|---|
date | Mon, 10 Oct 2011 17:52:22 +0200 |
parents | f2e1827b97d7 |
children |
line wrap: on
line source
package de.mpg.mpiwg.itgroup.digilib.plugin.editors; import java.net.URI; 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.core.plugin.editors.DigilibLinkEditorPart} * @author dwinter * */ public class DigilibLinkEditorInput implements IEditorInput { private IFile file; public static int INDEX_META=0; public static int TEXTGRID=1; private int type; private URI uri; private String sid; private String name; private String toolTipText; public URI getUri() { return uri; } public void setUri(URI uri) { this.uri = uri; } /** * @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; this.name=file.getName(); this.toolTipText=file.getFullPath().toOSString(); setType(type); } public DigilibLinkEditorInput(URI textGridUri, String sid,int type) { this.file= null; this.name=textGridUri.toASCIIString(); //TODO: get real name from Metadata this.toolTipText=textGridUri.toASCIIString(); //TODO: get real name from Metadata this.uri = textGridUri; this.setSid(sid); setType(type); } @SuppressWarnings("rawtypes") 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() { return name; } public IPersistableElement getPersistable() { // TODO Auto-generated method stub return null; } public String getToolTipText() { return toolTipText; } public void setSid(String sid) { this.sid = sid; } public String getSid() { return sid; } }