Search in sources :

Example 6 with ClientProperty

use of eu.esdihumboldt.hale.io.appschema.impl.internal.generated.app_schema.AttributeMappingType.ClientProperty in project hale by halestudio.

the class AppSchemaMappingWrapper method cloneAttributeMapping.

static AttributeMappingType cloneAttributeMapping(AttributeMappingType attrMapping) {
    AttributeMappingType clone = new AttributeMappingType();
    clone.setEncodeIfEmpty(attrMapping.isEncodeIfEmpty());
    clone.setIsList(attrMapping.isIsList());
    clone.setIsMultiple(attrMapping.isIsMultiple());
    for (ClientProperty clientProp : attrMapping.getClientProperty()) {
        ClientProperty clientPropClone = new ClientProperty();
        clientPropClone.setName(clientProp.getName());
        clientPropClone.setValue(clientProp.getValue());
        clone.getClientProperty().add(clientPropClone);
    }
    clone.setIdExpression(cloneAttributeExpression(attrMapping.getIdExpression()));
    clone.setInstancePath(attrMapping.getInstancePath());
    clone.setLabel(attrMapping.getLabel());
    clone.setParentLabel(attrMapping.getParentLabel());
    clone.setSourceExpression(cloneAttributeExpression(attrMapping.getSourceExpression()));
    clone.setTargetAttribute(attrMapping.getTargetAttribute());
    clone.setTargetAttributeNode(attrMapping.getTargetAttributeNode());
    clone.setTargetQueryString(attrMapping.getTargetQueryString());
    return clone;
}
Also used : ClientProperty(eu.esdihumboldt.hale.io.appschema.impl.internal.generated.app_schema.AttributeMappingType.ClientProperty) AttributeMappingType(eu.esdihumboldt.hale.io.appschema.impl.internal.generated.app_schema.AttributeMappingType)

Aggregations

ClientProperty (eu.esdihumboldt.hale.io.appschema.impl.internal.generated.app_schema.AttributeMappingType.ClientProperty)6 AttributeMappingType (eu.esdihumboldt.hale.io.appschema.impl.internal.generated.app_schema.AttributeMappingType)4 ParameterValue (eu.esdihumboldt.hale.common.align.model.ParameterValue)3 DefaultCell (eu.esdihumboldt.hale.common.align.model.impl.DefaultCell)3 AssignHandler (eu.esdihumboldt.hale.io.appschema.writer.internal.AssignHandler)3 AppSchemaMappingContext (eu.esdihumboldt.hale.io.appschema.writer.internal.mapping.AppSchemaMappingContext)3 Test (org.junit.Test)3 Cell (eu.esdihumboldt.hale.common.align.model.Cell)1 ChildContext (eu.esdihumboldt.hale.common.align.model.ChildContext)1 EntityDefinition (eu.esdihumboldt.hale.common.align.model.EntityDefinition)1 PropertyEntityDefinition (eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition)1 PropertyDefinition (eu.esdihumboldt.hale.common.schema.model.PropertyDefinition)1 Namespace (eu.esdihumboldt.hale.io.appschema.impl.internal.generated.app_schema.NamespacesPropertyType.Namespace)1 RenameHandler (eu.esdihumboldt.hale.io.appschema.writer.internal.RenameHandler)1