Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.0 pre #28

Merged
merged 4 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<packaging>jar</packaging>
<artifactId>globs</artifactId>
<name>Generic Lightweight ObjectS</name>
<version>3.3-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -108,15 +108,21 @@
<dependency>
<groupId>org.globsframework</groupId>
<artifactId>saxstack</artifactId>
<version>3.3-SNAPSHOT</version>
<version>4.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.globsframework</groupId>-->
<!-- <artifactId>globs-generate</artifactId>-->
<!-- <version>4.0-SNAPSHOT</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.4</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.globsframework</groupId>-->
<!-- <artifactId>globs-generate</artifactId>-->
<!-- <version>3.0</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.globsframework.functional;

import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.model.FieldValues;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.globsframework.functional;

import org.globsframework.functional.impl.DefaultFunctionalKeyBuilderFactory;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;

public interface FunctionalKeyBuilderFactory {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.globsframework.functional.impl;

import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.fields.*;
import org.globsframework.model.FieldSetter;
import org.globsframework.model.FieldValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.globsframework.functional.FunctionalKeyBuilder;
import org.globsframework.functional.FunctionalKeyBuilderFactory;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.globsframework.functional.FunctionalKey;
import org.globsframework.functional.FunctionalKeyBuilder;
import org.globsframework.functional.MutableFunctionalKey;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.fields.FieldValueVisitor;
import org.globsframework.model.FieldValue;
import org.globsframework.model.FieldValues;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.globsframework.functional.FunctionalKey;
import org.globsframework.functional.FunctionalKeyBuilder;
import org.globsframework.functional.MutableFunctionalKey;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.model.FieldValues;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.globsframework.functional.FunctionalKey;
import org.globsframework.functional.FunctionalKeyBuilder;
import org.globsframework.functional.MutableFunctionalKey;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.fields.FieldValueVisitor;
import org.globsframework.model.FieldValue;
import org.globsframework.utils.exceptions.ItemNotFound;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.globsframework.functional.FunctionalKey;
import org.globsframework.functional.FunctionalKeyBuilder;
import org.globsframework.functional.MutableFunctionalKey;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.model.FieldValues;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.globsframework.functional.FunctionalKey;
import org.globsframework.functional.FunctionalKeyBuilder;
import org.globsframework.functional.MutableFunctionalKey;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.fields.FieldValueVisitor;
import org.globsframework.model.FieldValue;
import org.globsframework.utils.exceptions.ItemNotFound;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.globsframework.functional.FunctionalKey;
import org.globsframework.functional.FunctionalKeyBuilder;
import org.globsframework.functional.MutableFunctionalKey;
import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.model.FieldValues;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.globsframework.metamodel;

import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.impl.DefaultAnnotations;
import org.globsframework.model.Glob;
import org.globsframework.model.Key;
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/org/globsframework/metamodel/GlobModel.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package org.globsframework.metamodel;

import org.globsframework.metamodel.properties.Property;
import org.globsframework.metamodel.properties.impl.PropertiesBuilder;
import org.globsframework.metamodel.utils.GlobTypeDependencies;
import org.globsframework.utils.exceptions.ItemNotFound;

import java.util.Collection;

Expand All @@ -17,11 +14,5 @@ public interface GlobModel extends Iterable<GlobType>, GlobTypeResolver {

GlobTypeDependencies getDependencies();

<T>
Property<GlobType, T> createGlobTypeProperty(String name, final PropertiesBuilder.PropertyBuilder<GlobType, T> valueBuilder);

<T>
Property<Field, T> createFieldProperty(String name, final PropertiesBuilder.PropertyBuilder<Field, T> fieldValueBuilder);

GlobLinkModel getLinkModel();
}
6 changes: 3 additions & 3 deletions src/main/java/org/globsframework/metamodel/GlobType.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package org.globsframework.metamodel;

import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.fields.FieldVisitor;
import org.globsframework.metamodel.fields.FieldVisitorWithContext;
import org.globsframework.metamodel.impl.DefaultValuesFieldVisitor;
import org.globsframework.metamodel.index.Index;
import org.globsframework.metamodel.properties.PropertyHolder;
import org.globsframework.metamodel.utils.MutableAnnotations;
import org.globsframework.model.GlobFactory;
import org.globsframework.model.Key;
import org.globsframework.model.MutableGlob;
import org.globsframework.utils.exceptions.ItemNotFound;

import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.Optional;
import java.util.stream.Stream;

public interface GlobType extends PropertyHolder<GlobType>, Annotations {
public interface GlobType extends MutableAnnotations {

String getName();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.globsframework.metamodel;

import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.index.MultiFieldNotUniqueIndex;
import org.globsframework.metamodel.index.MultiFieldUniqueIndex;
import org.globsframework.metamodel.index.NotUniqueIndex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.globsframework.metamodel;

import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.links.DirectLink;
import org.globsframework.metamodel.links.Link;
import org.globsframework.metamodel.utils.MutableAnnotations;
Expand Down Expand Up @@ -44,7 +45,7 @@ interface DirectLinkBuilder extends LinkBuilder<DirectLinkBuilder> {
DirectLink publish();
}

interface LinkBuilder<T extends LinkBuilder> extends MutableAnnotations<T> {
interface LinkBuilder<T extends LinkBuilder> extends MutableAnnotations {

T add(Field sourceField, Field targetField);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.globsframework.metamodel.annotations;

import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.metamodel.GlobTypeLoaderFactory;
import org.globsframework.metamodel.fields.StringArrayField;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.globsframework.metamodel.annotations;

import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.metamodel.fields.StringField;
import org.globsframework.metamodel.impl.DefaultFieldFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.globsframework.metamodel.annotations;

import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.metamodel.GlobTypeLoader;
import org.globsframework.metamodel.GlobTypeLoaderFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.globsframework.metamodel.annotations;

import org.globsframework.metamodel.Field;
import org.globsframework.metamodel.fields.Field;
import org.globsframework.metamodel.GlobType;
import org.globsframework.metamodel.GlobTypeLoaderFactory;
import org.globsframework.metamodel.fields.StringField;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.math.BigDecimal;
import java.util.function.Function;

public interface BigDecimalArrayField extends Field, Function<FieldValuesAccessor, BigDecimal[]> {
public non-sealed interface BigDecimalArrayField extends Field, Function<FieldValuesAccessor, BigDecimal[]> {
default BigDecimal[] apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.math.BigDecimal;
import java.util.function.Function;

public interface BigDecimalField extends Field, Function<FieldValuesAccessor, BigDecimal> {
public non-sealed interface BigDecimalField extends Field, Function<FieldValuesAccessor, BigDecimal> {
default BigDecimal apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.util.function.Function;

public interface BlobField extends Field, Function<FieldValuesAccessor, byte[]> {
public non-sealed interface BlobField extends Field, Function<FieldValuesAccessor, byte[]> {
default byte[] apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.util.function.Function;

public interface BooleanArrayField extends Field, Function<FieldValuesAccessor, boolean[]> {
public non-sealed interface BooleanArrayField extends Field, Function<FieldValuesAccessor, boolean[]> {
default boolean[] apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.util.function.Function;
import java.util.function.Predicate;

public interface BooleanField extends Field, Function<FieldValuesAccessor, Boolean>, Predicate<FieldValuesAccessor> {
public non-sealed interface BooleanField extends Field, Function<FieldValuesAccessor, Boolean>, Predicate<FieldValuesAccessor> {
default Boolean apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.time.LocalDate;
import java.util.function.Function;

public interface DateField extends Field, Function<FieldValuesAccessor, LocalDate> {
public non-sealed interface DateField extends Field, Function<FieldValuesAccessor, LocalDate> {
default LocalDate apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.time.ZonedDateTime;
import java.util.function.Function;

public interface DateTimeField extends Field, Function<FieldValuesAccessor, ZonedDateTime> {
public non-sealed interface DateTimeField extends Field, Function<FieldValuesAccessor, ZonedDateTime> {
default ZonedDateTime apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.util.function.Function;

public interface DoubleArrayField extends Field, Function<FieldValuesAccessor, double[]> {
public non-sealed interface DoubleArrayField extends Field, Function<FieldValuesAccessor, double[]> {
default double[] apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.globsframework.metamodel.fields;

import org.globsframework.metamodel.Field;
import org.globsframework.model.FieldValuesAccessor;

import java.util.function.Function;

public interface DoubleField extends Field, Function<FieldValuesAccessor, Double> {
public non-sealed interface DoubleField extends Field, Function<FieldValuesAccessor, Double> {
default Double apply(FieldValuesAccessor glob) {
return glob.get(this);
}
Expand Down
Loading
Loading