Package org.openrefine.model
Class Project
- java.lang.Object
-
- org.openrefine.model.Project
-
public class Project extends Object
A project is a table with overlay models and full edit history. This is the central concept of the OpenRefine data model - most operations are done within a given project.
-
-
Constructor Summary
Constructors Constructor Description Project(long id, History history)Restores a project from a saved state.Project(long projectId, Grid initialState, ChangeDataStore dataStore, GridCache gridStore)Creates a new project from an initial grid and a project id.Project(Grid initialState, ChangeDataStore dataStore, GridCache gridStore)Creates a new project from an initial grid.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddispose()static longgenerateID()ColumnModelgetColumnModel()Convenience function to return the current column model from the history.GridgetCurrentGrid()Convenience function to return the current grid.HistorygetHistory()longgetId()InstantgetLastModified()InstantgetLastSave()ProjectMetadatagetMetadata()Map<String,OverlayModel>getOverlayModels()Convenience function to return the current overlay modelsProcessManagergetProcessManager()static voidregisterOverlayModel(String name, Class<? extends OverlayModel> klass)Deprecated.voidsetLastSave()Sets the lastSave time to now
-
-
-
Constructor Detail
-
Project
public Project(Grid initialState, ChangeDataStore dataStore, GridCache gridStore)
Creates a new project from an initial grid.- Parameters:
initialState- the initial state of the project.
-
Project
public Project(long projectId, Grid initialState, ChangeDataStore dataStore, GridCache gridStore)Creates a new project from an initial grid and a project id.- Parameters:
projectId- the project identifierinitialState- the initial state of the project
-
Project
public Project(long id, History history)Restores a project from a saved state.
-
-
Method Detail
-
getLastSave
public Instant getLastSave()
-
setLastSave
public void setLastSave()
Sets the lastSave time to now
-
getLastModified
public Instant getLastModified()
-
getMetadata
public ProjectMetadata getMetadata()
-
getProcessManager
public ProcessManager getProcessManager()
-
getHistory
public History getHistory()
-
generateID
public static long generateID()
-
getId
public long getId()
-
dispose
public void dispose()
-
getColumnModel
public ColumnModel getColumnModel()
Convenience function to return the current column model from the history.
-
getCurrentGrid
public Grid getCurrentGrid()
Convenience function to return the current grid.
-
getOverlayModels
public Map<String,OverlayModel> getOverlayModels()
Convenience function to return the current overlay models
-
registerOverlayModel
@Deprecated public static void registerOverlayModel(String name, Class<? extends OverlayModel> klass)
Deprecated.
-
-