Back to index

nordugrid-arc-nox  1.1.0~rc6
URL.java
Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 1.3.36
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package nordugrid.arc;
00010 
00011 public class URL {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   protected URL(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   protected static long getCPtr(URL obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   protected void finalize() {
00025     delete();
00026   }
00027 
00028   public synchronized void delete() {
00029     if(swigCPtr != 0 && swigCMemOwn) {
00030       swigCMemOwn = false;
00031       arcJNI.delete_URL(swigCPtr);
00032     }
00033     swigCPtr = 0;
00034   }
00035 
00036   public URL() {
00037     this(arcJNI.new_URL__SWIG_0(), true);
00038   }
00039 
00040   public URL(String url) {
00041     this(arcJNI.new_URL__SWIG_1(url), true);
00042   }
00043 
00044   public String Protocol() {
00045     return arcJNI.URL_Protocol(swigCPtr, this);
00046   }
00047 
00048   public void ChangeProtocol(String newprot) {
00049     arcJNI.URL_ChangeProtocol(swigCPtr, this, newprot);
00050   }
00051 
00052   public boolean IsSecureProtocol() {
00053     return arcJNI.URL_IsSecureProtocol(swigCPtr, this);
00054   }
00055 
00056   public String Username() {
00057     return arcJNI.URL_Username(swigCPtr, this);
00058   }
00059 
00060   public String Passwd() {
00061     return arcJNI.URL_Passwd(swigCPtr, this);
00062   }
00063 
00064   public String Host() {
00065     return arcJNI.URL_Host(swigCPtr, this);
00066   }
00067 
00068   public void ChangeHost(String newhost) {
00069     arcJNI.URL_ChangeHost(swigCPtr, this, newhost);
00070   }
00071 
00072   public int Port() {
00073     return arcJNI.URL_Port(swigCPtr, this);
00074   }
00075 
00076   public void ChangePort(int newport) {
00077     arcJNI.URL_ChangePort(swigCPtr, this, newport);
00078   }
00079 
00080   public String Path() {
00081     return arcJNI.URL_Path(swigCPtr, this);
00082   }
00083 
00084   public String FullPath() {
00085     return arcJNI.URL_FullPath(swigCPtr, this);
00086   }
00087 
00088   public void ChangePath(String newpath) {
00089     arcJNI.URL_ChangePath(swigCPtr, this, newpath);
00090   }
00091 
00092   public StringStringMap HTTPOptions() {
00093     return new StringStringMap(arcJNI.URL_HTTPOptions(swigCPtr, this), false);
00094   }
00095 
00096   public String HTTPOption(String option, String undefined) {
00097     return arcJNI.URL_HTTPOption__SWIG_0(swigCPtr, this, option, undefined);
00098   }
00099 
00100   public String HTTPOption(String option) {
00101     return arcJNI.URL_HTTPOption__SWIG_1(swigCPtr, this, option);
00102   }
00103 
00104   public StringList LDAPAttributes() {
00105     return new StringList(arcJNI.URL_LDAPAttributes(swigCPtr, this), false);
00106   }
00107 
00108   public void AddLDAPAttribute(String attribute) {
00109     arcJNI.URL_AddLDAPAttribute(swigCPtr, this, attribute);
00110   }
00111 
00112   public URL.Scope LDAPScope() {
00113     return URL.Scope.swigToEnum(arcJNI.URL_LDAPScope(swigCPtr, this));
00114   }
00115 
00116   public void ChangeLDAPScope(URL.Scope newscope) {
00117     arcJNI.URL_ChangeLDAPScope(swigCPtr, this, newscope.swigValue());
00118   }
00119 
00120   public String LDAPFilter() {
00121     return arcJNI.URL_LDAPFilter(swigCPtr, this);
00122   }
00123 
00124   public void ChangeLDAPFilter(String newfilter) {
00125     arcJNI.URL_ChangeLDAPFilter(swigCPtr, this, newfilter);
00126   }
00127 
00128   public StringStringMap Options() {
00129     return new StringStringMap(arcJNI.URL_Options(swigCPtr, this), false);
00130   }
00131 
00132   public String Option(String option, String undefined) {
00133     return arcJNI.URL_Option__SWIG_0(swigCPtr, this, option, undefined);
00134   }
00135 
00136   public String Option(String option) {
00137     return arcJNI.URL_Option__SWIG_1(swigCPtr, this, option);
00138   }
00139 
00140   public StringStringMap MetaDataOptions() {
00141     return new StringStringMap(arcJNI.URL_MetaDataOptions(swigCPtr, this), false);
00142   }
00143 
00144   public String MetaDataOption(String option, String undefined) {
00145     return arcJNI.URL_MetaDataOption__SWIG_0(swigCPtr, this, option, undefined);
00146   }
00147 
00148   public String MetaDataOption(String option) {
00149     return arcJNI.URL_MetaDataOption__SWIG_1(swigCPtr, this, option);
00150   }
00151 
00152   public void AddOption(String option, String value, boolean overwrite) {
00153     arcJNI.URL_AddOption__SWIG_0(swigCPtr, this, option, value, overwrite);
00154   }
00155 
00156   public void AddOption(String option, String value) {
00157     arcJNI.URL_AddOption__SWIG_1(swigCPtr, this, option, value);
00158   }
00159 
00160   public SWIGTYPE_p_std__listT_Arc__URLLocation_t Locations() {
00161     return new SWIGTYPE_p_std__listT_Arc__URLLocation_t(arcJNI.URL_Locations(swigCPtr, this), false);
00162   }
00163 
00164   public StringStringMap CommonLocOptions() {
00165     return new StringStringMap(arcJNI.URL_CommonLocOptions(swigCPtr, this), false);
00166   }
00167 
00168   public String CommonLocOption(String option, String undefined) {
00169     return arcJNI.URL_CommonLocOption__SWIG_0(swigCPtr, this, option, undefined);
00170   }
00171 
00172   public String CommonLocOption(String option) {
00173     return arcJNI.URL_CommonLocOption__SWIG_1(swigCPtr, this, option);
00174   }
00175 
00176   public String str() {
00177     return arcJNI.URL_str(swigCPtr, this);
00178   }
00179 
00180   public String fullstr() {
00181     return arcJNI.URL_fullstr(swigCPtr, this);
00182   }
00183 
00184   public String ConnectionURL() {
00185     return arcJNI.URL_ConnectionURL(swigCPtr, this);
00186   }
00187 
00188   public boolean toBool() {
00189     return arcJNI.URL_toBool(swigCPtr, this);
00190   }
00191 
00192   public StringStringMap ParseOptions(String optstring, char separator) {
00193     return new StringStringMap(arcJNI.URL_ParseOptions(swigCPtr, this, optstring, separator), true);
00194   }
00195 
00196   public static String OptionString(StringStringMap options, char separator) {
00197     return arcJNI.URL_OptionString(StringStringMap.getCPtr(options), options, separator);
00198   }
00199 
00200   public final static class Scope {
00201     public final static Scope base = new Scope("base");
00202     public final static Scope onelevel = new Scope("onelevel");
00203     public final static Scope subtree = new Scope("subtree");
00204 
00205     public final int swigValue() {
00206       return swigValue;
00207     }
00208 
00209     public String toString() {
00210       return swigName;
00211     }
00212 
00213     public static Scope swigToEnum(int swigValue) {
00214       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00215         return swigValues[swigValue];
00216       for (int i = 0; i < swigValues.length; i++)
00217         if (swigValues[i].swigValue == swigValue)
00218           return swigValues[i];
00219       throw new IllegalArgumentException("No enum " + Scope.class + " with value " + swigValue);
00220     }
00221 
00222     private Scope(String swigName) {
00223       this.swigName = swigName;
00224       this.swigValue = swigNext++;
00225     }
00226 
00227     private Scope(String swigName, int swigValue) {
00228       this.swigName = swigName;
00229       this.swigValue = swigValue;
00230       swigNext = swigValue+1;
00231     }
00232 
00233     private Scope(String swigName, Scope swigEnum) {
00234       this.swigName = swigName;
00235       this.swigValue = swigEnum.swigValue;
00236       swigNext = this.swigValue+1;
00237     }
00238 
00239     private static Scope[] swigValues = { base, onelevel, subtree };
00240     private static int swigNext = 0;
00241     private final int swigValue;
00242     private final String swigName;
00243   }
00244 
00245 }