/**
* @see org.geotools.xml.schema.Type#canEncode(org.geotools.xml.schema.Element,
* java.lang.Object, java.util.Map)
*/
public boolean canEncode(Element element, Object value, Map hints) {
ComplexType t = (element.getType() instanceof ComplexType)
? (ComplexType) element.getType() : null;
while ((t != null) && (t != this))
t = (t.getParent() instanceof ComplexType)
? (ComplexType) t.getParent() : null;
return ((t != null) && (value instanceof GeometryCollection));
}