public class XMIIndexProvider 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.IIndexProvider
ATT_LC_PREFIX, ATT_PREFIX, CONTAINER, ECLASS, IMPORTS, OBJ_RES_URI, OBJ_URI, REFC_PREFIX, REFNC_PREFIX, RES_URI
Constructor and Description |
---|
XMIIndexProvider()
Deprecated.
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 indexWriter,
org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated.
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 indexWriter,
org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated.
Responsible for creating index entries by parsing the resource if
possible.
|
protected IndexSAXXMIHandler |
createIndexSAXXMIHandler(org.eclipse.emf.ecore.xmi.XMIResource resource,
org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
IIndexWriter indexWriter,
org.eclipse.core.runtime.IProgressMonitor monitor)
Deprecated.
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,
EObjectEntry eObjectEntry,
java.util.Set<org.eclipse.emf.common.util.URI> imports)
Deprecated.
Updates the specified
EObjectEntry object with attribute
information from the specified EObject for the specified attribute
feature |
protected EObjectEntry |
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)
Deprecated.
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,
EObjectEntry eObjectEntry,
java.util.Set<org.eclipse.emf.common.util.URI> imports)
Deprecated.
Updates the specified
EObjectEntry object with reference
information from the specified EObject for the specified reference
feature |
protected ResourceEntry |
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)
Deprecated.
Returns a ResourceEntry object that contains resource level information
for the specified resource URI.
|
createIndexEntries, dispose, getContext, getField, getField, getResourceSetForLoading, getResourceSetForParsing, init, shouldParseUsingContextResourceSet
protected void indexObjectAttributeData(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EAttribute eAttribute, EObjectEntry 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 EObjectEntry 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 null
protected void indexObjectReferenceData(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference, EObjectEntry 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 ResourceEntry 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 indexWriter, org.eclipse.core.runtime.IProgressMonitor monitor) throws IndexException
AbstractIndexProvider
IIndexWriter
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 AbstractIndexProvider
resourceSet
- the resource set to be used for parsing the resourceresourceURI
- the resource uriindexWriter
- the index writer to be used for adding the index entries to
the index storemonitor
- the progress monitorIndexException
protected void createIndexEntriesByLoading(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, org.eclipse.emf.common.util.URI resourceURI, IIndexWriter indexWriter, org.eclipse.core.runtime.IProgressMonitor monitor) throws IndexException
AbstractIndexProvider
IIndexWriter
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 AbstractIndexProvider
resourceSet
- the resource set to be used for loading the resourceresourceURI
- the resource uriindexWriter
- the index writer to be used for adding the index entries to
the index storemonitor
- the progress monitorIndexException
protected IndexSAXXMIHandler createIndexSAXXMIHandler(org.eclipse.emf.ecore.xmi.XMIResource resource, org.eclipse.emf.ecore.resource.ResourceSet resourceSet, IIndexWriter indexWriter, 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 contentsindexWriter
- the handle to the index store object for adding the index
entriesmonitor
- the progress monitor or null
IndexSAXXMIHandler