mirror of
https://github.com/OpenSPG/openspg.git
synced 2026-01-06 12:22:25 +00:00
bugfix
This commit is contained in:
parent
4621cdace5
commit
0ee673d9f6
@ -3,12 +3,12 @@ package com.antgroup.openspg.builder.core.property;
|
||||
import com.antgroup.openspg.builder.core.property.impl.PropertyIdEqualsNormalizer;
|
||||
import com.antgroup.openspg.builder.core.property.impl.PropertyOperatorNormalizer;
|
||||
import com.antgroup.openspg.builder.model.pipeline.config.OperatorPropertyNormalizerConfig;
|
||||
import com.antgroup.openspg.builder.model.pipeline.config.PropertyNormalizerConfig;
|
||||
import com.antgroup.openspg.builder.model.pipeline.config.BasePropertyNormalizerConfig;
|
||||
import com.antgroup.openspg.builder.model.pipeline.enums.PropertyNormalizerTypeEnum;
|
||||
|
||||
public class PropertyNormalizerFactory {
|
||||
|
||||
public static PropertyNormalizer getPropertyNormalizer(PropertyNormalizerConfig config) {
|
||||
public static PropertyNormalizer getPropertyNormalizer(BasePropertyNormalizerConfig config) {
|
||||
PropertyNormalizerTypeEnum normalizerType = config.getNormalizerType();
|
||||
switch (normalizerType) {
|
||||
case OPERATOR:
|
||||
|
||||
@ -35,7 +35,7 @@ public class BuilderJsonUtils {
|
||||
.recognizeSubtypes())
|
||||
.registerTypeAdapterFactory(
|
||||
RuntimeTypeAdapterFactory.of(
|
||||
PropertyNormalizerConfig.class, DEFAULT_TYPE_FIELD_NAME)
|
||||
BasePropertyNormalizerConfig.class, DEFAULT_TYPE_FIELD_NAME)
|
||||
.registerSubtype(
|
||||
OperatorPropertyNormalizerConfig.class,
|
||||
PropertyNormalizerTypeEnum.OPERATOR.name())
|
||||
|
||||
@ -24,7 +24,7 @@ public abstract class BaseMappingNodeConfig extends BaseNodeConfig {
|
||||
public static class MappingConfig {
|
||||
private final String source;
|
||||
private final String target;
|
||||
private final PropertyNormalizerConfig normalizerConfig;
|
||||
private final BasePropertyNormalizerConfig normalizerConfig;
|
||||
}
|
||||
|
||||
public abstract List<BaseSPGIdentifier> getIdentifiers();
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
package com.antgroup.openspg.builder.model.pipeline.config;
|
||||
|
||||
import com.antgroup.openspg.builder.model.pipeline.enums.PropertyNormalizerTypeEnum;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public abstract class BasePropertyMounterConfig {
|
||||
|
||||
/** the type of property mounter */
|
||||
private final PropertyNormalizerTypeEnum type;
|
||||
|
||||
protected BasePropertyMounterConfig(PropertyNormalizerTypeEnum type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@ -5,11 +5,11 @@ import com.antgroup.openspg.server.common.model.base.BaseValObj;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public abstract class PropertyNormalizerConfig extends BaseValObj {
|
||||
public abstract class BasePropertyNormalizerConfig extends BaseValObj {
|
||||
|
||||
private final PropertyNormalizerTypeEnum normalizerType;
|
||||
|
||||
public PropertyNormalizerConfig(PropertyNormalizerTypeEnum normalizerType) {
|
||||
public BasePropertyNormalizerConfig(PropertyNormalizerTypeEnum normalizerType) {
|
||||
this.normalizerType = normalizerType;
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,7 @@ package com.antgroup.openspg.builder.model.pipeline.config;
|
||||
|
||||
import com.antgroup.openspg.builder.model.pipeline.enums.PropertyNormalizerTypeEnum;
|
||||
|
||||
public class IdEqualsPropertyNormalizerConfig extends PropertyNormalizerConfig {
|
||||
public class IdEqualsPropertyNormalizerConfig extends BasePropertyNormalizerConfig {
|
||||
|
||||
public IdEqualsPropertyNormalizerConfig() {
|
||||
super(PropertyNormalizerTypeEnum.ID_EQUALS);
|
||||
|
||||
@ -4,7 +4,7 @@ import com.antgroup.openspg.builder.model.pipeline.enums.PropertyNormalizerTypeE
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class OperatorPropertyNormalizerConfig extends PropertyNormalizerConfig {
|
||||
public class OperatorPropertyNormalizerConfig extends BasePropertyNormalizerConfig {
|
||||
|
||||
private final OperatorConfig operatorConfig;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user