![JAR search and dependency download from the Maven repository](/logo.png)
it.tidalwave.geo.location.elmo.impl.GeoCoderEntityProxy Maven / Gradle / Ivy
/***********************************************************************************************************************
*
* forceTen - open source geography
* Copyright (C) 2007-2012 by Tidalwave s.a.s. (http://www.tidalwave.it)
*
***********************************************************************************************************************
*
* 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.
*
***********************************************************************************************************************
*
* WWW: http://forceten.tidalwave.it
* SCM: https://bitbucket.org/tidalwave/forceten-src
*
**********************************************************************************************************************/
package it.tidalwave.geo.location.elmo.impl;
import javax.annotation.Nonnull;
import java.util.List;
import org.openrdf.repository.Repository;
import it.tidalwave.util.As;
import it.tidalwave.util.NotFoundException;
import it.tidalwave.geo.Coordinate;
import it.tidalwave.geo.geocoding.GeoCoder;
import it.tidalwave.geo.geocoding.GeoCoderEntity;
import it.tidalwave.geo.geocoding.GeoCoderEntity.Type;
import it.tidalwave.geo.location.GeoSchema;
/***********************************************************************************************************************
*
* This class works in pair with instances of {@link GeoCoderEntity} - an instance is created for any
* {@code GeoCoderEntity} that is instantiated because of a query, providing persistence for it (both attributes and
* hierarchy). After a {@code GeoCoderEntityProxy} has been created and made persistent, the paired
* {@code GeoCoderEntity} is no more asked to the {@link GeoCoder}.
*
* @author Fabrizio Giudici
* @version $Id$
*
**********************************************************************************************************************/
public interface GeoCoderEntityProxy extends As
{
public final static Class GeoCoderEntityProxy = GeoCoderEntityProxy.class;
/*******************************************************************************************************************
*
* Returns the children of the current {@code ElmoGeoNode}. The first time this method is called, the geocoder is
* is queried for and found children are stored into the local repository; from now on, only the local repository
* is queried. In order to force the query again from the geocoder, the latestChildrenQueryTime property must be
* reset to null.
*
******************************************************************************************************************/
@Nonnull
public List getChildren();
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Nonnull
public GeoCoderEntityProxy findChildByName (@Nonnull String name)
throws NotFoundException;
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Nonnull
public String getCode();
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Nonnull
public Coordinate getCoordinate()
throws NotFoundException;
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Nonnull
public GeoCoderEntity getGeoCoderEntity();
/*******************************************************************************************************************
*
* Gets the parent of this {@link ElmoGeoNode}. The parent is first searched in the local {@link Repository}; if not
* found, the {@link GeoCoder} is asked for.
*
* @return the parent
* @throws {@link NotFoundException} if this node has no parent
*
******************************************************************************************************************/
@Nonnull
public GeoCoderEntityProxy getParent()
throws NotFoundException;
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
@Nonnull
public Type getType();
// /*******************************************************************************************************************
// *
// *
// ******************************************************************************************************************/
// public void init (@Nonnull GeoCoderEntity geoCoderEntity);
/*******************************************************************************************************************
*
*
******************************************************************************************************************/
public void setBindings (@Nonnull GeoSchema geoSchema);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy