001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 2.0.11 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011public class SBMLUri { 012 private long swigCPtr; 013 protected boolean swigCMemOwn; 014 015 protected SBMLUri(long cPtr, boolean cMemoryOwn) 016 { 017 swigCMemOwn = cMemoryOwn; 018 swigCPtr = cPtr; 019 } 020 021 protected static long getCPtr(SBMLUri obj) 022 { 023 return (obj == null) ? 0 : obj.swigCPtr; 024 } 025 026 protected static long getCPtrAndDisown (SBMLUri obj) 027 { 028 long ptr = 0; 029 030 if (obj != null) 031 { 032 ptr = obj.swigCPtr; 033 obj.swigCMemOwn = false; 034 } 035 036 return ptr; 037 } 038 039 protected void finalize() { 040 delete(); 041 } 042 043 public synchronized void delete() { 044 if (swigCPtr != 0) { 045 if (swigCMemOwn) { 046 swigCMemOwn = false; 047 libsbmlJNI.delete_SBMLUri(swigCPtr); 048 } 049 swigCPtr = 0; 050 } 051 } 052 053 public SBMLUri(String uri) { 054 this(libsbmlJNI.new_SBMLUri__SWIG_0(uri), true); 055 } 056 057 public SBMLUri(SBMLUri orig) { 058 this(libsbmlJNI.new_SBMLUri__SWIG_1(SBMLUri.getCPtr(orig), orig), true); 059 } 060 061 062/** 063 * (NOTICE) Package developers MUST OVERRIDE this pure virtual function 064 * in their derived class. 065 * <p> 066 * Creates and returns a deep copy of this {@link SBMLExtension} object. 067 * <p> 068 * @return a (deep) copy of this {@link SBase} object 069 * @internal 070 */ public 071 SBMLUri cloneObject() { 072 long cPtr = libsbmlJNI.SBMLUri_cloneObject(swigCPtr, this); 073 return (cPtr == 0) ? null : new SBMLUri(cPtr, true); 074 } 075 076 public String getScheme() { 077 return libsbmlJNI.SBMLUri_getScheme(swigCPtr, this); 078 } 079 080 public String getHost() { 081 return libsbmlJNI.SBMLUri_getHost(swigCPtr, this); 082 } 083 084 public String getPath() { 085 return libsbmlJNI.SBMLUri_getPath(swigCPtr, this); 086 } 087 088 public String getQuery() { 089 return libsbmlJNI.SBMLUri_getQuery(swigCPtr, this); 090 } 091 092 public String getUri() { 093 return libsbmlJNI.SBMLUri_getUri(swigCPtr, this); 094 } 095 096 public SBMLUri relativeTo(String uri) { 097 return new SBMLUri(libsbmlJNI.SBMLUri_relativeTo(swigCPtr, this, uri), true); 098 } 099 100}