diff --git a/plugins/json-adapter/src/main/java/org/polypheny/db/adapter/json/JsonSource.java b/plugins/json-adapter/src/main/java/org/polypheny/db/adapter/json/JsonSource.java index 25c10ebed0..c26ad48098 100644 --- a/plugins/json-adapter/src/main/java/org/polypheny/db/adapter/json/JsonSource.java +++ b/plugins/json-adapter/src/main/java/org/polypheny/db/adapter/json/JsonSource.java @@ -22,9 +22,11 @@ import java.net.URL; import java.util.List; import java.util.Map; +import lombok.experimental.Delegate; import org.pf4j.Extension; import org.polypheny.db.adapter.DataSource; import org.polypheny.db.adapter.DeployMode; +import org.polypheny.db.adapter.DocumentScanDelegate; import org.polypheny.db.adapter.annotations.AdapterProperties; import org.polypheny.db.adapter.annotations.AdapterSettingDirectory; import org.polypheny.db.catalog.catalogs.AdapterCatalog; @@ -56,6 +58,8 @@ public class JsonSource extends DataSource { private static final Logger log = LoggerFactory.getLogger( JsonSource.class ); + @Delegate(excludes = Excludes.class) + private final DocumentScanDelegate delegate; private JsonNamespace namespace; private URL jsonFile; @@ -66,6 +70,7 @@ public JsonSource( final long storeId, final String uniqueName, final Map createTable( Context context, LogicalTableWrapper logical, AllocationTableWrapper allocation ) { + log.debug( "NOT SUPPORTED: JSON source does not support method createTable()." ); + return null; + } @Override public List createCollection( Context context, LogicalCollection logical, AllocationCollection allocation ) { @@ -207,14 +217,6 @@ public void rollback( PolyXid xid ) { log.debug( "NOT SUPPORTED: JSON source does not support method rollback()." ); } - - @Override - public List createTable( Context context, LogicalTableWrapper logical, AllocationTableWrapper allocation ) { - log.debug( "NOT SUPPORTED: JSON source does not support method createTable()." ); - return null; - } - - @Override public void dropTable( Context context, long allocId ) { log.debug( "NOT SUPPORTED: JSON source does not support method dropTable()" ); @@ -246,6 +248,14 @@ public void restoreGraph( AllocationGraph alloc, List entities, } + private interface Excludes { + + void refreshCollection( long allocId ); + + void createCollection( Context context, LogicalTableWrapper logical, AllocationTableWrapper allocation ); + + void restoreCollection( AllocationTable alloc, List entities ); + } }