Package org.openrefine.io
Class ProjectMetadataUtilities
- java.lang.Object
-
- org.openrefine.io.ProjectMetadataUtilities
-
public class ProjectMetadataUtilities extends Object
-
-
Constructor Summary
Constructors Constructor Description ProjectMetadataUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ProjectMetadata
load(File projectDir)
protected static ProjectMetadata
loadFromFile(File metadataFile)
static ProjectMetadata
recover(File projectDir, long id)
Reconstruct the project metadata on a best efforts basis.static void
save(ProjectMetadata projectMeta, File projectDir)
protected static void
saveToFile(ProjectMetadata projectMeta, File metadataFile)
-
-
-
Method Detail
-
save
public static void save(ProjectMetadata projectMeta, File projectDir) throws IOException
- Throws:
IOException
-
saveToFile
protected static void saveToFile(ProjectMetadata projectMeta, File metadataFile) throws IOException
- Throws:
IOException
-
load
public static ProjectMetadata load(File projectDir)
-
recover
public static ProjectMetadata recover(File projectDir, long id)
Reconstruct the project metadata on a best efforts basis. The name is gone, so build something descriptive from the column names. Recover the creation and modification times based on whatever files are available.- Parameters:
projectDir
- the project directoryid
- the project id
-
loadFromFile
protected static ProjectMetadata loadFromFile(File metadataFile) throws Exception
- Throws:
Exception
-
-