com.android.sdklib.internal.repository.sources
Class SdkSysImgSource

java.lang.Object
  extended by com.android.sdklib.internal.repository.sources.SdkSource
      extended by com.android.sdklib.internal.repository.sources.SdkSysImgSource
All Implemented Interfaces:
IDescription, java.lang.Comparable<SdkSource>

public class SdkSysImgSource
extends SdkSource

An sdk-sys-img source, i.e. a download site for system-image packages. A repository describes one or more Packages available for download.


Constructor Summary
SdkSysImgSource(java.lang.String url, java.lang.String uiName)
          Constructs a new source for the given repository URL.
 
Method Summary
protected  org.w3c.dom.Document findAlternateToolsXml(java.io.InputStream xml)
          This kind of schema does not support forward-evolution of the <tool> element.
protected  java.lang.String[] getDefaultXmlFileUrls()
          Returns the basename of the default URLs to try to download the XML manifest.
protected  int getNsLatestVersion()
          Returns SdkRepoConstants.NS_LATEST_VERSION or SdkAddonConstants.NS_LATEST_VERSION.
protected  java.lang.String getNsPattern()
          Returns SdkRepoConstants.NS_PATTERN or SdkAddonConstants.NS_PATTERN.
protected  java.lang.String getNsUri()
          Returns SdkRepoConstants.NS_URI or SdkAddonConstants.NS_URI.
protected  java.lang.String getRootElementName()
           
protected  java.lang.String getSchemaUri(int version)
          Returns SdkRepoConstants.getSchemaUri() or SdkAddonConstants.getSchemaUri().
protected  java.io.InputStream getXsdStream(int version)
          Returns SdkRepoConstants.getXsdStream() or SdkAddonConstants.getXsdStream().
 boolean isAddonSource()
          Returns true if this is an addon source.
 boolean isSysImgSource()
          Returns true if this is a system-image source.
 
Methods inherited from class com.android.sdklib.internal.repository.sources.SdkSource
clearPackages, compareTo, equals, getDocument, getFetchError, getLongDescription, getPackages, getShortDescription, getUiName, getUrl, getXmlSchemaVersion, hashCode, isEnabled, load, parsePackages, setEnabled, setPackages, toString, validateXml
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SdkSysImgSource

public SdkSysImgSource(java.lang.String url,
                       java.lang.String uiName)
Constructs a new source for the given repository URL.

Parameters:
url - The source URL. Cannot be null. If the URL ends with a /, the default sys-img.xml filename will be appended automatically.
uiName - The UI-visible name of the source. Can be null.
Method Detail

isAddonSource

public boolean isAddonSource()
Returns true if this is an addon source. We only load addons and extras from these sources.

Specified by:
isAddonSource in class SdkSource

isSysImgSource

public boolean isSysImgSource()
Returns true if this is a system-image source. We only load system-images from these sources.

Specified by:
isSysImgSource in class SdkSource

getDefaultXmlFileUrls

protected java.lang.String[] getDefaultXmlFileUrls()
Description copied from class: SdkSource
Returns the basename of the default URLs to try to download the XML manifest. E.g. this is typically SdkRepoConstants.URL_DEFAULT_XML_FILE or SdkAddonConstants.URL_DEFAULT_XML_FILE

Specified by:
getDefaultXmlFileUrls in class SdkSource

getNsLatestVersion

protected int getNsLatestVersion()
Description copied from class: SdkSource
Returns SdkRepoConstants.NS_LATEST_VERSION or SdkAddonConstants.NS_LATEST_VERSION.

Specified by:
getNsLatestVersion in class SdkSource

getNsUri

protected java.lang.String getNsUri()
Description copied from class: SdkSource
Returns SdkRepoConstants.NS_URI or SdkAddonConstants.NS_URI.

Specified by:
getNsUri in class SdkSource

getNsPattern

protected java.lang.String getNsPattern()
Description copied from class: SdkSource
Returns SdkRepoConstants.NS_PATTERN or SdkAddonConstants.NS_PATTERN.

Specified by:
getNsPattern in class SdkSource

getSchemaUri

protected java.lang.String getSchemaUri(int version)
Description copied from class: SdkSource
Returns SdkRepoConstants.getSchemaUri() or SdkAddonConstants.getSchemaUri().

Specified by:
getSchemaUri in class SdkSource

getRootElementName

protected java.lang.String getRootElementName()
Specified by:
getRootElementName in class SdkSource

getXsdStream

protected java.io.InputStream getXsdStream(int version)
Description copied from class: SdkSource
Returns SdkRepoConstants.getXsdStream() or SdkAddonConstants.getXsdStream().

Specified by:
getXsdStream in class SdkSource

findAlternateToolsXml

protected org.w3c.dom.Document findAlternateToolsXml(@Nullable
                                                     java.io.InputStream xml)
This kind of schema does not support forward-evolution of the <tool> element.

Specified by:
findAlternateToolsXml in class SdkSource
Parameters:
xml - The input XML stream. Can be null.
Returns:
Always null.