Пример #1
0
/**
 * Class Description
 *
 * @author Alexis Manin (Geomatys) Date : 27/02/13
 */
public class LabelLine implements MIFSymbolizer {

  public static final GenericName NAME = NamesExt.create("LABEL");
  public static final Pattern PATTERN =
      Pattern.compile(NAME.tip().toString(), Pattern.CASE_INSENSITIVE);

  private String type = "simple";
  private Coordinate point;

  public LabelLine(String lineType, Coordinate pt) {
    type = lineType;
    point = pt;
  }

  @Override
  public String toMIFText() {
    return NAME.tip().toString() + ' ' + type + ' ' + point.x + ' ' + point.y;
  }

  @Override
  public Unit<Length> getUnitOfMeasure() {
    throw new UnsupportedOperationException("No implementation exists for this method.");
  }

  @Override
  public String getGeometryPropertyName() {
    throw new UnsupportedOperationException("No implementation exists for this method.");
  }

  @Override
  public Expression getGeometry() {
    return FactoryFinder.getFilterFactory(null).property(getGeometryPropertyName());
  }

  @Override
  public String getName() {
    return NAME.tip().toString();
  }

  @Override
  public Description getDescription() {
    throw new UnsupportedOperationException("No implementation exists for this method.");
  }

  @Override
  public Object accept(StyleVisitor styleVisitor, Object o) {
    throw new UnsupportedOperationException("No implementation exists for this method.");
  }

  @Override
  public String toString() {
    return toMIFText();
  }
}
  /**
   * Add or update MapContext for a key
   *
   * @param key
   * @param mapContext
   * @throws JAXBException
   * @throws IOException
   */
  public void addRawMapContext(
      final GenericName key, org.constellation.provider.coveragesgroup.xml.MapContext mapContext)
      throws JAXBException, IOException {
    if (index == null) {
      visit();
    }

    File mapContextFile = index.get(key);
    if (mapContextFile == null) {
      mapContextFile = new File(path, key.tip().toString() + ".xml");
    }
    MapContextIO.writeMapContext(mapContextFile, mapContext);
    index.put(key, mapContextFile);
  }
Пример #3
0
 public WMSCCoverageReference(final WebMapClientCached server, final GenericName name)
     throws CapabilitiesException {
   super(server, name, 0);
   set = new WMSCPyramidSet(server, name.tip().toString());
 }
Пример #4
0
 @Override
 public String getName() {
   return NAME.tip().toString();
 }
Пример #5
0
 @Override
 public String toMIFText() {
   return NAME.tip().toString() + ' ' + type + ' ' + point.x + ' ' + point.y;
 }