-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
185 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
webui/src/main/java/org/polypheny/db/webui/models/IndexAdapterModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* 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.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Value; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.polypheny.db.adapter.DataStore; | ||
import org.polypheny.db.adapter.DataStore.AvailableIndexMethod; | ||
import org.polypheny.db.webui.models.catalog.IdEntity; | ||
|
||
@EqualsAndHashCode(callSuper = true) | ||
@Value | ||
public class IndexAdapterModel extends IdEntity { | ||
|
||
public List<IndexMethodModel> availableIndexMethods; | ||
|
||
|
||
public IndexAdapterModel( @Nullable Long id, @Nullable String name, List<IndexMethodModel> availableIndexMethods ) { | ||
super( id, name ); | ||
this.availableIndexMethods = availableIndexMethods; | ||
} | ||
|
||
|
||
public static IndexAdapterModel from( DataStore<?> store ) { | ||
return new IndexAdapterModel( store.adapterId, store.getUniqueName(), store.getAvailableIndexMethods().stream().map( IndexMethodModel::from ).collect( Collectors.toList() ) ); | ||
} | ||
|
||
|
||
@AllArgsConstructor | ||
public static class IndexMethodModel { | ||
|
||
public String name; | ||
public String displayName; | ||
|
||
|
||
public static IndexMethodModel from( AvailableIndexMethod index ) { | ||
return new IndexMethodModel( index.name, index.displayName ); | ||
} | ||
|
||
} | ||
|
||
} |
40 changes: 40 additions & 0 deletions
40
webui/src/main/java/org/polypheny/db/webui/models/catalog/PolyTypeModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* 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.catalog; | ||
|
||
import lombok.Value; | ||
import org.polypheny.db.type.PolyType; | ||
|
||
@Value | ||
public class PolyTypeModel { | ||
|
||
public String name; | ||
|
||
public int signatures; | ||
|
||
|
||
public PolyTypeModel( String name, int signatures ) { | ||
this.name = name; | ||
this.signatures = signatures; | ||
} | ||
|
||
|
||
public static PolyTypeModel from( PolyType type ) { | ||
return new PolyTypeModel( type.name(), type.getSignatures() ); | ||
} | ||
|
||
} |
Oops, something went wrong.