private void writeAttributes(final cgCache cache) throws IOException {
      if (!cache.hasAttributes()) {
        return;
      }
      // TODO: Attribute conversion required: English verbose name, gpx-id
      gpx.write("<groundspeak:attributes>");

      for (String attribute : cache.getAttributes()) {
        final CacheAttribute attr =
            CacheAttribute.getByGcRawName(CacheAttribute.trimAttributeName(attribute));
        final boolean enabled = CacheAttribute.isEnabled(attribute);

        gpx.write("<groundspeak:attribute id=\"");
        gpx.write(Integer.toString(attr.id));
        gpx.write("\" inc=\"");
        if (enabled) {
          gpx.write('1');
        } else {
          gpx.write('0');
        }
        gpx.write("\">");
        gpx.write(StringEscapeUtils.escapeXml(attr.getL10n(enabled)));
        gpx.write("</groundspeak:attribute>");
      }

      gpx.write("</groundspeak:attributes>");
    }
 @Override
 public boolean accepts(final cgCache cache) {
   final cgCache fullCache =
       cgeoapplication
           .getInstance()
           .loadCache(cache.getGeocode(), EnumSet.of(LoadFlag.LOAD_ATTRIBUTES));
   return fullCache.getAttributes().contains(attribute);
 }
 @Override
 public boolean accepts(final cgCache cache) {
   final cgCache fullCache = cgeoapplication.getInstance().getCacheByGeocode(cache.getGeocode());
   return fullCache.getAttributes().contains(attribute);
 }