T
- the type of source of the discoverypublic abstract class AbstractModelDiscoverer<T> extends AbstractDiscoverer<T>
org.eclipse.emf.ecore.resource.Resource
), usually
an output of the discovery but which might be provided also as input.
org.eclipse.emf.common.util.URI
)
Constructor and Description |
---|
AbstractModelDiscoverer() |
Modifier and Type | Method and Description |
---|---|
void |
discoverElement(T source,
IProgressMonitor monitor)
Discovers the model and saves the result model if
serialization is required . |
URI |
getDefaultTargetURI()
The URI that will be used if the targetURI is
null or empty. |
Resource |
getTargetModel() |
URI |
getTargetURI() |
void |
setSerializeTarget(boolean serializeTarget) |
void |
setTargetModel(Resource targetModel) |
void |
setTargetURI(URI targetURI) |
isAFolder, isAJavaProject, isAnIFileWithExtension, isAProject, setRefreshSourceBeforeDiscovery
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isApplicableTo
@Parameter(name="TARGET_MODEL", requiresInputValue=false, description="A model container; usually an output of the discovery but may also be provided as input.") public Resource getTargetModel()
@Parameter(name="TARGET_MODEL") public void setTargetModel(Resource targetModel)
@Parameter(name="SERIALIZE_TARGET", requiresInputValue=false, description="Whether to serialize the target model. The save behavior depends on the Discoverer implementation. The standard behavior is to use XMI serialization.") public void setSerializeTarget(boolean serializeTarget)
public URI getTargetURI()
@Parameter(name="TARGET_URI", requiresInputValue=false, description="A target location for optional model serialization. Save behavior depends on the Discoverer implementation.") public void setTargetURI(URI targetURI)
public final void discoverElement(T source, IProgressMonitor monitor) throws DiscoveryException
serialization is required
.discoverElement
in interface IDiscoverer<T>
discoverElement
in class AbstractDiscoverer<T>
source
- the selected object.monitor
- a progress monitor used to report progress and respond to
cancellation. May be a NullProgressMonitor
if no
monitor is to be used.DiscoveryException
- abnormal discovery process terminationpublic URI getDefaultTargetURI()
null
or empty.