Examples of IStoreable


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

   * Sets the ArcIMS content type.
   * @param type the ArcIMS content type
   */
  public void setArcIMSContentType(String type) {
    type = Val.chkStr(type);
    IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_CONTENTTYPE);
    if (storeable != null) storeable.setValue(type);
  }
View Full Code Here

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

   * Sets the file identifier.
   * <br/>The file identifier is typically associated with ISO-19139 documents.
   * @param identifier the file identifier
   */
  public void setFileIdentifier(String identifier) {
    IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_FILEIDENTIFIER);
    if (storeable != null) storeable.setValue(identifier);
  }
View Full Code Here

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

  /**
   * Sets the thumbnail URL.
   * @param url the thumbnail URL
   */
  public void setThumbnailUrl(String url) {
    IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_THUMBNAIL_URL);
    if (storeable != null) storeable.setValue(url);
  }
View Full Code Here

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

   * Sets the title.
   * @param title the title
   */
  public void setTitle(String title) {
    title = Val.chkStr(title);
    IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_TITLE);
    if (storeable != null) storeable.setValue(title);
  }
View Full Code Here

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

   
    // website URL
    String sWebsiteUrl = getWebsiteUrl();
    if ((sWebsiteUrl == null) || (sWebsiteUrl.length() == 0)) {
      if (esriTags.getPrimaryOnlink().length() > 0) {
        IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_WEBSITE_URL);
        if (storeable != null) {
           storeable.setValue(esriTags.getPrimaryOnlink());
        }
      }
    }
   
    // resource URL
    String sResourceUrl = getResourceUrl();
    //if ((sResourceUrl == null) || (sResourceUrl.length() == 0)) {
      sResourceUrl = Meaning.makeResourceUrl(esriTags,this);
      if (sResourceUrl.length() > 0) {
        IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_RESOURCE_URL);
        if (storeable != null) {
          storeable.setValue(sResourceUrl);
          try {
            for (Section section : schema.getSections().values()) {
              for (Parameter param : section.getParameters().values()) {
                if (param.getMeaningType().equalsIgnoreCase(Meaning.MEANINGTYPE_RESOURCE_URL)) {
                  if ((param.getContent() != null) && (param.getContent().getSingleValue() != null)) {
View Full Code Here

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

        setArcIMSContentType(
            getResourceIdentifier().guessArcIMSContentTypeFromResourceType(getResourceType()));
      }
     
    } else if (sMeaningType.equalsIgnoreCase(Meaning.MEANINGTYPE_RESOURCE_URL)) {
      IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_RESOURCE_URL);
      if (storeable != null) {
        storeable.setValues(parameter.getContent().toValueArray());
        if (getArcIMSContentType().length() == 0) {
          setArcIMSContentType(
              getResourceIdentifier().guessArcIMSContentTypeFromUrl(getResourceUrl()));
        }
      }
     
    } else if (sMeaningType.equalsIgnoreCase(Meaning.MEANINGTYPE_DATATHEME)) {
      IStoreable storeable = this._storables.get(Meaning.MEANINGTYPE_DATATHEME);
      if (storeable != null) {
        String[] values = parameter.getContent().toValueArray();
        if ((values != null) && (values.length > 0)) {
          Map<String,String> map = makeEsriDataThemeCodes();
          ArrayList<String> al = new ArrayList<String>();
          for (String value: values) {
            String s = map.get(value);
            if (s != null) al.add(s);
            else al.add(value);
          }
          storeable.setValues(al.toArray(new String[0]));
        }
      }     
     
    } else if (sMeaningType.equalsIgnoreCase(Meaning.MEANINGTYPE_THUMBNAIL_BINARY)) {
      _thumbnailBinary = sValue;
           
    // handle the generic case
    } else {
      IStoreable storeable = this._storables.get(sMeaningType);
      if (storeable == null) {
        // TODO log a warning
      } else {
        // TODO need type checking
        String[] values = parameter.getContent().toValueArray();
        if ((values != null) && (values.length > 0)) {
          Object[] existingValues = storeable.getValues();
          if ((existingValues != null) && (existingValues.length > 0)) {
            java.util.ArrayList<Object> alValues = new ArrayList<Object>();
            for (Object value: existingValues) alValues.add(value);
            for (String value: values) alValues.add(value);
            storeable.setValues(alValues.toArray());
          } else {
            storeable.setValues(values);
          }
        }
      }
    }
   
View Full Code Here

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

    }
   
  }
 
  private String getFirstStoreableValue(String name) {
    IStoreable storeable = this._storables.get(name);
    if (storeable != null) {
      Object[] values = storeable.getValues();
      if ((values != null) && (values.length > 0) && (values[0] != null)) {
        return values[0].toString();
      }
    }
    return "";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.