uk.ac.kcl.cch.jb.pliny.model
Class Resource

java.lang.Object
  extended byuk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
      extended byuk.ac.kcl.cch.rdb2java.dynData.BaseObject
          extended byuk.ac.kcl.cch.jb.pliny.model.Resource
All Implemented Interfaces:
IAuthorityListItem, ILoadableFromResultSet, INamedObject, IPropertyChangeObject
Direct Known Subclasses:
ImageResource, Note, PdfResource, VirtualResource

public class Resource
extends BaseObject
implements IAuthorityListItem, ILoadableFromResultSet, INamedObject


Nested Class Summary
 
Nested classes inherited from class uk.ac.kcl.cch.rdb2java.dynData.BaseObject
BaseObject.ListItemData
 
Field Summary
static String ATTRIBUTES_PROP
           
static String FAVOURITES_PROP
           
static String FULLNAME_PROP
           
static String IDENTIFIER_PROP
           
static String IDSTART_PROP
           
static String INITCHAR_PROP
           
protected static ResourceQuery myCache
           
static String MYDISPLAYEDITEMS_PROP
           
static String MYSOURCEROLES_PROP
           
static String MYSURROGATES_PROP
           
static String MYTARGETROLES_PROP
           
static String NAME_PROP
           
static String OBJECTTYPEKEY_PROP
           
protected  int resourceKey
           
 
Constructor Summary
Resource()
           
Resource(boolean realEmpty)
           
 
Method Summary
 void assignMyReferencesTo(int to)
           
 void assignMyReferencesTo(Resource assignee)
           
 void closeMyEditor(org.eclipse.ui.IWorkbenchPage page, boolean askSave)
           
 void deleteMe()
           
protected  void doInsert()
           
static String EditorInput2idString(org.eclipse.ui.IEditorInput editorInput)
           
static Resource find(ObjectType obj, org.eclipse.ui.IEditorInput input)
           
static Resource find(ObjectType obj, String idString)
           
 int getALID()
           
 String getALItem()
           
 String getAttributes()
           
 int getCurrentPage()
           
 FKReferenceList getFavourites()
           
 String getFullName()
           
 String getIdentifier()
           
 String getIdStart()
           
 String getInitChar()
           
static String getInitChar(String input)
           
static Resource getItem(int key)
           
protected  String getKeyName()
           
protected  Connection getMyConnection()
           
 FKReferenceList getMyDisplayedItems()
           
 FKReferenceList getMyPagedDisplayedItems()
           
 FKReferenceList getMySourceRoles()
           
 FKReferenceList getMySurrogates()
           
 FKReferenceList getMyTargetRoles()
           
 String getName()
           
 ObjectType getObjectType()
           
 int getObjectTypeKey()
           
 int getResourceKey()
           
static String getSelectEntities()
           
static String getSQLFrom()
           
static String getTableJoins()
           
protected  String getTableName()
           
 String getUrl()
           
static org.eclipse.ui.IEditorInput idString2EditorInput(String id)
           
 boolean isDeletable()
           
 boolean isFavourite()
           
 int loadFromResultSet(ResultSet rs)
           
 void openEditor(org.eclipse.ui.IWorkbenchPage page)
           
 void openEditor(org.eclipse.ui.IWorkbenchPage page, int pageNo)
           
 void reIntroduceMe()
           
protected  void returnMyConnection(Connection con)
           
 void setAttributes(String parm)
           
 void setCurrentPage(int currentPage)
           
protected  void setEmpty()
           
 void setFullName(String parm)
           
 void setIdentifier(String parm)
           
 void setIdentifiers(org.eclipse.ui.IEditorInput editorInput)
           
 void setIdentifiers(String id)
           
 void setIdStart(String parm)
           
 void setInitChar(String parm)
           
 void setName(String name)
           
 void setObjectType(ObjectType item)
           
 void signalChangeFavourites(Favourite oldItem, Favourite newItem)
           
 void signalChangeMyDisplayedItems(LinkableObject oldItem, LinkableObject newItem)
           
 void signalChangeMySourceRoles(LOType oldItem, LOType newItem)
           
 void signalChangeMySurrogates(LinkableObject oldItem, LinkableObject newItem)
           
 void signalChangeMyTargetRoles(LOType oldItem, LOType newItem)
           
 String toString()
           
protected  void updateDBName(String fullName, String init)
           
 
Methods inherited from class uk.ac.kcl.cch.rdb2java.dynData.BaseObject
doSQL, getSavedID, makeWhere, updateDBboolean, updateDBboolean, updateDBint, updateDBint, updateDBString, updateDBString, updateDBTimestamp, updateDBTimestamp
 
Methods inherited from class uk.ac.kcl.cch.rdb2java.dynData.PropertyChangeObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myCache

protected static ResourceQuery myCache

resourceKey

protected int resourceKey

FULLNAME_PROP

public static final String FULLNAME_PROP
See Also:
Constant Field Values

INITCHAR_PROP

public static final String INITCHAR_PROP
See Also:
Constant Field Values

OBJECTTYPEKEY_PROP

public static final String OBJECTTYPEKEY_PROP
See Also:
Constant Field Values

IDENTIFIER_PROP

public static final String IDENTIFIER_PROP
See Also:
Constant Field Values

IDSTART_PROP

public static final String IDSTART_PROP
See Also:
Constant Field Values

ATTRIBUTES_PROP

