From c9639363a86c3aada5e247fdc8fccb4a12ac3257 Mon Sep 17 00:00:00 2001 From: Martin Desruisseaux Date: Mon, 3 Jul 2023 12:08:54 +0200 Subject: [PATCH] Remove `org.opengis.display` packages. They were the packages most directly derived from the retired GO-1 specification. Also remove the `CitationFactory` interface. This is part of https://github.com/opengeospatial/geoapi/issues/85 --- .../org/opengis/display/canvas/Canvas.java | 99 --------------- .../display/canvas/CanvasController.java | 74 ----------- .../opengis/display/canvas/CanvasEvent.java | 96 -------------- .../display/canvas/CanvasListener.java | 37 ------ .../opengis/display/canvas/CanvasState.java | 120 ------------------ .../display/canvas/RenderingState.java | 30 ----- .../display/container/ContainerEvent.java | 59 --------- .../display/container/ContainerListener.java | 62 --------- .../display/container/GraphicsContainer.java | 90 ------------- .../opengis/display/primitive/Graphic.java | 53 -------- .../metadata/citation/CitationFactory.java | 119 ----------------- 11 files changed, 839 deletions(-) delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/canvas/Canvas.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasController.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasEvent.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasListener.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasState.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/canvas/RenderingState.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/container/ContainerEvent.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/container/ContainerListener.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/container/GraphicsContainer.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/display/primitive/Graphic.java delete mode 100644 geoapi-pending/src/main/java/org/opengis/metadata/citation/CitationFactory.java diff --git a/geoapi-pending/src/main/java/org/opengis/display/canvas/Canvas.java b/geoapi-pending/src/main/java/org/opengis/display/canvas/Canvas.java deleted file mode 100644 index 0c3e54179..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/canvas/Canvas.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2004-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.canvas; - -import java.awt.RenderingHints; -import org.opengis.geometry.DirectPosition; - - -/** - * Defines a common abstraction for implementations that manage the display. Canvas can be extended - * for cartesian display or any kind. A {@code Canvas} with an XY (Cartesian) display field should - * support the following properties: - *

- *

- * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public interface Canvas { - /** - * Returns a copy of the current state of this {@code Canvas}. The object returned will - * implement {@link CanvasState} or one of its subinterfaces, depending on the type - * of canvas. - * - * @return a snapshot of current canvas state. - */ - CanvasState getState(); - - /** - * Returns {@code true} if the given coordinate is visible on this {@code Canvas}. - * - * @param coordinate The coordinate to test for visibility. - * @return {@code true} if the given coordinate is visible on this canvas. - */ - boolean isVisible(DirectPosition coordinate); - - /** - * Returns the controller that allows the programmer to modify the - * {@code Canvas}'s properties. - * - * @return the controller for this canvas. - */ - CanvasController getController(); - - /** - * Sets a rendering hint for implementation or platform specific rendering - * information. - * - * @param hintKey The key of the hint. - * @param hint The rendering hint. - */ - void setRenderingHint(RenderingHints.Key hintKey, Object hint); - - /** - * Returns the rendering hint associated with the hint name. - * - * @param hintKey The key of the hint. - * @return the rendering hint. - */ - Object getRenderingHint(RenderingHints.Key hintKey); - - /** - * Adds the given listener that will be notified when the state of this - * {@code Canvas} has changed. - * - * @param listener The listener to add. - */ - void addCanvasListener(CanvasListener listener); - - /** - * Removes the given listener. - * - * @param listener The listener to remove. - */ - void removeCanvasListener(CanvasListener listener); -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasController.java b/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasController.java deleted file mode 100644 index 7f9f0ad98..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasController.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2004-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.canvas; - -import org.opengis.geometry.DirectPosition; -import org.opengis.referencing.crs.ProjectedCRS; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.TransformException; -import org.opengis.util.InternationalString; -import org.opengis.annotation.UML; - -import static org.opengis.annotation.Obligation.*; -import static org.opengis.annotation.Specification.*; - - -/** - * Controls the state of a {@linkplain Canvas canvas}, including its position, scale and title. - * - * @author Open GIS Consortium, Inc. - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public interface CanvasController { - /** - * Sets the title of the {@linkplain Canvas canvas}. The title of a canvas - * may or may not be displayed in the titlebar of an application's window. - * - * @param title The new title for the canvas. - * - * @see CanvasState#getTitle - */ - @UML(identifier="Canvas.setTitle", specification=OGC_03064, obligation=OPTIONAL) - void setTitle(InternationalString title); - - /** - * Sets the position of the center point of the {@linkplain Canvas canvas}. - * The coordinate shall be in {@linkplain CanvasState#getObjectiveCRS objective CRS}. - * - * @param center The new center position. - * - * @see CanvasState#getCenter - */ - @UML(identifier="setCenter", specification=OGC_03064, obligation=OPTIONAL) - void setCenter(DirectPosition center); - - /** - * Sets the "real world" Coordinate Reference System. This is typically - * a {@linkplain ProjectedCRS projected CRS} using linear units like metre. - * Graphic data will be projected to this CRS before to be display. - * - * @param crs The new objective Coordinate Reference System. - * @throws TransformException if at least one graphic primitive cannot be transformed to - * the specified CRS, or if the given CRS cannot be accepted for another reason. - * - * @see CanvasState#getObjectiveCRS - */ - @UML(identifier="Canvas.setObjectiveCoordinateReferenceSystem", specification=OGC_03064, obligation=OPTIONAL) - void setObjectiveCRS(CoordinateReferenceSystem crs) throws TransformException; -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasEvent.java b/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasEvent.java deleted file mode 100644 index 46b5450af..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasEvent.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2004-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.canvas; - -import java.util.EventObject; -import org.opengis.referencing.operation.MathTransform; - - -/** - * Event sent by a {@linkplain Canvas canvas} to it registered listeners - * when its state changed. - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public abstract class CanvasEvent extends EventObject { - /** - * Creates a new event having the given canvas as a source. - * - * @param source The canvas on which the event initially occurred. - * @throws IllegalArgumentException if the given source is null. - */ - public CanvasEvent(Canvas source) { - super(source); - } - - /** - * Returns the canvas on which the event occurred. - * - * @return the source canvas. - */ - @Override - public Canvas getSource() { - return (Canvas) super.getSource(); - } - - /** - * Returns the canvas state prior the change. - * - * @return the old canvas state. - */ - public abstract CanvasState getOldState(); - - /** - * Returns the canvas state after the change. - * - * @return the new canvas state. - */ - public abstract CanvasState getNewState(); - - /** - * Returns the change from the {@linkplain #getOldState old state} - * to the {@linkplain #getNewState new state} in units of - * {@linkplain CanvasState#getObjectiveCRS objective CRS}. - * This change is typically (but is not restricted to) an affine transform. - *

- * Example: if the objective CRS uses a map projection with axis in metres, - * and if the user pan the map, then the change is an affine transform containing - * translation terms in metres. - * - * @return the change from the {@linkplain #getOldState old state} to the - * {@linkplain #getNewState new state}, typically as an affine transform. - */ - public abstract MathTransform getChange(); - - /** - * Calculates to the given canvas state. - * - * @deprecated This method does not said is the change is computed from the old or the - * new state. If we need this functionality, then the method should move to - * {@link CanvasState}. - */ - @Deprecated - public abstract MathTransform getChange(CanvasState other); - - public abstract RenderingState getOldRenderingstate(); - - public abstract RenderingState getNewRenderingstate(); - -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasListener.java b/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasListener.java deleted file mode 100644 index a99092ab4..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasListener.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2004-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.canvas; - -import java.util.EventListener; - - -/** - * Listener notified when a {@linkplain Canvas canvas} state changed. - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public interface CanvasListener extends EventListener { - /** - * Invoked by a {@linkplain Canvas canvas} when its state has changed. - * - * @param event A description of the change. - */ - void canvasChanged(CanvasEvent event); -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasState.java b/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasState.java deleted file mode 100644 index 314c5d387..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/canvas/CanvasState.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2004-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.canvas; - -import org.opengis.geometry.DirectPosition; -import org.opengis.referencing.cs.CartesianCS; -import org.opengis.referencing.cs.SphericalCS; -import org.opengis.referencing.crs.DerivedCRS; -import org.opengis.referencing.crs.ProjectedCRS; -import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.util.InternationalString; - - -/** - * Describe the current state of a {@linkplain Canvas canvas}. The information contained - * by instances of this interface should only describe the viewing area or volume of the - * canvas and should not contain any state information regarding the data contained within it. - *

- * When an instance of this class is returned from {@code Canvas} methods, a "snapshot" - * of the current state of the canvas is taken and the values will never change (even - * if the canvas changes state). - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public interface CanvasState { - /** - * Returns the title of the {@linkplain Canvas canvas}. - * - * @return the canvas title. - * - * @see CanvasController#setTitle - */ - InternationalString getTitle(); - - /** - * Returns the position of the center point of the {@linkplain Canvas canvas}. - * The coordinate shall be in {@linkplain #getObjectiveCRS objective CRS}. - * - * @return the center point in objective CRS. - * - * @see CanvasController#setCenter - */ - DirectPosition getCenter(); - - /** - * Returns the "real world" Coordinate Reference System. This is typically - * a {@linkplain ProjectedCRS projected CRS} using linear units like metre. - * Graphic data are projected to this CRS before to be display. - * - * @return the "real world" Coordinate Reference System. - * - * @see CanvasController#setObjectiveCRS - */ - CoordinateReferenceSystem getObjectiveCRS(); - - /** - * Returns the Coordinate Reference System associated with the - * display of the {@linkplain Canvas canvas}. The display CRS - * {@linkplain CoordinateReferenceSystem#getCoordinateSystem has a Coordinate System} - * corresponding to the geometry of the display device. For example, flat video monitors - * are associated to {@linkplain CartesianCS cartesian CS} while planetarium may be - * associated to {@linkplain SphericalCS spherical CS}. Axis units are typically (but - * are not restricted to) some linear units like 1/72 of inch. - *

- * This CRS can be implemented as a {@linkplain DerivedCRS derived CRS} based on the - * {@linkplain #getObjectiveCRS objective CRS}. In such implementations, the display - * CRS changes after every zoom or translation action. - * - * @return the display Coordinate Reference System. - */ - CoordinateReferenceSystem getDisplayCRS(); - - /** - * Returns the transform from {@linkplain #getObjectiveCRS objective} to - * {@linkplain #getDisplayCRS display} CRS. If the latter is implemented as - * a {@linkplain DerivedCRS derived CRS}, then this transform shall be equal - * to the following: - * - *

- * getDisplayCRS().{@linkplain DerivedCRS#getConversionFromBase getConversionFromBase()}.getMathTransform() - *
- * - * This transform is typically (but is not required to be) affine. When this transform is - * affine, then the scale factors (the coefficients on the matrix diagonal when there is - * no rotation or shear) are the map scale along the corresponding axis. - * - * @return the transform from {@linkplain #getObjectiveCRS objective} to - * {@linkplain #getDisplayCRS display} CRS. - */ - MathTransform getObjectiveToDisplayTransform(); - - /** - * Returns the transform from {@linkplain #getDisplayCRS display} - * to {@linkplain #getObjectiveCRS objective} CRS. This is the - * {@linkplain MathTransform#inverse inverse} of the - * {@linkplain #getObjectiveToDisplayTransform objective to display transform}. - * - * @return the transform from {@linkplain #getDisplayCRS display} to - * {@linkplain #getObjectiveCRS objective} CRS. - */ - MathTransform getDisplayToObjectiveTransform(); -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/canvas/RenderingState.java b/geoapi-pending/src/main/java/org/opengis/display/canvas/RenderingState.java deleted file mode 100644 index 2563180de..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/canvas/RenderingState.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2008-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.canvas; - -/** - * Enumeration for possible rendering states of the canvas. - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public enum RenderingState { - ON_HOLD, - RENDERING -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/container/ContainerEvent.java b/geoapi-pending/src/main/java/org/opengis/display/container/ContainerEvent.java deleted file mode 100644 index 16e1017b7..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/container/ContainerEvent.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2009-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.container; - -import java.util.Collection; -import java.util.EventObject; -import org.opengis.display.primitive.Graphic; - - -/** - * Event sent to {@linkplain ContainerListener container listeners} when - * a {@linkplain Graphic graphics} changed. - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public abstract class ContainerEvent extends EventObject { - /** - * Creates an event emitted by the given source. - * - * @param source The source, or {@code null} if unknown. - */ - public ContainerEvent(GraphicsContainer source) { - super(source); - } - - /** - * Returns the source of thie event. - * - * @return the source of this event, or {@code null} if unknown. - */ - @Override - public GraphicsContainer getSource() { - return (GraphicsContainer) super.getSource(); - } - - /** - * Returns the graphics affected by this event - * - * @return the graphics affected by this event. - */ - public abstract Collection getGraphics(); -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/container/ContainerListener.java b/geoapi-pending/src/main/java/org/opengis/display/container/ContainerListener.java deleted file mode 100644 index 78e2cb48e..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/container/ContainerListener.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2009-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.container; - -import java.util.EventListener; -import org.opengis.display.primitive.Graphic; - - -/** - * Listener notified when {@linkplain Graphic graphics} are added or removed from a - * {@linkplain GraphicsContainer container}. - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public interface ContainerListener extends EventListener { - /** - * Called when graphic objects are added. - * - * @param event The event containing the collection of graphics added. - */ - void graphicsAdded(ContainerEvent event); - - /** - * Called when graphics objects are removed. - * - * @param event The event containing the collection of graphics removed. - */ - void graphicsRemoved(ContainerEvent event); - - /** - * Called when graphic objects are updated. - * - * @param event The event containing the collection of graphics updated. - */ - void graphicsChanged(ContainerEvent event); - - /** - * Called when graphic objects need to be repainted, but no property changed. - * Exemple : a blinking or animated graphic. - * - * @param event The event containing the collection of graphics updated. - */ - void graphicsDisplayChanged(ContainerEvent event); - -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/container/GraphicsContainer.java b/geoapi-pending/src/main/java/org/opengis/display/container/GraphicsContainer.java deleted file mode 100644 index b9ffffbc4..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/container/GraphicsContainer.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2009-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.container; - -import java.util.Collection; -import org.opengis.display.canvas.Canvas; -import org.opengis.display.primitive.Graphic; -import org.opengis.geometry.Envelope; - - -/** - * Holds a collection of {@linkplain Graphic graphics} to be drawn in a {@linkplain Canvas canvas}. - * The GraphicsContainer implementation typically depends on the canvas implementation. For example, an AWT - * canvas may be associated to a GraphicsContainer using a {@link java.awt.Graphics2D} handler for drawing, - * while a SWT canvas may be associated to another GraphicsContainer implementation using a different - * drawing toolkit. - *

- * Graphics can be {@linkplain Collection#add added} or {@linkplain Collection#remove removed} with - * method invocations on the collection returned by {@link #graphics}, which is a "live" collection. - * Note that a GraphicsContainer instance may restrict the acceptable graphic implementations. - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public interface GraphicsContainer { - - /** - * Returns the canvas where this GraphicsContainer will drawn the {@linkplain Graphic graphics}. - * - * @return the canvas where to drawn. - */ - Canvas getCanvas(); - - Envelope getGraphicsEnvelope(); - - /** - * Returns the collection of all graphics. Changes to this collection (addition, - * removal) are reflected into the set of graphics to be rendered. Note that the returned - * collection must notifies the {@linkplain ContainerListener GraphicsContainer listener} about any - * addition or removal. - * - *

When new graphics are {@linkplain Collection#add added}, implementations shall respect - * the z-order. When two - * added graphics have the same z-order, the most recently added one should be - * on top.

- * - * @return Collection of all graphics, as a live collection. - */ - Collection graphics(); - - /** - * Adds a listener to be notified when a graphic is added or removed. - * - * @param listener The listener to add. - */ - void addContainerListener(ContainerListener listener); - - /** - * Removes a listener. - * - * @param listener The listener to remove. - */ - void removeContainerListener(ContainerListener listener); - - /** - * Provides a hint that a GraphicsContainer is no longer needed. Implementations may use this method to - * release resources, if needed. Implementations may also implement this method to return the - * GraphicsContainer to a GraphicsContainer pool. - *

- * It is an error to reference a {@link GraphicsContainer} in any way after its dispose method has been - * called. - */ - void dispose(); -} diff --git a/geoapi-pending/src/main/java/org/opengis/display/primitive/Graphic.java b/geoapi-pending/src/main/java/org/opengis/display/primitive/Graphic.java deleted file mode 100644 index 81f05f32b..000000000 --- a/geoapi-pending/src/main/java/org/opengis/display/primitive/Graphic.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2004-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.display.primitive; - -import org.opengis.display.container.GraphicsContainer; - - -/** - * Defines the root abstraction of a graphic object taxonomy. This base interface - * specifies the methods common to a lightweight set of graphic objects. - * - * @author Open Geospatial Consortium - * @author Johann Sorel (Geomatys) - * @since GeoAPI 2.2 - */ -public interface Graphic { - /** - * Returns {@code true} if this graphic is visible. - * - * @return {@code true} if this graphic is visible. - */ - boolean isVisible(); - - /** - * Sets whether this graphic should be visible. - * - * @param visible {@code true} if this graphic should be visible. - */ - void setVisible(boolean visible); - - /** - * Invoked by the {@linkplain GraphicsContainer container} when this graphic is no longer needed. - * Implementations may use this method to release resources, if needed. Implementations - * may also implement this method to return an object to an object pool. It is an error - * to reference a {@code Graphic} in any way after its dispose method has been called. - */ - void dispose(); -} diff --git a/geoapi-pending/src/main/java/org/opengis/metadata/citation/CitationFactory.java b/geoapi-pending/src/main/java/org/opengis/metadata/citation/CitationFactory.java deleted file mode 100644 index 6409f7ca9..000000000 --- a/geoapi-pending/src/main/java/org/opengis/metadata/citation/CitationFactory.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * GeoAPI - Java interfaces for OGC/ISO standards - * Copyright © 2005-2023 Open Geospatial Consortium, Inc. - * http://www.geoapi.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.opengis.metadata.citation; - -import java.net.URI; -import java.util.Collection; -import org.opengis.util.InternationalString; -import org.opengis.annotation.Obligation; -import org.opengis.util.Factory; - - -/** - * A factory for metadata from the citation package. - * All factory methods accept null value for {@linkplain Obligation#OPTIONAL optional} arguments. - * The value must be non-null for {@linkplain Obligation#MANDATORY mandatory} arguments. - * - * @version ISO 19115 - * @author Jesse Crossley (SYS Technologies) - * @since GeoAPI 2.0 - */ -public interface CitationFactory extends Factory { - /** - * Location of the responsible individual or organization. - * - * @param deliveryPoints Address line for the location (as described in ISO 11180, Annex A). - * @param city The city of the location. - * @param administrativeArea State, province of the location. - * @param postalCode ZIP or other postal code. - * @param country Country of the physical address. - * @param electronicMailAddresses Address of the electronic mailbox of the responsible organization or individual. - * @return the address. - */ - Address createAddress( - Collection deliveryPoints, - InternationalString city, - InternationalString administrativeArea, - String postalCode, - InternationalString country, - Collection electronicMailAddresses); - - /** - * Information required to enable contact with the responsible person and/or organization. - * - * @param phone Telephone numbers at which the organization or individual may be contacted. - * @param address Physical and email address at which the organization or individual may be contacted. - * @param onLineResource On-line information that can be used to contact the individual or organization. - * @param hoursOfService Time period (including time zone) when individuals can contact the organization or individual. - * @param contactInstructions Supplemental instructions on how or when to contact the individual or organization. - * @return the contact. - */ - Contact createContact( - Telephone phone, - Address address, - OnlineResource onLineResource, - InternationalString hoursOfService, - InternationalString contactInstructions); - - /** - * Information about on-line sources from which the dataset, specification, or - * community profile name and extended metadata elements can be obtained. - * - * @param linkage Location (address) for on-line access. - * @param protocol Connection protocol to be used. - * @param applicationProfile Name of an application profile that can be used with the online resource. - * @param description Detailed text description of what the online resource is/does. - * @param function Code for function performed by the online resource. - * @return the online resource. - */ - OnlineResource createOnLineResource( - URI linkage, - String protocol, - String applicationProfile, - InternationalString description, - OnLineFunction function); - - /** - * Identification of, and means of communication with, person(s) and organizations associated with the dataset. - * Only one of {@code individualName}, {@code organisationName} and {@code positionName} should be provided. - * - * @param individualName Name of the responsible person- surname, given name, title separated by a delimiter. - * @param organisationName Name of the responsible organization. - * @param positionName Role or position of the responsible person. - * @param contactInfo Address of the responsible party. - * @param role Function performed by the responsible party. - * @return the responsible party. - */ - ResponsibleParty createResponsibleParty( - String individualName, - InternationalString organisationName, - InternationalString positionName, - Contact contactInfo, - Role role); - - /** - * Telephone numbers for contacting the responsible individual or organization. - * - * @param voice Telephone number by which individuals can speak to the responsible organization or individual. - * @param facsimile Telephone number of a facsimile machine for the responsible organization or individual. - * @return the telephone. - */ - Telephone createTelephone( - String voice, - String facsimile); -}