Skip to content

Commit 8c8c28f

Browse files
committed
check implementation
Signed-off-by: dbulahov <bulahovdenis@gmail.com>
1 parent dcc459a commit 8c8c28f

37 files changed

+1348
-0
lines changed

check/api/pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.eclipse.daanse</groupId>
7+
<artifactId>org.eclipse.daanse.check</artifactId>
8+
<version>${revision}</version>
9+
</parent>
10+
<artifactId>org.eclipse.daanse.check.api</artifactId>
11+
<packaging>jar</packaging>
12+
13+
<dependencies>
14+
<dependency>
15+
<groupId>org.assertj</groupId>
16+
<artifactId>assertj-core</artifactId>
17+
<scope>compile</scope>
18+
<version>${assertj.version}</version>
19+
</dependency>
20+
<dependency>
21+
<groupId>org.eclipse.daanse</groupId>
22+
<artifactId>org.eclipse.daanse.olap.api</artifactId>
23+
<version>0.0.1-SNAPSHOT</version>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.eclipse.daanse</groupId>
27+
<artifactId>org.eclipse.daanse.check.assertj</artifactId>
28+
<version>0.0.1-SNAPSHOT</version>
29+
</dependency>
30+
</dependencies>
31+
</project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena, Stefan Bischof - initial
12+
*
13+
*/
14+
package org.eclipse.daanse.check.api;
15+
16+
import org.assertj.core.api.Condition;
17+
18+
public interface Check<T>{
19+
20+
Condition<T> condition();
21+
22+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena, Stefan Bischof - initial
12+
*
13+
*/
14+
package org.eclipse.daanse.check.api.cube;
15+
16+
import org.eclipse.daanse.check.api.Check;
17+
import org.eclipse.daanse.olap.api.element.Cube;
18+
19+
public interface CaptionCheck extends Check<Cube> {
20+
21+
void captionCheck(Cube cube);
22+
23+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena, Stefan Bischof - initial
12+
*
13+
*/
14+
package org.eclipse.daanse.check.api.cube;
15+
16+
import org.eclipse.daanse.check.api.Check;
17+
import org.eclipse.daanse.check.api.Selector;
18+
import org.eclipse.daanse.olap.api.element.Cube;
19+
20+
public interface CubeSelector extends Selector<Check<Cube>>{
21+
22+
String name(); //it's enough to take cube from context
23+
24+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena, Stefan Bischof - initial
12+
*
13+
*/
14+
package org.eclipse.daanse.check.api.cube;
15+
16+
import org.eclipse.daanse.check.api.Check;
17+
import org.eclipse.daanse.olap.api.element.Cube;
18+
19+
public interface DescriptionCheck extends Check<Cube> {
20+
21+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena, Stefan Bischof - initial
12+
*
13+
*/
14+
package org.eclipse.daanse.check.api.cube;
15+
16+
import org.eclipse.daanse.check.api.Check;
17+
import org.eclipse.daanse.olap.api.element.Cube;
18+
19+
public interface NameCheck extends Check<Cube>{
20+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
*/
13+
14+
@org.osgi.annotation.bundle.Export
15+
@org.osgi.annotation.versioning.Version("0.0.1")
16+
package org.eclipse.daanse.check.api.cube;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena - initial
12+
*/
13+
14+
@org.osgi.annotation.bundle.Export
15+
@org.osgi.annotation.versioning.Version("0.0.1")
16+
package org.eclipse.daanse.check.api;

check/assertj/pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.eclipse.daanse</groupId>
7+
<artifactId>org.eclipse.daanse.check</artifactId>
8+
<version>${revision}</version>
9+
</parent>
10+
<artifactId>org.eclipse.daanse.check.assertj</artifactId>
11+
<packaging>jar</packaging>
12+
13+
<dependencies>
14+
<dependency>
15+
<groupId>org.assertj</groupId>
16+
<artifactId>assertj-core</artifactId>
17+
<scope>compile</scope>
18+
<version>${assertj.version}</version>
19+
</dependency>
20+
<dependency>
21+
<groupId>org.eclipse.daanse</groupId>
22+
<artifactId>org.eclipse.daanse.olap.api</artifactId>
23+
<version>0.0.1-SNAPSHOT</version>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.eclipse.daanse</groupId>
27+
<artifactId>org.eclipse.daanse.check.predicate</artifactId>
28+
<version>0.0.1-SNAPSHOT</version>
29+
</dependency>
30+
</dependencies>
31+
</project>
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2025 Contributors to the Eclipse Foundation.
3+
*
4+
* This program and the accompanying materials are made
5+
* available under the terms of the Eclipse Public License 2.0
6+
* which is available at https://www.eclipse.org/legal/epl-2.0/
7+
*
8+
* SPDX-License-Identifier: EPL-2.0
9+
*
10+
* Contributors:
11+
* SmartCity Jena, Stefan Bischof - initial
12+
*
13+
*/
14+
package org.eclipse.daanse.check.assertj;
15+
16+
import org.assertj.core.api.Condition;
17+
import org.eclipse.daanse.check.predicate.CatalogPredicates;
18+
import org.eclipse.daanse.olap.api.element.Catalog;
19+
20+
public class CatalogConditions {
21+
22+
public static Condition<Catalog> isExist = new Condition<>(CatalogPredicates.isExist(), "is exist");
23+
24+
public static Condition<Catalog> hasCubes = new Condition<>(CatalogPredicates.hasCubes(), "has cubes");
25+
26+
public static Condition<Catalog> hasDatabaseSchemas = new Condition<>(CatalogPredicates.hasDatabaseSchemas(), "has database schemas");
27+
28+
public static Condition<Catalog> hasDescription = new Condition<>(CatalogPredicates.hasDescription(), "has description");
29+
30+
public static Condition<Catalog> hasId = new Condition<>(CatalogPredicates.hasId(), "has id");
31+
32+
public static Condition<Catalog> hasMetaData = new Condition<>(CatalogPredicates.hasMetaData(), "has meta data");
33+
34+
public static Condition<Catalog> hasName = new Condition<>(CatalogPredicates.hasName(), "has name");
35+
36+
public static Condition<Catalog> hasParameters = new Condition<>(CatalogPredicates.hasParameters(), "has parameters");
37+
38+
public static Condition<Catalog> hasWarnings = new Condition<>(CatalogPredicates.hasWarnings(), "has warnings");
39+
}

0 commit comments

Comments
 (0)