Class ModelStorage
- java.lang.Object
-
- de.unirostock.sems.ModelCrawler.storage.ModelStorage
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
- Direct Known Subclasses:
FileBasedStorage
public abstract class ModelStorage extends Object implements Serializable, Closeable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModelStorage.Types
-
Constructor Summary
Constructors Constructor Description ModelStorage()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
close()
Closes the connector and cleans things upabstract void
connect()
Connects to the storage destination, is supposed to be called before every other operation.abstract URI
linkModelVersion(String fileId, String sourceVersionId, String targetVersionId)
Links the source Version to the target Version (The target Version should exist already).abstract URI
storeModel(Change modelChange)
Puts a model into the storage system and returns the URI.List<URI>
storeModelChangeSet(ChangeSet changeSet)
Puts a whole ChangeSet of models into the storage system.
-
-
-
Method Detail
-
connect
public abstract void connect() throws StorageException
Connects to the storage destination, is supposed to be called before every other operation.- Throws:
StorageException
- the storage exception
-
close
public abstract void close()
Closes the connector and cleans things up- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
storeModel
public abstract URI storeModel(Change modelChange) throws StorageException
Puts a model into the storage system and returns the URI.- Parameters:
modelChange
- the model change- Returns:
- the uri to the model
- Throws:
StorageException
- the storage exception
-
linkModelVersion
public abstract URI linkModelVersion(String fileId, String sourceVersionId, String targetVersionId) throws StorageException
Links the source Version to the target Version (The target Version should exist already).- Parameters:
fileId
- the file idsourceVersionId
- the source version idtargetVersionId
- the target version id- Returns:
- the uri
- Throws:
StorageException
- the storage exception
-
storeModelChangeSet
public List<URI> storeModelChangeSet(ChangeSet changeSet) throws StorageException
Puts a whole ChangeSet of models into the storage system.- Parameters:
changeSet
- the change set- Returns:
- the list of stored changes
- Throws:
StorageException
- the storage exception
-
-