Package com.esri.gpt.catalog.discovery

Examples of com.esri.gpt.catalog.discovery.Discoverable


    // determine the meaning
    PropertyMeaning meaning = null;
    if (mName.length() > 0) {
      meaning = context.getPropertyMeanings().get(mName);
      if (meaning == null) {
        Discoverable discoverable = context.getPropertyMeanings().getAllAliased().get(mName);
        if (discoverable != null) {
          meaning = discoverable.getMeaning();
        } else {
          // TODO warn if the meaning is null
        }
      }
    }
View Full Code Here


    // determine the meaning
    PropertyMeaning meaning = null;
    if (mName.length() > 0) {
      meaning = context.getPropertyMeanings().get(mName);
      if (meaning == null) {
        Discoverable discoverable = context.getPropertyMeanings().getAllAliased().get(mName);
        if (discoverable != null) {
          meaning = discoverable.getMeaning();
        } else {
          // TODO warn if the meaning is null
        }
      }
    }
View Full Code Here

  private SpatialClause createSpatialClause(PropertyMeaning meaning, boolean inclusive) {
    SpatialClause spatialClause = inclusive
        ? new SpatialClause.GeometryBBOXIntersects()
        : new SpatialClause.GeometryIsWithin();
    spatialClause.setSrsName("4326");
    Discoverable target = new Discoverable(meaning.getName());
    target.setMeaning(meaning);
    target.setStoreable(new GeometryProperty(meaning.getName()));
    spatialClause.setTarget(target);
    return spatialClause;
  }
View Full Code Here

  private Query makeTimeperiodQuery(PropertyMeaning meaning,
      String lower, String upper, boolean inclusive)
      throws DiscoveryException, ParseException {
   
    // make the clause
    Discoverable target = new Discoverable(meaning.getName());
    target.setMeaning(meaning);
    target.setStoreable(new TimeperiodProperty(meaning.getName()));
    PropertyClause.PropertyIsBetween clause = new PropertyClause.PropertyIsBetween();
    clause.setTarget(target);
    clause.setLowerBoundary(lower);
    clause.setUpperBoundary(upper);
   
View Full Code Here

   * @return meaning proxy
   */
  private PropertyMeaning resolveMeaning(String fieldName) {
    PropertyMeaning meaning = getMeanings().get(fieldName);
    if (meaning == null) {
      Discoverable discoverable = getMeanings().getAllAliased().get(fieldName);
      if (discoverable != null) {
        meaning = discoverable.getMeaning();
      }
    }
    return meaning;
  }
View Full Code Here

      boolean hasElementNames = (elementNames != null) && (elementNames.size() > 0);
      if (isDublinCore && hasElementNames) {
        AliasedDiscoverables aliased = this.queryables.getAllAliased();
        query.setReturnables(new Discoverables());
        for (String elementName: elementNames) {
          Discoverable discoverable = aliased.get(elementName);
          if (discoverable != null) {
            query.getReturnables().add(discoverable);
          }
        }
      } else {
View Full Code Here

                                     PropertyClause propertyClause)
    throws DiscoveryException, ParseException {
    LOGGER.finer("Adapting timeperiod PropertyClause...\n"+propertyClause);
   
    // determine the discoverable target, set the underlying storable
    Discoverable discoverable = propertyClause.getTarget();
    if (discoverable == null) {
      String sErr = "The PropertyClause.target is null.";
      throw new DiscoveryException(sErr);
    }
    if (discoverable.getStorable() == null) {
      String sErr = "The PropertyClause.target.storeable is null.";
      throw new DiscoveryException(sErr);
    } else {
      Storeable storeable = (Storeable)discoverable.getStorable();
      this.baseFieldName = storeable.getName();
      if (this.baseFieldName.endsWith(".intersects")) {
        this.inclusive = true;
        this.baseFieldName = this.baseFieldName.substring(0,this.baseFieldName.length()-11);
      } else if (this.baseFieldName.endsWith(".within")) {
View Full Code Here

    throws DiscoveryException {
    LOGGER.finer("Adapting SpatialClause...\n"+spatialClause);
   
    // determine the discoverable target, set names
    String sErr;
    Discoverable discoverable = spatialClause.getTarget();
    if (discoverable == null) {
      sErr = "The SpatialClause.target is null.";
      throw new DiscoveryException(sErr);
    }
    if (discoverable.getStorable() == null) {
      sErr = "The SpatialClause.target.storeable is null.";
      throw new DiscoveryException(sErr);
    } else {
      Storeable storeable = (Storeable)discoverable.getStorable();
      if (!(storeable instanceof GeometryProperty)) {
        sErr = "The SpatialClause.target.storeable is not a GeometryProperty.";
        throw new DiscoveryException(sErr);
      }
    }
View Full Code Here

      String msg = "The parameter value was empty.";
      throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,locator,msg);
    }
   
    // find the discoverable
    Discoverable discoverable = this.getDiscoveryContext().findDiscoverable(sPropName);
    if (discoverable == null) {
      String msg = sPropName+" is not a supported queryable.";
      throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,locator,msg);
    }
    return discoverable;
View Full Code Here

    }
     
    // determine the queryables
   
    // determine the discoverable
    Discoverable discoverable = this.getDiscoveryContext().findDiscoverable("Id");
    if (discoverable == null) {
      String msg = "The Id queryable is not supported.";
      throw new OwsException(OwsException.OWSCODE_InvalidParameterValue,locator,msg);
    }
   
View Full Code Here

TOP

Related Classes of com.esri.gpt.catalog.discovery.Discoverable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.