Package jetbrains.mps.persistence
Interface IndexAwareModelFactory
- 
- All Superinterfaces:
 ModelFactory
- All Known Implementing Classes:
 BinaryModelFactory,DefaultModelPersistence,FilePerRootModelFactory
public interface IndexAwareModelFactory extends ModelFactory
PROVISIONAL API Extension to model factory to distinguish model persistence that cares about (usually platform) indexing support and knows how to extract appropriate pieces from actual model persistence state. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIndexAwareModelFactory.CallbackCallback implementation shall tolerate duplicated notifications 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidindex(InputStream input, IndexAwareModelFactory.Callback callback)Captures references to concepts/nodes/model from a model.SModelDataparseSingleStream(String name, InputStream input)Return either all or part of model data contained in the given input stream for the purpose of indexing.- 
Methods inherited from interface org.jetbrains.mps.openapi.persistence.ModelFactory
canCreate, create, getPreferredDataSourceTypes, getType, load, needsUpgrade, save, supports, upgrade 
 - 
 
 - 
 
- 
- 
Method Detail
- 
index
void index(@NotNull InputStream input, @NotNull IndexAwareModelFactory.Callback callback) throws IOException
Captures references to concepts/nodes/model from a model. API might change if we find certain parameters ineffective (e.g. excessive translation or more information is needed). Preferably, works faster than regular model read.- Throws:
 IOException
 
- 
parseSingleStream
SModelData parseSingleStream(@NotNull String name, @NotNull InputStream input) throws IOException
Return either all or part of model data contained in the given input stream for the purpose of indexing. For multiple file model formats it will be a subset of all model data. The return type may change to a more general {code}ModelFragment{code} of whichSModelDatawill be a special case, applicable in situations when persistence is able to return not only (a subset of) root nodes but also a model reference from the single stream given.- Parameters:
 name- Name of the stream, to help model factory decide which part of data source it is.input- An input stream which is a part of a data source accepted by this model factory- Returns:
 - (A subset of) model data contained in the given input stream
 - Throws:
 IOException- See Also:
 MultiStreamDataSource
 
 - 
 
 -