use of eu.esdihumboldt.hale.common.schema.model.TypeConstraint in project hale by halestudio.
the class LineStringHandler method initConstraints.
/**
* @see eu.esdihumboldt.hale.io.gml.geometry.FixedConstraintsGeometryHandler#initConstraints()
*/
@Override
protected Collection<? extends TypeConstraint> initConstraints() {
Collection<TypeConstraint> constraints = new ArrayList<TypeConstraint>(2);
constraints.add(Binding.get(GeometryProperty.class));
constraints.add(GeometryType.get(LineString.class));
constraints.add(new GeometryFactory(this));
return constraints;
}
use of eu.esdihumboldt.hale.common.schema.model.TypeConstraint in project hale by halestudio.
the class RingHandler method initConstraints.
@Override
protected Collection<? extends TypeConstraint> initConstraints() {
Collection<TypeConstraint> constraints = new ArrayList<TypeConstraint>(2);
constraints.add(Binding.get(GeometryProperty.class));
constraints.add(GeometryType.get(LinearRing.class));
constraints.add(new GeometryFactory(this));
return constraints;
}
use of eu.esdihumboldt.hale.common.schema.model.TypeConstraint in project hale by halestudio.
the class DefaultSchemaSpace method toggleMappingRelevant.
/**
* @see eu.esdihumboldt.hale.common.schema.model.TypeIndex#toggleMappingRelevant(java.util.Collection)
*/
@Override
public void toggleMappingRelevant(Collection<? extends TypeDefinition> types) {
synchronized (this) {
for (TypeDefinition type : types) {
Schema container = null;
for (Schema schema : schemas) if (schema.getTypes().contains(type)) {
container = schema;
break;
}
// toggle type in its schema
if (container != null)
container.toggleMappingRelevant(Collections.singletonList(type));
else {
// shouldn't happen, but to be safe toggle it in this case
// too
Definition<TypeConstraint> def = type;
((AbstractDefinition<TypeConstraint>) def).setConstraint(MappingRelevantFlag.get(!type.getConstraint(MappingRelevantFlag.class).isEnabled()));
}
// was toggled, update own list
if (mappingRelevantTypes != null)
if (type.getConstraint(MappingRelevantFlag.class).isEnabled())
mappingRelevantTypes.add(type);
else
mappingRelevantTypes.remove(type);
}
}
}
use of eu.esdihumboldt.hale.common.schema.model.TypeConstraint in project hale by halestudio.
the class ArcHandler method initConstraints.
@Override
protected Collection<? extends TypeConstraint> initConstraints() {
Collection<TypeConstraint> constraints = new ArrayList<TypeConstraint>(2);
constraints.add(Binding.get(GeometryProperty.class));
constraints.add(GeometryType.get(LineString.class));
constraints.add(new GeometryFactory(this));
return constraints;
}
use of eu.esdihumboldt.hale.common.schema.model.TypeConstraint in project hale by halestudio.
the class ArcStringHandler method initConstraints.
/**
* @see eu.esdihumboldt.hale.io.gml.geometry.FixedConstraintsGeometryHandler#initConstraints()
*/
@Override
protected Collection<? extends TypeConstraint> initConstraints() {
Collection<TypeConstraint> constraints = new ArrayList<TypeConstraint>(2);
constraints.add(Binding.get(GeometryProperty.class));
constraints.add(GeometryType.get(LineString.class));
constraints.add(new GeometryFactory(this));
return constraints;
}
Aggregations