public static final String ATTRIBUTES_PROP
See Also:
Constant Field Values

MYTARGETROLES_PROP

public static final String MYTARGETROLES_PROP
See Also:
Constant Field Values

MYDISPLAYEDITEMS_PROP

public static final String MYDISPLAYEDITEMS_PROP
See Also:
Constant Field Values

MYSOURCEROLES_PROP

public static final String MYSOURCEROLES_PROP
See Also:
Constant Field Values

MYSURROGATES_PROP

public static final String MYSURROGATES_PROP
See Also:
Constant Field Values

FAVOURITES_PROP

public static final String FAVOURITES_PROP
See Also:
Constant Field Values

NAME_PROP

public static final String NAME_PROP
See Also:
Constant Field Values
Constructor Detail

Resource

public Resource(boolean realEmpty)

Resource

public Resource()
Method Detail

setEmpty

protected void setEmpty()

getSelectEntities

public static String getSelectEntities()

getTableJoins

public static String getTableJoins()

getSQLFrom

public static String getSQLFrom()

getKeyName

protected String getKeyName()
Specified by:
getKeyName in class BaseObject

getTableName

protected String getTableName()
Specified by:
getTableName in class BaseObject

getMyConnection

protected Connection getMyConnection()
Specified by:
getMyConnection in class BaseObject

returnMyConnection

protected void returnMyConnection(Connection con)
Specified by:
returnMyConnection in class BaseObject

loadFromResultSet

public int loadFromResultSet(ResultSet rs)
                      throws SQLException
Specified by:
loadFromResultSet in interface ILoadableFromResultSet
Throws:
SQLException

getItem

public static Resource getItem(int key)

getResourceKey

public int getResourceKey()

getFullName

public String getFullName()

getInitChar

public String getInitChar()

getObjectType

public ObjectType getObjectType()

getIdentifier

public String getIdentifier()

getIdStart

public String getIdStart()

getAttributes

public String getAttributes()

setFullName

public void setFullName(String parm)

setInitChar

public void setInitChar(String parm)

setObjectType

public void setObjectType(ObjectType item)

setIdentifier

public void setIdentifier(String parm)

setIdStart

public void setIdStart(String parm)

setAttributes

public void setAttributes(String parm)

doInsert

protected void doInsert()

deleteMe

public void deleteMe()

reIntroduceMe

public void reIntroduceMe()

getMyTargetRoles

public FKReferenceList getMyTargetRoles()

signalChangeMyTargetRoles

public void signalChangeMyTargetRoles(LOType oldItem,
                                      LOType newItem)

getMyDisplayedItems

public FKReferenceList getMyDisplayedItems()

signalChangeMyDisplayedItems

public void signalChangeMyDisplayedItems(LinkableObject oldItem,
                                         LinkableObject newItem)

getMySourceRoles

public FKReferenceList getMySourceRoles()

signalChangeMySourceRoles

public void signalChangeMySourceRoles(LOType oldItem,
                                      LOType newItem)

getMySurrogates

public FKReferenceList getMySurrogates()

signalChangeMySurrogates

public void signalChangeMySurrogates(LinkableObject oldItem,
                                     LinkableObject newItem)

getFavourites

public FKReferenceList getFavourites()

signalChangeFavourites

public void signalChangeFavourites(Favourite oldItem,
                                   Favourite newItem)

assignMyReferencesTo

public void assignMyReferencesTo(int to)

assignMyReferencesTo

public void assignMyReferencesTo(Resource assignee)

getCurrentPage

public int getCurrentPage()

setCurrentPage

public void setCurrentPage(int currentPage)

getMyPagedDisplayedItems

public FKReferenceList getMyPagedDisplayedItems()

EditorInput2idString

public static String EditorInput2idString(org.eclipse.ui.IEditorInput editorInput)

idString2EditorInput

public static org.eclipse.ui.IEditorInput idString2EditorInput(String id)

setIdentifiers

public void setIdentifiers(org.eclipse.ui.IEditorInput editorInput)

setIdentifiers

public void setIdentifiers(String id)

find

public static Resource find(ObjectType obj,
                            String idString)

find

public static Resource find(ObjectType obj,
                            org.eclipse.ui.IEditorInput input)

openEditor

public void openEditor(org.eclipse.ui.IWorkbenchPage page,
                       int pageNo)
                throws org.eclipse.ui.PartInitException
Throws:
org.eclipse.ui.PartInitException

openEditor

public void openEditor(org.eclipse.ui.IWorkbenchPage page)
                throws org.eclipse.ui.PartInitException
Throws:
org.eclipse.ui.PartInitException

closeMyEditor

public void closeMyEditor(org.eclipse.ui.IWorkbenchPage page,
                          boolean askSave)

getUrl

public String getUrl()

isDeletable

public boolean isDeletable()

isFavourite

public boolean isFavourite()

getName

public String getName()
Specified by:
getName in interface INamedObject

getInitChar

public static String getInitChar(String input)

setName

public void setName(String name)
Specified by:
setName in interface INamedObject

updateDBName

protected void updateDBName(String fullName,
                            String init)

getObjectTypeKey

public int getObjectTypeKey()

toString

public String toString()

getALItem

public String getALItem()
Specified by:
getALItem in interface IAuthorityListItem

getALID

public int getALID()
Specified by:
getALID in interface IAuthorityListItem
Specified by:
getALID in class BaseObject