diff --git a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSetting.java b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSetting.java index 705343d815..18f46b5715 100644 --- a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSetting.java +++ b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSetting.java @@ -19,15 +19,14 @@ import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.Arrays; -import java.util.Comparator; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.stream.Collectors; import lombok.Getter; import lombok.Setter; +import lombok.Value; import lombok.experimental.Accessors; +import lombok.experimental.NonFinal; import org.polypheny.db.adapter.DeployMode.DeploySetting; import org.polypheny.db.adapter.annotations.AdapterProperties; import org.polypheny.db.adapter.annotations.AdapterSettingBoolean; @@ -37,23 +36,28 @@ import org.polypheny.db.adapter.annotations.AdapterSettingString; @Accessors(chain = true) +@Value +@NonFinal public abstract class AbstractAdapterSetting { - public final String name; - public final boolean canBeNull; - public final String subOf; - public final boolean required; - public final boolean modifiable; - public final String defaultValue; - private final int position; + public String name; + public boolean canBeNull; + public String subOf; + public boolean required; + public boolean modifiable; + public String defaultValue; + public int position; @Setter + @NonFinal public String description; + public AdapterSettingType type; @Getter - public final List appliesTo; + public List appliesTo; - public AbstractAdapterSetting( final String name, final boolean canBeNull, final String subOf, final boolean required, final boolean modifiable, List appliesTo, String defaultValue, int position ) { + public AbstractAdapterSetting( final AdapterSettingType type, final String name, final boolean canBeNull, final String subOf, final boolean required, final boolean modifiable, List appliesTo, String defaultValue, int position ) { + this.type = type; this.name = name; this.canBeNull = canBeNull; this.subOf = Objects.equals( subOf, "" ) ? null : subOf; @@ -77,63 +81,37 @@ public AbstractAdapterSetting( final String name, final boolean canBeNull, final * @param properties which are defined by the corresponding Adapter * @return a map containing the available modes and the corresponding collections of AdapterSettings */ - public static Map> fromAnnotations( Annotation[] annotations, AdapterProperties properties ) { - Map> settings = new HashMap<>(); + public static List fromAnnotations( Annotation[] annotations, AdapterProperties properties ) { + List settings = new ArrayList<>(); for ( Annotation annotation : annotations ) { if ( annotation instanceof AdapterSettingString ) { - mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingString.fromAnnotation( (AdapterSettingString) annotation ) ); + settings.add( AbstractAdapterSettingString.fromAnnotation( (AdapterSettingString) annotation ) ); } else if ( annotation instanceof AdapterSettingString.List ) { - Arrays.stream( ((AdapterSettingString.List) annotation).value() ).forEach( el -> mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingString.fromAnnotation( el ) ) ); + Arrays.stream( ((AdapterSettingString.List) annotation).value() ).forEach( el -> settings.add( AbstractAdapterSettingString.fromAnnotation( el ) ) ); } else if ( annotation instanceof AdapterSettingBoolean ) { - mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingBoolean.fromAnnotation( (AdapterSettingBoolean) annotation ) ); + settings.add( AbstractAdapterSettingBoolean.fromAnnotation( (AdapterSettingBoolean) annotation ) ); } else if ( annotation instanceof AdapterSettingBoolean.List ) { - Arrays.stream( ((AdapterSettingBoolean.List) annotation).value() ).forEach( el -> mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingBoolean.fromAnnotation( el ) ) ); + Arrays.stream( ((AdapterSettingBoolean.List) annotation).value() ).forEach( el -> settings.add( AbstractAdapterSettingBoolean.fromAnnotation( el ) ) ); } else if ( annotation instanceof AdapterSettingInteger ) { - mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingInteger.fromAnnotation( (AdapterSettingInteger) annotation ) ); + settings.add( AbstractAdapterSettingInteger.fromAnnotation( (AdapterSettingInteger) annotation ) ); } else if ( annotation instanceof AdapterSettingInteger.List ) { - Arrays.stream( ((AdapterSettingInteger.List) annotation).value() ).forEach( el -> mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingInteger.fromAnnotation( el ) ) ); + Arrays.stream( ((AdapterSettingInteger.List) annotation).value() ).forEach( el -> settings.add( AbstractAdapterSettingInteger.fromAnnotation( el ) ) ); } else if ( annotation instanceof AdapterSettingList ) { - mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingList.fromAnnotation( (AdapterSettingList) annotation ) ); + settings.add( AbstractAdapterSettingList.fromAnnotation( (AdapterSettingList) annotation ) ); } else if ( annotation instanceof AdapterSettingList.List ) { - Arrays.stream( ((AdapterSettingList.List) annotation).value() ).forEach( el -> mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingList.fromAnnotation( el ) ) ); + Arrays.stream( ((AdapterSettingList.List) annotation).value() ).forEach( el -> settings.add( AbstractAdapterSettingList.fromAnnotation( el ) ) ); } else if ( annotation instanceof AdapterSettingDirectory ) { - mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingDirectory.fromAnnotation( (AdapterSettingDirectory) annotation ) ); + settings.add( AbstractAdapterSettingDirectory.fromAnnotation( (AdapterSettingDirectory) annotation ) ); } else if ( annotation instanceof AdapterSettingDirectory.List ) { - Arrays.stream( ((AdapterSettingDirectory.List) annotation).value() ).forEach( el -> mergeSettings( settings, properties.usedModes(), AbstractAdapterSettingDirectory.fromAnnotation( el ) ) ); + Arrays.stream( ((AdapterSettingDirectory.List) annotation).value() ).forEach( el -> settings.add( AbstractAdapterSettingDirectory.fromAnnotation( el ) ) ); } } - settings.forEach( ( key, values ) -> values.sort( Comparator.comparingInt( value -> value.position ) ) ); return settings; } - /** - * Merges the provided setting into the provided map of AdapterSettings - * - * @param settings already correctly sorted settings - * @param deployModes the deployment modes which are supported by this specific adapter - * @param setting the setting which is merged into the map - */ - private static void mergeSettings( Map> settings, DeployMode[] deployModes, AbstractAdapterSetting setting ) { - // we need to unpack the underlying DeployModes - for ( DeployMode mode : setting.appliesTo - .stream() - .flatMap( mode -> mode.getModes( Arrays.asList( deployModes ) ).stream() ) - .collect( Collectors.toList() ) ) { - - if ( settings.containsKey( mode.getName() ) ) { - settings.get( mode.getName() ).add( setting ); - } else { - List temp = new ArrayList<>(); - temp.add( setting ); - settings.put( mode.getName(), temp ); - } - } - } - - /** * In most subclasses, this method returns the defaultValue, because the UI overrides the defaultValue when a new value is set. */ @@ -153,4 +131,9 @@ public static List serializeSettings( List modes, int position ) { - super( name, canBeNull, subOf, required, modifiable, modes, String.valueOf( defaultValue ), position ); + super( AdapterSettingType.BOOLEAN, name, canBeNull, subOf, required, modifiable, modes, String.valueOf( defaultValue ), position ); } diff --git a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingDirectory.java b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingDirectory.java index 69d0e07d35..80cd983f7d 100644 --- a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingDirectory.java +++ b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingDirectory.java @@ -28,8 +28,6 @@ @Accessors(chain = true) public class AbstractAdapterSettingDirectory extends AbstractAdapterSetting { - - private final String type = "Directory"; @Setter public String directory; //This field is necessary for the UI and needs to be initialized to be serialized to JSON. @@ -39,7 +37,7 @@ public class AbstractAdapterSettingDirectory extends AbstractAdapterSetting { public AbstractAdapterSettingDirectory( String name, boolean canBeNull, String subOf, boolean required, boolean modifiable, List modes, int position ) { - super( name, canBeNull, subOf, required, modifiable, modes, null, position ); + super( AdapterSettingType.DIRECTORY, name, canBeNull, subOf, required, modifiable, modes, null, position ); //so it will be serialized this.directory = ""; this.inputStreams = new HashMap<>(); diff --git a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingInteger.java b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingInteger.java index 4075883b77..4457110126 100644 --- a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingInteger.java +++ b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingInteger.java @@ -23,11 +23,8 @@ public class AbstractAdapterSettingInteger extends AbstractAdapterSetting { - private final String type = "Integer"; - - public AbstractAdapterSettingInteger( String name, boolean canBeNull, String subOf, boolean required, boolean modifiable, Integer defaultValue, List modes, int position ) { - super( name, canBeNull, subOf, required, modifiable, modes, defaultValue.toString(), position ); + super( AdapterSettingType.INTEGER, name, canBeNull, subOf, required, modifiable, modes, defaultValue.toString(), position ); } diff --git a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingList.java b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingList.java index 0e66f1e7c0..94e72dfa98 100644 --- a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingList.java +++ b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingList.java @@ -24,14 +24,12 @@ @Accessors(chain = true) public class AbstractAdapterSettingList extends AbstractAdapterSetting { - - private final String type = "List"; public List options; public boolean dynamic = false; public AbstractAdapterSettingList( String name, boolean canBeNull, final String subOf, boolean required, boolean modifiable, List options, List modes, String defaultValue, int position ) { - super( name, canBeNull, subOf, required, modifiable, modes, defaultValue, position ); + super( AdapterSettingType.LIST, name, canBeNull, subOf, required, modifiable, modes, defaultValue, position ); this.options = options; } diff --git a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingString.java b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingString.java index eafbe6580e..07dcd7a7f6 100644 --- a/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingString.java +++ b/core/src/main/java/org/polypheny/db/adapter/AbstractAdapterSettingString.java @@ -23,11 +23,9 @@ public class AbstractAdapterSettingString extends AbstractAdapterSetting { - private final String type = "String"; - public AbstractAdapterSettingString( String name, boolean canBeNull, String subOf, boolean required, boolean modifiable, String defaultValue, List modes, int position ) { - super( name, canBeNull, subOf, required, modifiable, modes, defaultValue, position ); + super( AdapterSettingType.STRING, name, canBeNull, subOf, required, modifiable, modes, defaultValue, position ); } diff --git a/core/src/main/java/org/polypheny/db/adapter/Adapter.java b/core/src/main/java/org/polypheny/db/adapter/Adapter.java index d724def5dd..c1c7f2da41 100644 --- a/core/src/main/java/org/polypheny/db/adapter/Adapter.java +++ b/core/src/main/java/org/polypheny/db/adapter/Adapter.java @@ -19,7 +19,6 @@ import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -145,19 +144,13 @@ public Expression getNamespaceAsExpression( long id ) { public List getAvailableSettings( Class clazz ) { - return AbstractAdapterSetting.fromAnnotations( clazz.getAnnotations(), properties ) - .values() - .stream() - .flatMap( Collection::stream ) - .collect( Collectors.toList() ); + return AbstractAdapterSetting.fromAnnotations( clazz.getAnnotations(), properties ); } public static Map getDefaultSettings( Class> clazz ) { return AbstractAdapterSetting.fromAnnotations( clazz.getAnnotations(), clazz.getAnnotation( AdapterProperties.class ) ) - .values() .stream() - .flatMap( Collection::stream ) .collect( Collectors.toMap( e -> e.name, e -> e.defaultValue ) ); } diff --git a/core/src/main/java/org/polypheny/db/adapter/AdapterManager.java b/core/src/main/java/org/polypheny/db/adapter/AdapterManager.java index 1ba5ffc402..d4839d4f26 100644 --- a/core/src/main/java/org/polypheny/db/adapter/AdapterManager.java +++ b/core/src/main/java/org/polypheny/db/adapter/AdapterManager.java @@ -23,10 +23,7 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; import java.util.HashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -35,7 +32,6 @@ import lombok.AllArgsConstructor; import org.apache.calcite.linq4j.tree.Expression; import org.apache.calcite.linq4j.tree.Expressions; -import org.polypheny.db.adapter.DeployMode.DeploySetting; import org.polypheny.db.adapter.annotations.AdapterProperties; import org.polypheny.db.adapter.java.AdapterTemplate; import org.polypheny.db.catalog.Catalog; @@ -43,15 +39,13 @@ import org.polypheny.db.catalog.entity.CatalogAdapter.AdapterType; import org.polypheny.db.catalog.entity.allocation.AllocationEntity; import org.polypheny.db.catalog.exceptions.GenericRuntimeException; -import org.polypheny.db.config.ConfigDocker; -import org.polypheny.db.config.RuntimeConfig; import org.polypheny.db.util.Pair; public class AdapterManager { public static Expression ADAPTER_MANAGER_EXPRESSION = Expressions.call( AdapterManager.class, "getInstance" ); - private static final Map, AdapterTemplate> REGISTER = new ConcurrentHashMap<>(); + public static final Map, AdapterTemplate> REGISTER = new ConcurrentHashMap<>(); private final Map> adapterById = new HashMap<>(); private final Map> adapterByName = new HashMap<>(); @@ -170,60 +164,18 @@ public ImmutableMap> getSources() { public List getAvailableAdapters( AdapterType adapterType ) { List adapterTemplates = getAdapters( adapterType ); - List result = new LinkedList<>(); + List result = new ArrayList<>(); for ( AdapterTemplate adapterTemplate : adapterTemplates ) { // Exclude abstract classes if ( !Modifier.isAbstract( adapterTemplate.getClazz().getModifiers() ) ) { - Map> settings = new HashMap<>(); AdapterProperties properties = adapterTemplate.getClazz().getAnnotation( AdapterProperties.class ); if ( properties == null ) { - throw new RuntimeException( adapterTemplate.getClazz().getSimpleName() + " does not annotate the adapter correctly" ); + throw new GenericRuntimeException( adapterTemplate.getClazz().getSimpleName() + " does not annotate the adapter correctly" ); } - - // Used to evaluate which mode is used when deploying the adapter - settings.put( - "mode", - Collections.singletonList( - new AbstractAdapterSettingList( - "mode", - false, - null, - true, - true, - Collections.singletonList( "default" ), - Collections.singletonList( DeploySetting.DEFAULT ), - "default", - 0 ) ) ); - - // Add empty list for each available mode - Arrays.stream( properties.usedModes() ).forEach( mode -> settings.put( mode.getName(), new ArrayList<>() ) ); - - // Add default which is used by all available modes - settings.put( "default", new ArrayList<>() ); - // Merge annotated AdapterSettings into settings - Map> annotatedSettings = AbstractAdapterSetting.fromAnnotations( adapterTemplate.getClazz().getAnnotations(), adapterTemplate.getClazz().getAnnotation( AdapterProperties.class ) ); - settings.putAll( annotatedSettings ); - - // If the adapter uses docker add the dynamic docker setting - if ( settings.containsKey( "docker" ) ) { - settings - .get( "docker" ) - .add( new BindableAbstractAdapterSettingsList<>( - "instanceId", - "DockerInstance", - false, - null, - true, - false, - RuntimeConfig.DOCKER_INSTANCES.getList( ConfigDocker.class ).stream().filter( ConfigDocker::isDockerRunning ).collect( Collectors.toList() ), - ConfigDocker::getAlias, - ConfigDocker.class ) - .bind( RuntimeConfig.DOCKER_INSTANCES ) - .setDescription( "To configure additional Docker instances, use the Docker Config in the Config Manager." ) ); - } + List settings = AbstractAdapterSetting.fromAnnotations( adapterTemplate.getClazz().getAnnotations(), adapterTemplate.getClazz().getAnnotation( AdapterProperties.class ) ); result.add( new AdapterInformation( properties.name(), properties.description(), adapterType, settings ) ); } @@ -301,13 +253,20 @@ public void restoreAdapters() { } + public List getAvailableAdapters() { + List adapters = new ArrayList<>( getAvailableAdapters( AdapterType.STORE ) ); + adapters.addAll( getAvailableAdapters( AdapterType.SOURCE ) ); + return adapters; + } + + @AllArgsConstructor public static class AdapterInformation { public final String name; public final String description; public final AdapterType type; - public final Map> settings; + public final List settings; public static JsonSerializer getSerializer() { diff --git a/plugins/explore-by-example/src/main/java/org/polypheny/db/exploreByExample/requests/ClassifyAllData.java b/plugins/explore-by-example/src/main/java/org/polypheny/db/exploreByExample/requests/ClassifyAllData.java index 9136eef80d..20bc213196 100644 --- a/plugins/explore-by-example/src/main/java/org/polypheny/db/exploreByExample/requests/ClassifyAllData.java +++ b/plugins/explore-by-example/src/main/java/org/polypheny/db/exploreByExample/requests/ClassifyAllData.java @@ -17,7 +17,7 @@ package org.polypheny.db.exploreByExample.requests; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; import org.polypheny.db.webui.models.requests.UIRequest; diff --git a/webui/src/main/java/org/polypheny/db/webui/Crud.java b/webui/src/main/java/org/polypheny/db/webui/Crud.java index 45e914a148..5257337fef 100644 --- a/webui/src/main/java/org/polypheny/db/webui/Crud.java +++ b/webui/src/main/java/org/polypheny/db/webui/Crud.java @@ -164,7 +164,6 @@ import org.polypheny.db.webui.crud.CatalogCrud; import org.polypheny.db.webui.crud.LanguageCrud; import org.polypheny.db.webui.crud.StatisticCrud; -import org.polypheny.db.webui.models.AdapterModel; import org.polypheny.db.webui.models.DbTable; import org.polypheny.db.webui.models.ForeignKey; import org.polypheny.db.webui.models.IndexModel; @@ -180,9 +179,10 @@ import org.polypheny.db.webui.models.SidebarElement; import org.polypheny.db.webui.models.SortState; import org.polypheny.db.webui.models.TableConstraint; -import org.polypheny.db.webui.models.UiColumnDefinition; import org.polypheny.db.webui.models.Uml; import org.polypheny.db.webui.models.UnderlyingTables; +import org.polypheny.db.webui.models.catalog.AdapterModel; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; import org.polypheny.db.webui.models.requests.BatchUpdateRequest; import org.polypheny.db.webui.models.requests.BatchUpdateRequest.Update; import org.polypheny.db.webui.models.requests.ColumnRequest; diff --git a/webui/src/main/java/org/polypheny/db/webui/crud/CatalogCrud.java b/webui/src/main/java/org/polypheny/db/webui/crud/CatalogCrud.java index 45836ee2a2..76862e6c54 100644 --- a/webui/src/main/java/org/polypheny/db/webui/crud/CatalogCrud.java +++ b/webui/src/main/java/org/polypheny/db/webui/crud/CatalogCrud.java @@ -33,9 +33,9 @@ import org.polypheny.db.webui.Crud; import org.polypheny.db.webui.models.AssetsModel; import org.polypheny.db.webui.models.SidebarElement; -import org.polypheny.db.webui.models.catalog.NamespaceModel; import org.polypheny.db.webui.models.catalog.SnapshotModel; import org.polypheny.db.webui.models.catalog.requests.NamespaceRequest; +import org.polypheny.db.webui.models.catalog.schema.NamespaceModel; import org.polypheny.db.webui.models.requests.SchemaTreeRequest; @Slf4j diff --git a/webui/src/main/java/org/polypheny/db/webui/crud/LanguageCrud.java b/webui/src/main/java/org/polypheny/db/webui/crud/LanguageCrud.java index 4e93346565..9e1694558e 100644 --- a/webui/src/main/java/org/polypheny/db/webui/crud/LanguageCrud.java +++ b/webui/src/main/java/org/polypheny/db/webui/crud/LanguageCrud.java @@ -59,12 +59,12 @@ import org.polypheny.db.type.entity.PolyValue; import org.polypheny.db.type.entity.graph.PolyGraph; import org.polypheny.db.webui.Crud; -import org.polypheny.db.webui.models.FieldDefinition; import org.polypheny.db.webui.models.IndexModel; import org.polypheny.db.webui.models.PlacementModel; import org.polypheny.db.webui.models.PlacementModel.DocumentStore; import org.polypheny.db.webui.models.SortState; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.FieldDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; import org.polypheny.db.webui.models.requests.QueryRequest; import org.polypheny.db.webui.models.requests.UIRequest; import org.polypheny.db.webui.models.results.DocResult; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/AdapterTemplateModel.java b/webui/src/main/java/org/polypheny/db/webui/models/AdapterTemplateModel.java new file mode 100644 index 0000000000..10b8d3e7e7 --- /dev/null +++ b/webui/src/main/java/org/polypheny/db/webui/models/AdapterTemplateModel.java @@ -0,0 +1,94 @@ +/* + * Copyright 2019-2023 The Polypheny Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.polypheny.db.webui.models; + + +import java.util.List; +import java.util.stream.Collectors; +import lombok.Value; +import org.jetbrains.annotations.NotNull; +import org.polypheny.db.adapter.AbstractAdapterSetting; +import org.polypheny.db.adapter.AbstractAdapterSetting.AdapterSettingType; +import org.polypheny.db.adapter.AdapterManager.AdapterInformation; +import org.polypheny.db.adapter.DeployMode.DeploySetting; +import org.polypheny.db.catalog.entity.CatalogAdapter.AdapterType; + +@Value +public class AdapterTemplateModel { + + + public String adapterName; + public AdapterType adapterType; + public List defaultSettings; + public String description; + + + public AdapterTemplateModel( + @NotNull String adapterName, + @NotNull AdapterType adapterType, + @NotNull List defaultSettings, + @NotNull String description ) { + this.adapterName = adapterName; + this.adapterType = adapterType; + this.defaultSettings = defaultSettings; + this.description = description; + } + + + public static AdapterTemplateModel from( AdapterInformation template ) { + return new AdapterTemplateModel( template.name, template.type, template.settings.stream().map( AdapterSettingsModel::from ).collect( Collectors.toList() ), template.description ); + } + + + @Value + public static class AdapterSettingsModel { + + + public String name; + public String defaultValue; + public String description; + public List appliesTo; + public boolean required; + public boolean canBeNull; + public AdapterSettingType type; + + + public AdapterSettingsModel( AdapterSettingType type, String name, String defaultValue, String description, List appliesTo, boolean required, boolean canBeNull ) { + this.type = type; + this.name = name; + this.defaultValue = defaultValue; + this.description = description; + this.appliesTo = appliesTo; + this.required = required; + this.canBeNull = canBeNull; + } + + + public static AdapterSettingsModel from( AbstractAdapterSetting setting ) { + return new AdapterSettingsModel( + setting.type, + setting.name, + setting.defaultValue, + setting.description, + setting.appliesTo, + setting.required, + setting.canBeNull ); + } + + } + +} diff --git a/webui/src/main/java/org/polypheny/db/webui/models/DbTable.java b/webui/src/main/java/org/polypheny/db/webui/models/DbTable.java index bc803c5ea5..32a05400af 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/DbTable.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/DbTable.java @@ -20,6 +20,7 @@ import java.util.ArrayList; import lombok.Getter; import org.polypheny.db.catalog.logistic.EntityType; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; /** diff --git a/webui/src/main/java/org/polypheny/db/webui/models/QueryInterfaceModel.java b/webui/src/main/java/org/polypheny/db/webui/models/QueryInterfaceModel.java index baf04fdf8c..9e62bc5c6e 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/QueryInterfaceModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/QueryInterfaceModel.java @@ -19,6 +19,7 @@ import java.util.Map; import lombok.AllArgsConstructor; +import lombok.Value; import org.polypheny.db.iface.QueryInterface; import org.polypheny.db.iface.QueryInterface.QueryInterfaceSetting; @@ -27,15 +28,16 @@ * A model for a {@link org.polypheny.db.iface.QueryInterface} * needed for gson */ +@Value @AllArgsConstructor public class QueryInterfaceModel { - public final String uniqueName; + public String uniqueName; public boolean supportsDdl; public boolean supportsDml; - public final String interfaceType; - public final Map currentSettings; - public final QueryInterfaceSetting[] availableSettings; + public String interfaceType; + public Map currentSettings; + public QueryInterfaceSetting[] availableSettings; public QueryInterfaceModel ( final QueryInterface i ) { this.uniqueName = i.getUniqueName(); diff --git a/webui/src/main/java/org/polypheny/db/webui/models/AdapterModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/AdapterModel.java similarity index 96% rename from webui/src/main/java/org/polypheny/db/webui/models/AdapterModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/AdapterModel.java index 01e7e5a292..2e84382aa0 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/AdapterModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/AdapterModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models; +package org.polypheny.db.webui.models.catalog; import java.util.Map; @@ -26,7 +26,6 @@ import org.polypheny.db.catalog.entity.CatalogAdapter; import org.polypheny.db.catalog.entity.CatalogAdapter.AdapterType; import org.polypheny.db.catalog.exceptions.GenericRuntimeException; -import org.polypheny.db.webui.models.catalog.IdEntity; @EqualsAndHashCode(callSuper = true) diff --git a/webui/src/main/java/org/polypheny/db/webui/models/FieldDefinition.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/FieldDefinition.java similarity index 98% rename from webui/src/main/java/org/polypheny/db/webui/models/FieldDefinition.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/FieldDefinition.java index d25736caca..320de700f4 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/FieldDefinition.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/FieldDefinition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models; +package org.polypheny.db.webui.models.catalog; import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/SnapshotModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/SnapshotModel.java index 8e43242e4c..f549ac9520 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/SnapshotModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/SnapshotModel.java @@ -21,9 +21,23 @@ import java.util.List; import java.util.stream.Collectors; import lombok.Value; +import org.polypheny.db.adapter.AdapterManager; import org.polypheny.db.catalog.logistic.Pattern; import org.polypheny.db.catalog.snapshot.Snapshot; -import org.polypheny.db.webui.models.AdapterModel; +import org.polypheny.db.webui.models.AdapterTemplateModel; +import org.polypheny.db.webui.models.catalog.schema.AllocationColumnModel; +import org.polypheny.db.webui.models.catalog.schema.AllocationEntityModel; +import org.polypheny.db.webui.models.catalog.schema.AllocationPartitionModel; +import org.polypheny.db.webui.models.catalog.schema.AllocationPlacementModel; +import org.polypheny.db.webui.models.catalog.schema.CollectionModel; +import org.polypheny.db.webui.models.catalog.schema.ColumnModel; +import org.polypheny.db.webui.models.catalog.schema.ConstraintModel; +import org.polypheny.db.webui.models.catalog.schema.EntityModel; +import org.polypheny.db.webui.models.catalog.schema.FieldModel; +import org.polypheny.db.webui.models.catalog.schema.GraphModel; +import org.polypheny.db.webui.models.catalog.schema.KeyModel; +import org.polypheny.db.webui.models.catalog.schema.NamespaceModel; +import org.polypheny.db.webui.models.catalog.schema.TableModel; @Value public class SnapshotModel { @@ -42,6 +56,7 @@ public class SnapshotModel { public List partitions; public List allocColumns; public List adapters; + public List adapterTemplates; public SnapshotModel( @@ -55,7 +70,8 @@ public SnapshotModel( List placements, List partitions, List allocColumns, - List adapters ) { + List adapters, + List adapterTemplates ) { this.id = id; this.namespaces = ImmutableList.copyOf( namespaces ); this.entities = ImmutableList.copyOf( entities ); @@ -67,6 +83,7 @@ public SnapshotModel( this.partitions = ImmutableList.copyOf( partitions ); this.allocColumns = ImmutableList.copyOf( allocColumns ); this.adapters = ImmutableList.copyOf( adapters ); + this.adapterTemplates = ImmutableList.copyOf( adapterTemplates ); } @@ -95,7 +112,9 @@ public static SnapshotModel from( Snapshot snapshot ) { List adapters = snapshot.getAdapters().stream().map( AdapterModel::from ).collect( Collectors.toList() ); - return new SnapshotModel( snapshot.id(), namespaces, entities, fields, keys, constraints, allocations, placements, partitions, allocationColumns, adapters ); + List adapterTemplates = AdapterManager.getInstance().getAvailableAdapters().stream().map( AdapterTemplateModel::from ).collect( Collectors.toList() ); + + return new SnapshotModel( snapshot.id(), namespaces, entities, fields, keys, constraints, allocations, placements, partitions, allocationColumns, adapters, adapterTemplates ); } } diff --git a/webui/src/main/java/org/polypheny/db/webui/models/SourceModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/SourceModel.java similarity index 96% rename from webui/src/main/java/org/polypheny/db/webui/models/SourceModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/SourceModel.java index 452c99000f..6a38b4572d 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/SourceModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/SourceModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models; +package org.polypheny.db.webui.models.catalog; import java.util.Map; import lombok.EqualsAndHashCode; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/StoreModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/StoreModel.java similarity index 96% rename from webui/src/main/java/org/polypheny/db/webui/models/StoreModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/StoreModel.java index 71f445bd2d..866b755f3b 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/StoreModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/StoreModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models; +package org.polypheny.db.webui.models.catalog; import java.util.Map; import lombok.EqualsAndHashCode; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/UiColumnDefinition.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/UiColumnDefinition.java similarity index 98% rename from webui/src/main/java/org/polypheny/db/webui/models/UiColumnDefinition.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/UiColumnDefinition.java index bcf4492f90..6ddc3b743d 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/UiColumnDefinition.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/UiColumnDefinition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models; +package org.polypheny.db.webui.models.catalog; import com.google.gson.TypeAdapter; @@ -25,6 +25,7 @@ import lombok.Setter; import lombok.experimental.Accessors; import lombok.experimental.SuperBuilder; +import org.polypheny.db.webui.models.SortState; /** diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationColumnModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationColumnModel.java similarity index 94% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationColumnModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationColumnModel.java index 19e832b9fa..30c0e556bf 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationColumnModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationColumnModel.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import lombok.EqualsAndHashCode; import lombok.Value; import org.polypheny.db.catalog.entity.allocation.AllocationColumn; import org.polypheny.db.catalog.logistic.PlacementType; +import org.polypheny.db.webui.models.catalog.IdEntity; @EqualsAndHashCode(callSuper = true) @Value diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationEntityModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationEntityModel.java similarity index 92% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationEntityModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationEntityModel.java index 25b5331e12..db00f78d83 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationEntityModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationEntityModel.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.allocation.AllocationEntity; +import org.polypheny.db.webui.models.catalog.IdEntity; public class AllocationEntityModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationPartitionModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationPartitionModel.java similarity index 91% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationPartitionModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationPartitionModel.java index 36f0f26099..2771f99df7 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationPartitionModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationPartitionModel.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.allocation.AllocationPartition; +import org.polypheny.db.webui.models.catalog.IdEntity; public class AllocationPartitionModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationPlacementModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationPlacementModel.java similarity index 92% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationPlacementModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationPlacementModel.java index 3fb55ebde2..c0cee996b3 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/AllocationPlacementModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/AllocationPlacementModel.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.allocation.AllocationPlacement; +import org.polypheny.db.webui.models.catalog.IdEntity; public class AllocationPlacementModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/CollectionModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/CollectionModel.java similarity index 96% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/CollectionModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/CollectionModel.java index 60b4ff60c0..7efde351cb 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/CollectionModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/CollectionModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.logical.LogicalCollection; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/ColumnModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/ColumnModel.java similarity index 97% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/ColumnModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/ColumnModel.java index d7c90fdd0a..102d95e0b1 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/ColumnModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/ColumnModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.logical.LogicalColumn; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/ConstraintModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/ConstraintModel.java similarity index 92% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/ConstraintModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/ConstraintModel.java index b8eed41c11..383076aed9 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/ConstraintModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/ConstraintModel.java @@ -14,11 +14,12 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.LogicalConstraint; import org.polypheny.db.catalog.logistic.ConstraintType; +import org.polypheny.db.webui.models.catalog.IdEntity; public class ConstraintModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/EntityModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/EntityModel.java similarity index 93% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/EntityModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/EntityModel.java index b6386b2d1b..7c8f9ac615 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/EntityModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/EntityModel.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.logical.LogicalEntity; import org.polypheny.db.catalog.logistic.EntityType; import org.polypheny.db.catalog.logistic.NamespaceType; +import org.polypheny.db.webui.models.catalog.IdEntity; public class EntityModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/FieldModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/FieldModel.java similarity index 89% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/FieldModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/FieldModel.java index faebc847aa..d6ad2f33cd 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/FieldModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/FieldModel.java @@ -14,9 +14,10 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; +import org.polypheny.db.webui.models.catalog.IdEntity; public class FieldModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/GraphModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/GraphModel.java similarity index 96% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/GraphModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/GraphModel.java index a72d2ff67d..85d82ffe2e 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/GraphModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/GraphModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.logical.LogicalGraph; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/KeyModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/KeyModel.java similarity index 93% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/KeyModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/KeyModel.java index f6111e62e9..138867c255 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/KeyModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/KeyModel.java @@ -14,12 +14,13 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import java.util.List; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.logical.LogicalKey; import org.polypheny.db.catalog.entity.logical.LogicalPrimaryKey; +import org.polypheny.db.webui.models.catalog.IdEntity; public class KeyModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/NamespaceModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/NamespaceModel.java similarity index 92% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/NamespaceModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/NamespaceModel.java index a57ab4b639..8bddcbaa75 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/NamespaceModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/NamespaceModel.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.polypheny.db.catalog.entity.logical.LogicalNamespace; import org.polypheny.db.catalog.logistic.NamespaceType; +import org.polypheny.db.webui.models.catalog.IdEntity; public class NamespaceModel extends IdEntity { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/catalog/TableModel.java b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/TableModel.java similarity index 96% rename from webui/src/main/java/org/polypheny/db/webui/models/catalog/TableModel.java rename to webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/TableModel.java index b2e0dd7f53..50014b7070 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/catalog/TableModel.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/catalog/schema/TableModel.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.polypheny.db.webui.models.catalog; +package org.polypheny.db.webui.models.catalog.schema; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.entity.logical.LogicalTable; diff --git a/webui/src/main/java/org/polypheny/db/webui/models/requests/ColumnRequest.java b/webui/src/main/java/org/polypheny/db/webui/models/requests/ColumnRequest.java index a2a469dac8..2ec0c1a7db 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/requests/ColumnRequest.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/requests/ColumnRequest.java @@ -17,7 +17,7 @@ package org.polypheny.db.webui.models.requests; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; public class ColumnRequest extends UIRequest { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/requests/EditTableRequest.java b/webui/src/main/java/org/polypheny/db/webui/models/requests/EditTableRequest.java index 7dc60f485a..e0051605d2 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/requests/EditTableRequest.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/requests/EditTableRequest.java @@ -21,7 +21,7 @@ import lombok.Value; import org.jetbrains.annotations.Nullable; import org.polypheny.db.catalog.logistic.EntityType; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; /** diff --git a/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreData.java b/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreData.java index cb5486c940..78f0f16efe 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreData.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreData.java @@ -17,7 +17,7 @@ package org.polypheny.db.webui.models.requests; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; public class ExploreData { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreTables.java b/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreTables.java index 0a5793e3e6..02d15ff3bd 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreTables.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/requests/ExploreTables.java @@ -17,7 +17,7 @@ package org.polypheny.db.webui.models.requests; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; public class ExploreTables extends UIRequest{ diff --git a/webui/src/main/java/org/polypheny/db/webui/models/results/DocResult.java b/webui/src/main/java/org/polypheny/db/webui/models/results/DocResult.java index 47041153ad..a9f187f3a7 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/results/DocResult.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/results/DocResult.java @@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode; import lombok.Value; import lombok.experimental.SuperBuilder; -import org.polypheny.db.webui.models.FieldDefinition; +import org.polypheny.db.webui.models.catalog.FieldDefinition; @EqualsAndHashCode(callSuper = true) @SuperBuilder(toBuilder = true) diff --git a/webui/src/main/java/org/polypheny/db/webui/models/results/ExploreResult.java b/webui/src/main/java/org/polypheny/db/webui/models/results/ExploreResult.java index 921e51bfee..e5a4c35c38 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/results/ExploreResult.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/results/ExploreResult.java @@ -18,7 +18,7 @@ import java.util.List; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; public class ExploreResult { diff --git a/webui/src/main/java/org/polypheny/db/webui/models/results/GraphResult.java b/webui/src/main/java/org/polypheny/db/webui/models/results/GraphResult.java index 22ab46f8bd..bb684431e3 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/results/GraphResult.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/results/GraphResult.java @@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode; import lombok.Value; import lombok.experimental.SuperBuilder; -import org.polypheny.db.webui.models.FieldDefinition; +import org.polypheny.db.webui.models.catalog.FieldDefinition; @EqualsAndHashCode(callSuper = true) @SuperBuilder(toBuilder = true) diff --git a/webui/src/main/java/org/polypheny/db/webui/models/results/RelationalResult.java b/webui/src/main/java/org/polypheny/db/webui/models/results/RelationalResult.java index 30727ba6ae..96a89bcec1 100644 --- a/webui/src/main/java/org/polypheny/db/webui/models/results/RelationalResult.java +++ b/webui/src/main/java/org/polypheny/db/webui/models/results/RelationalResult.java @@ -34,8 +34,8 @@ import org.polypheny.db.catalog.logistic.NamespaceType; import org.polypheny.db.languages.QueryLanguage; import org.polypheny.db.webui.HttpServer; -import org.polypheny.db.webui.models.FieldDefinition; -import org.polypheny.db.webui.models.UiColumnDefinition; +import org.polypheny.db.webui.models.catalog.FieldDefinition; +import org.polypheny.db.webui.models.catalog.UiColumnDefinition; import org.polypheny.db.webui.models.requests.UIRequest;