Interface CopyMode
public interface CopyMode
Defines different modes how a model should be copied during incremental merge.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CopyMode
Copy the model in memory.static final CopyMode
Creates a new TDB storage for every KG which is the target of a merge (all triples are added to this KG).static final CopyMode
Creates a new TDB storage for the target KG but only if the model is large (by default greater than 100_000 triples - also seecreateTdbForLargeKg(int)
).static final CopyMode
Do not make any copy but use the models which are provided. -
Method Summary
Modifier and TypeMethodDescriptionstatic CopyMode
createTdbForLargeKg
(int numberOfTriples) Creates a new TDB storage for the target KG but only if the model is large (which can be further defined by the number of triples as the parameter).getCopiedModel
(Set<Object> modelRepresentations, Properties parameters)
-
Field Details
-
NONE
Do not make any copy but use the models which are provided. Do not use it if the initial models are stored in TDB, because those would be modifed. -
CREATE_TDB
Creates a new TDB storage for every KG which is the target of a merge (all triples are added to this KG). This might require a lot of disk space because each TDB requires at least 200 MB. This can be only used for sequential merges. -
CREATE_TDB_FOR_LARGE_KG
Creates a new TDB storage for the target KG but only if the model is large (by default greater than 100_000 triples - also seecreateTdbForLargeKg(int)
). This works well for a large number of KGs with different sizes because only the large KGs are actually stored in a TDB. This will reuse TDBs. This means if the input are TDB backed jena model, the TDB stoarge might be modified. Thus better only used it if the input are in-memory models / rdf serialized files. -
COPY_IN_MEMORY
Copy the model in memory. This will not modify the provided models, but will require a lot of memory.
-
-
Method Details
-
getCopiedModel
Set<Object> getCopiedModel(Set<Object> modelRepresentations, Properties parameters) throws TypeTransformationException - Throws:
TypeTransformationException
-
createTdbForLargeKg
Creates a new TDB storage for the target KG but only if the model is large (which can be further defined by the number of triples as the parameter). This works well for a large number of KGs with different sizes because only the large KGs are actually stored in a TDB. This will reuse TDBs. This means if the input are TDB backed jena model, the TDB stoarge might be modified. Thus better only used it if the input are in-memory models / rdf serialized files.- Parameters:
numberOfTriples
- creates a TDB if the model has more triples than this given number- Returns:
- the created copy mode.
-