use of org.geotoolkit.ogc.xml.v110.LiteralType in project flytekit-java by flyteorg.
the class SdkBindingData method ofPrimitive.
public static SdkBindingData ofPrimitive(Primitive primitive) {
BindingData bindingData = BindingData.ofScalar(Scalar.ofPrimitive(primitive));
LiteralType literalType = LiteralType.ofSimpleType(getSimpleType(primitive.kind()));
return create(bindingData, literalType);
}
use of org.geotoolkit.ogc.xml.v110.LiteralType in project flytekit-java by flyteorg.
the class TestingSdkWorkflowBuilder method inputOf.
@Override
public SdkBindingData inputOf(String name, LiteralType literalType, String help) {
LiteralType fixedInputType = fixedInputTypeMap.get(name);
Literal fixedInput = fixedInputMap.get(name);
checkArgument(fixedInputType != null, "Fixed input [%s] (of type %s) isn't defined, use SdkTestingExecutor#withFixedInput", name, LiteralTypes.toPrettyString(literalType));
checkArgument(fixedInputType.equals(literalType), "Fixed input [%s] (of type %s) doesn't match expected type %s", name, LiteralTypes.toPrettyString(fixedInputType), LiteralTypes.toPrettyString(literalType));
return SdkBindingData.create(Literals.toBindingData(fixedInput), fixedInputType);
}
use of org.geotoolkit.ogc.xml.v110.LiteralType in project geotoolkit by Geomatys.
the class FilterFactoryImpl method crosses.
@Override
public BinarySpatialOperator<Object> crosses(final Expression<Object, ?> geometry1, final Expression<Object, ?> geometry2) {
PropertyNameType propertyName = null;
if (geometry1 instanceof PropertyNameType) {
propertyName = (PropertyNameType) geometry1;
} else {
throw new IllegalArgumentException("unexpected type instead of propertyNameType: " + geometry1.getClass().getSimpleName());
}
// we transform the JTS geometry into a GML geometry
Object geom = null;
if (geometry2 instanceof LiteralType) {
geom = ((LiteralType) geometry2).getValue();
geom = GeometryToGML(geom);
}
return new CrossesType(propertyName, geom);
}
use of org.geotoolkit.ogc.xml.v110.LiteralType in project geotoolkit by Geomatys.
the class FilterFactoryImpl method greater.
@Override
public BinaryComparisonOperator<Object> greater(final Expression<Object, ?> expr1, final Expression<Object, ?> expr2) {
LiteralType lit = null;
PropertyNameType propName = null;
if (expr1 instanceof PropertyNameType) {
propName = (PropertyNameType) expr1;
} else if (expr2 instanceof PropertyNameType) {
propName = (PropertyNameType) expr2;
}
if (expr1 instanceof LiteralType) {
lit = (LiteralType) expr1;
} else if (expr2 instanceof LiteralType) {
lit = (LiteralType) expr2;
}
return new PropertyIsGreaterThanType(lit, propName, null);
}
use of org.geotoolkit.ogc.xml.v110.LiteralType in project geotoolkit by Geomatys.
the class FilterFactoryImpl method greaterOrEqual.
@Override
public BinaryComparisonOperator<Object> greaterOrEqual(final Expression<Object, ?> expr1, final Expression<Object, ?> expr2, final boolean matchCase, final MatchAction action) {
LiteralType lit = null;
PropertyNameType propName = null;
if (expr1 instanceof PropertyNameType) {
propName = (PropertyNameType) expr1;
} else if (expr2 instanceof PropertyNameType) {
propName = (PropertyNameType) expr2;
}
if (expr1 instanceof LiteralType) {
lit = (LiteralType) expr1;
} else if (expr2 instanceof LiteralType) {
lit = (LiteralType) expr2;
}
return new PropertyIsGreaterThanOrEqualToType(lit, propName, matchCase);
}
Aggregations