public class XMIIndexProvider2 extends AbstractIndexProvider
AbstractIndexProvider class and is used
for creating index entries by parsing/loading XMI files (files created using
the org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl class with
ids). The XMIIndexProviderFactory class creates instances of
this class within its createIndexProvider method.IIndexProviderATT_LC_PREFIX, ATT_PREFIX, CONTAINER, ECLASS, IMPORTS, OBJ_RES_URI, OBJ_URI, REFC_PREFIX, REFNC_PREFIX, RES_URI| Constructor and Description |
|---|
XMIIndexProvider2()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createIndexEntriesByLoading(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceURI,
IIndexWriter indexWriterArg,
org.eclipse.core.runtime.IProgressMonitor monitor)
Responsible for creating index entries by loading the resource.
|
protected void |
createIndexEntriesByParsing(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceURI,
IIndexWriter indexWriterArg,
org.eclipse.core.runtime.IProgressMonitor monitor)
Responsible for creating index entries by parsing the resource if
possible.
|
protected IndexSAXXMIHandler2 |
createIndexSAXXMIHandler(org.eclipse.emf.ecore.xmi.XMIResource resource,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IIndexWriter indexWriterArg,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns a new instance of
IndexSAXXMIHandler. |
protected void |
indexObjectAttributeData(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EAttribute eAttribute,
IEObjectEntry eObjectEntry,
java.util.Set<org.eclipse.emf.common.util.URI> imports)
Updates the specified
EObjectEntry object with attribute
information from the specified EObject for the specified attribute
feature |
protected IEObjectEntry |
indexObjectLevelContents(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.EObject eObject,
java.util.Set<org.eclipse.emf.common.util.URI> imports,
org.eclipse.core.runtime.IProgressMonitor monitor)
Returns an EObjectEntry object with the specified eObject's attribute and
reference information.
|
protected void |
indexObjectReferenceData(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EReference reference,
IEObjectEntry eObjectEntry,
java.util.Set<org.eclipse.emf.common.util.URI> imports)
Updates the specified
EObjectEntry object with reference
information from the specified EObject for the specified reference
feature |
protected IResourceEntry |
indexResourceLevelContents(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceURI,
java.util.Set<org.eclipse.emf.common.util.URI> imports)
Returns a ResourceEntry object that contains resource level information
for the specified resource URI.
|
createIndexEntries, dispose, getContext, getField, getField, getResourceSetForLoading, getResourceSetForParsing, init, shouldParseUsingContextResourceSetprotected void indexObjectAttributeData(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EAttribute eAttribute,
IEObjectEntry eObjectEntry,
java.util.Set<org.eclipse.emf.common.util.URI> imports)
EObjectEntry object with attribute
information from the specified EObject for the specified attribute
featureresource - the resource associated with the eObjecteObject - the eObject whose attribute information is updated in the
entryeAttribute - the eAttributeeObjectEntry - the corresponding eObject entry that will be added to the
index storeimports - a set to capture the imported resourcesprotected IEObjectEntry indexObjectLevelContents(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EObject eObject, java.util.Set<org.eclipse.emf.common.util.URI> imports, org.eclipse.core.runtime.IProgressMonitor monitor)
resource - the resource associated with the eObjecteObject - the eObject whose attribute and reference information is
updated in the entryimports - a set to capture the imported resourcesmonitor - the progress monitor or nullprotected void indexObjectReferenceData(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.ecore.EReference reference,
IEObjectEntry eObjectEntry,
java.util.Set<org.eclipse.emf.common.util.URI> imports)
EObjectEntry object with reference
information from the specified EObject for the specified reference
featureresource - the resource associated with the eObjecteObject - the eObject whose reference information is updated in the
entryreference - the EReferenceeObjectEntry - the corresponding eObject entry that will be added to the
index storeimports - a set to capture the imported resourcesprotected IResourceEntry indexResourceLevelContents(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI resourceURI, java.util.Set<org.eclipse.emf.common.util.URI> imports)
resourceSet - the resource setresourceURI - the resource uriimports - the collection of uris that the specfied resource importsprotected void createIndexEntriesByParsing(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceURI,
IIndexWriter indexWriterArg,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws IndexException
AbstractIndexProviderIIndexWriter
to add the index entries to the index store. This method should throw a
AbortParsingException if parsing is not possible. This
will cause the resource to be loaded in order to create the index
entries. A request to cancel the operation should be honored and
acknowledged by throwing OperationCanceledException.createIndexEntriesByParsing in class AbstractIndexProviderresourceSet - the resource set to be used for parsing the resourceresourceURI - the resource uriindexWriterArg - the index writer to be used for adding the index entries to
the index storemonitor - the progress monitorIndexExceptionprotected void createIndexEntriesByLoading(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
org.eclipse.emf.common.util.URI resourceURI,
IIndexWriter indexWriterArg,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws IndexException
AbstractIndexProviderIIndexWriter to add the
index entries to the index store. A request to cancel the operation
should be honored and acknowledged by throwing
OperationCanceledException.createIndexEntriesByLoading in class AbstractIndexProviderresourceSet - the resource set to be used for loading the resourceresourceURI - the resource uriindexWriterArg - the index writer to be used for adding the index entries to
the index storemonitor - the progress monitorIndexExceptionprotected IndexSAXXMIHandler2 createIndexSAXXMIHandler(org.eclipse.emf.ecore.xmi.XMIResource resource, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, IIndexWriter indexWriterArg, org.eclipse.core.runtime.IProgressMonitor monitor)
IndexSAXXMIHandler. The
instance is initialized with the specified arguments.resource - the resource handleresourceSet - the resource set used to parse the resource contentsindexWriterArg - the handle to the index store object for adding the index
entriesmonitor - the progress monitor or nullIndexSAXXMIHandler