Enum PreinstalledURLDataSourceFactories
- java.lang.Object
 - 
- java.lang.Enum<PreinstalledURLDataSourceFactories>
 - 
- jetbrains.mps.extapi.persistence.datasource.PreinstalledURLDataSourceFactories
 
 
 
- 
- All Implemented Interfaces:
 Serializable,Comparable<PreinstalledURLDataSourceFactories>,DataSourceFactoryFromURL
public enum PreinstalledURLDataSourceFactories extends Enum<PreinstalledURLDataSourceFactories> implements DataSourceFactoryFromURL
Bundled data source factories by default.- Since:
 - 29/12/16
 
 
- 
- 
Enum Constant Summary
Enum Constants Enum Constant Description FILE_OR_FOLDER 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataSourcecreate(URL url)Creates a newDataSourceDataSourcecreateFromFile(IFile file)booleansupports(URL url)Returns whether this factory is able to create a data source from the specified uri.static PreinstalledURLDataSourceFactoriesvalueOf(String name)Returns the enum constant of this type with the specified name.static PreinstalledURLDataSourceFactories[]values()Returns an array containing the constants of this enum type, in the order they are declared. 
 - 
 
- 
- 
Enum Constant Detail
- 
FILE_OR_FOLDER
public static final PreinstalledURLDataSourceFactories FILE_OR_FOLDER
 
 - 
 
- 
Method Detail
- 
values
public static PreinstalledURLDataSourceFactories[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PreinstalledURLDataSourceFactories c : PreinstalledURLDataSourceFactories.values()) System.out.println(c);
- Returns:
 - an array containing the constants of this enum type, in the order they are declared
 
 
- 
valueOf
public static PreinstalledURLDataSourceFactories valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
 name- the name of the enum constant to be returned.- Returns:
 - the enum constant with the specified name
 - Throws:
 IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
 
- 
create
@NotNull public DataSource create(@NotNull URL url) throws URLNotSupportedException
Description copied from interface:DataSourceFactoryFromURLCreates a newDataSource- Specified by:
 createin interfaceDataSourceFactoryFromURL- Parameters:
 url- -- the abstract absolute location- Returns:
 - new 
DataSourcewhich represents thefileon the disk - Throws:
 URLNotSupportedException- iffDataSourceFactoryFromURL.supports(java.net.URL)returns false
 
- 
supports
public boolean supports(@NotNull URL url)
Description copied from interface:DataSourceFactoryFromURLReturns whether this factory is able to create a data source from the specified uri. Call it before calling theDataSourceFactoryFromURL.create(java.net.URL)method -- it is a standard workflow.- Specified by:
 supportsin interfaceDataSourceFactoryFromURL
 
- 
createFromFile
@NotNull public DataSource createFromFile(@NotNull IFile file)
 
 - 
 
 -