コード例 #1
0
  public ServiceInfo getInfo() {
    DefaultServiceInfo serviceInfo = new DefaultServiceInfo();
    serviceInfo.setTitle("DXF FeatureReader");
    serviceInfo.setDescription(theUnivers == null ? "Univers is null" : theUnivers.getInfo());

    return serviceInfo;
  }
コード例 #2
0
 @Override
 public ServiceInfo getInfo() {
   if (serviceInfo == null) {
     serviceInfo = new DefaultServiceInfo();
     serviceInfo.setTitle(rasterInfo.getRasterTable());
     serviceInfo.setDescription(rasterInfo.toString());
     Set<String> keywords = new HashSet<String>();
     keywords.add("ArcSDE");
     serviceInfo.setKeywords(keywords);
   }
   return serviceInfo;
 }
コード例 #3
0
  /**
   * Information about this source. Subclasses should provide additional format specific
   * information.
   *
   * @return ServiceInfo describing getSource().
   */
  public synchronized ServiceInfo getInfo() {
    if (serviceInfo != null) return new DefaultServiceInfo(this.serviceInfo);

    DefaultServiceInfo localInfo = new DefaultServiceInfo();
    serviceInfo = localInfo;
    localInfo.setDescription(source.toString());

    if (source instanceof URL) {
      URL url = (URL) source;
      localInfo.setTitle(url.getFile());

      try {
        localInfo.setSource(url.toURI());
      } catch (URISyntaxException e) {
      }
    } else if (source instanceof File) {
      File file = (File) source;
      String filename = file.getName();

      if ((filename == null) || (filename.length() == 0)) {
        localInfo.setTitle(file.getName());
      }

      localInfo.setSource(file.toURI());
    }

    return new DefaultServiceInfo(localInfo);
  }
コード例 #4
0
 /**
  * Information about this source.
  *
  * <p>Subclasses should provide additional format specific information.
  *
  * @return ServiceInfo describing getSource().
  */
 public ServiceInfo getInfo() {
   DefaultServiceInfo info = new DefaultServiceInfo();
   info.setDescription(source == null ? null : String.valueOf(source));
   if (source instanceof URL) {
     URL url = (URL) source;
     info.setTitle(url.getFile());
     try {
       info.setSource(url.toURI());
     } catch (URISyntaxException e) {
     }
   } else if (source instanceof File) {
     File file = (File) source;
     String filename = file.getName();
     if (filename == null || filename.length() == 0) {
       info.setTitle(file.getName());
     }
     info.setSource(file.toURI());
   }
   return info;
 }