Skip to content

Commit

Permalink
Fixed two issues related to feature extraction (#261)
Browse files Browse the repository at this point in the history
* Fixed two issues related to extraction:

- Initialisation of Writers now takes place in construction
- DatabaseConfig.getSelectorSupplier() now respects selector config instead of writer config.

* Bumped version.

Former-commit-id: 0930826
  • Loading branch information
ppanopticon authored Feb 11, 2022
1 parent 51571be commit 166e3fa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ allprojects {
group = 'org.vitrivr'

/* Our current version, on dev branch this should always be release+1-SNAPSHOT */
version = '3.7.0'
version = '3.7.3'

apply plugin: 'java-library'
apply plugin: 'maven-publish'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,6 @@ public Supplier<EntityCreator> getEntityCreatorSupplier() {
}

public DBSelectorSupplier getSelectorSupplier() {
return this.writer.getSelectorSupplier(this);
return this.selector.getSelectorSupplier(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ public MediaObjectMetadataWriter(PersistencyWriter<?> writer) {
public MediaObjectMetadataWriter(PersistencyWriter<?> writer, String tableName) {
super(writer);
this.tableName = tableName;
this.init();
}

@Override
protected void init() {
this.writer.setFieldNames(MediaObjectMetadataDescriptor.FIELDNAMES);
this.writer.open(tableName);
}

@Override
protected void init() {}

@Override
protected PersistentTuple generateTuple(MediaObjectMetadataDescriptor entity) {
if (entity.getValueProvider() instanceof NothingProvider) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ public class MediaObjectWriter extends AbstractBatchedEntityWriter<MediaObjectDe

public MediaObjectWriter(PersistencyWriter<?> writer) {
super(writer);
this.writer.setFieldNames(MediaObjectDescriptor.FIELDNAMES);
this.writer.open(MediaObjectDescriptor.ENTITY);
}

/**
*
*/
@Override
protected void init() {
this.writer.setFieldNames(MediaObjectDescriptor.FIELDNAMES);
this.writer.open(MediaObjectDescriptor.ENTITY);
}
protected void init() { }

@Override
protected PersistentTuple generateTuple(MediaObjectDescriptor entity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ public class MediaSegmentWriter extends AbstractBatchedEntityWriter<MediaSegment

public MediaSegmentWriter(PersistencyWriter<?> writer) {
super(writer);
}

@Override
protected void init() {
this.writer.setFieldNames(MediaSegmentDescriptor.FIELDNAMES);
this.writer.open(MediaSegmentDescriptor.ENTITY);
}

@Override
protected void init() { }

@Override
protected PersistentTuple generateTuple(MediaSegmentDescriptor entity) {
return this.writer.generateTuple(entity.getSegmentId(), entity.getObjectId(), entity.getSequenceNumber(), entity.getStart(), entity.getEnd(), entity.getStartabs(), entity.getEndabs());
Expand Down

0 comments on commit 166e3fa

Please sign in to comment.