コード例 #1
0
ファイル: Geo.java プロジェクト: runeengh/basex
  /**
   * Returns the number of interior rings in a polygon.
   *
   * @param node xml element containing gml object(s)
   * @return integer number of interior rings
   * @throws QueryException query exception
   */
  @Deterministic
  public Int numInteriorRing(final ANode node) throws QueryException {
    final Geometry geo = geo(node, Q_GML_POLYGON);
    if (geo == null && checkGeo(node) != null)
      throw GeoErrors.geoType(node.qname().local(), "Polygon");

    return Int.get(((Polygon) geo).getNumInteriorRing());
  }
コード例 #2
0
ファイル: Geo.java プロジェクト: runeengh/basex
 /**
  * Returns the dimension of an item.
  *
  * @param node xml element containing gml object(s)
  * @return dimension
  * @throws QueryException query exception
  */
 @Deterministic
 public Int dimension(final ANode node) throws QueryException {
   return Int.get(checkGeo(node).getDimension());
 }
コード例 #3
0
ファイル: GUICommands.java プロジェクト: JosuaKrause/basex
 /**
  * Returns a database function for the first node in a node set.
  *
  * @param n node set
  * @param i offset
  * @return function string
  */
 static String openPre(final Nodes n, final int i) {
   return Function._DB_OPEN_PRE.get(Str.get(n.data.meta.name), Int.get(n.pres[i])).toString();
 }
コード例 #4
0
ファイル: Geo.java プロジェクト: runeengh/basex
 /**
  * Returns the number of points in a geometry.
  *
  * @param node xml element containing gml object(s)
  * @return number of points int value
  * @throws QueryException query exception
  */
 @Deterministic
 public Int numPoints(final ANode node) throws QueryException {
   return Int.get(checkGeo(node).getNumPoints());
 }
コード例 #5
0
ファイル: OrderByStable.java プロジェクト: Ruritariye/basex
 @Override
 Item key(final QueryContext ctx, final int i) {
   return Int.get(i);
 }