Revision 43034 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/ExpressionBuilderBase.java
ExpressionBuilderBase.java | ||
---|---|---|
29 | 29 |
import org.gvsig.fmap.dal.ExpressionBuilder.Visitor; |
30 | 30 |
import org.gvsig.fmap.dal.ExpressionBuilder.VisitorFilter; |
31 | 31 |
import org.gvsig.fmap.geom.Geometry; |
32 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
32 | 33 |
|
33 | 34 |
public class ExpressionBuilderBase implements ExpressionBuilder { |
34 | 35 |
public class ConfigBase implements Config { |
... | ... | |
53 | 54 |
this.values.put(ST_AsEWKB, "ST_AsWKB({0})"); |
54 | 55 |
this.values.put(ST_Contains, "ST_Contains(({0}), ({1}))"); |
55 | 56 |
this.values.put(ST_Crosses, "ST_Crosses(({0}), ({1}))"); |
56 |
this.values.put(ST_Disjoint , "ST_Disjoint (({0}), ({1}))"); |
|
57 |
this.values.put(ST_Disjoint , "ST_Disjoint(({0}), ({1}))"); |
|
58 |
this.values.put(ST_Equals , "ST_Equals(({0}), ({1}))"); |
|
57 | 59 |
this.values.put(ST_IsClosed, "ST_IsClosed({0})"); |
58 | 60 |
this.values.put(ST_Overlaps, "ST_Overlaps(({0}), ({1}))"); |
59 | 61 |
this.values.put(ST_Touches, "ST_Touches(({0}), ({1}))"); |
... | ... | |
664 | 666 |
@Override |
665 | 667 |
public String string(String s) { |
666 | 668 |
String quote = this.config.getString(Config.quote_for_strings); |
669 |
// No se porque no esta disponible wrapIfMissing |
|
670 |
// return StringUtils.wrapIfMissing(s,quote); |
|
667 | 671 |
if (s.startsWith(quote)) { |
668 | 672 |
return s; |
669 | 673 |
} |
... | ... | |
673 | 677 |
@Override |
674 | 678 |
public String identifier(String id) { |
675 | 679 |
String quote = this.config.getString(Config.quote_for_identifiers); |
680 |
// No se porque no esta disponible wrapIfMissing |
|
681 |
// return StringUtils.wrapIfMissing(id,quote); |
|
676 | 682 |
if (id.startsWith(quote)) { |
677 | 683 |
return id; |
678 | 684 |
} |
... | ... | |
732 | 738 |
} |
733 | 739 |
|
734 | 740 |
@Override |
741 |
public GeometryValue envelope(Envelope envelope, IProjection projection) { |
|
742 |
return new GeometryValueBase(envelope.getGeometry(), projection); |
|
743 |
} |
|
744 |
|
|
745 |
@Override |
|
735 | 746 |
public Custom custom(Object value) { |
736 | 747 |
return new CustomBase(value); |
737 | 748 |
} |
... | ... | |
859 | 870 |
} |
860 | 871 |
|
861 | 872 |
@Override |
873 |
public Function ST_Disjoint(Value geom1, Value geom2) { |
|
874 |
return function("ST_Disjoint", config.getString(Config.ST_Disjoint), geom1, geom2); |
|
875 |
} |
|
876 |
|
|
877 |
@Override |
|
862 | 878 |
public Function ST_Contains(Value geom1, Value geom2) { |
863 | 879 |
return function("ST_Contains", config.getString(Config.ST_Contains), geom1, geom2); |
864 | 880 |
} |
865 | 881 |
|
866 | 882 |
@Override |
883 |
public Function ST_Equals(Value geom1, Value geom2) { |
|
884 |
return function("ST_Equals", config.getString(Config.ST_Equals), geom1, geom2); |
|
885 |
} |
|
886 |
|
|
887 |
@Override |
|
867 | 888 |
public Function ST_Crosses(Value geom1, Value geom2) { |
868 | 889 |
return function("ST_Crosses", config.getString(Config.ST_Crosses), geom1, geom2); |
869 | 890 |
} |
Also available in: Unified diff