package org.gcube.common.clients.gcore.queries; import org.apache.axis.message.addressing.EndpointReferenceType; import org.gcube.common.clients.cache.DefaultEndpointCache; import org.gcube.common.clients.cache.EndpointCache; import org.gcube.common.clients.gcore.plugins.Plugin; import org.gcube.common.clients.gcore.plugins.PluginAdapter; import org.gcube.common.clients.queries.AbstractQuery; import org.gcube.common.clients.queries.Query; /** * Partial implementation of {@link Query}s for gCore services. * * @author Fabio Simeoni * * @param the type of query results */ public abstract class GCoreQuery extends AbstractQuery { public static EndpointCache globalCache = new DefaultEndpointCache(); private final ISFacade facade; /** * Creates an instance with a {@link ISFacade}, a {@link PluginAdapter}, and a type of IS queries * @param facade the facade * @param plugin the plugin * @param queryClass the query type */ protected GCoreQuery(ISFacade facade, Plugin plugin) { super(plugin); this.facade=facade; //adds systematically base conditions addCondition("//ServiceName", plugin.serviceName()); addCondition("//ServiceClass", plugin.serviceClass()); } /** * Returns the {@link ISFacade} used for query execution. * @return the facade */ protected ISFacade facade() { return facade; } }