|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.xtools.uml.msl.internal.resources.parsers.ContainerParser
public class ContainerParser
Parser specialized for fast extracting of the parent fragment data for the specified resource. If the resource is loaded the parser uses EMF to extract the data. If the resource is not loaded the parser does not cause it to be loaded; rather it uses SAX parser with fast break out algorithm to extract the data.
| Field Summary | |
|---|---|
protected Resource |
containerResource
The container resource. |
protected URI |
containerUri
The URI of the containing element if there is one |
protected Resource |
resource
The resource whose fragment data are collected. |
protected ResourceHealth |
resourceHealth
Resource health for the resource being parsed. |
| Constructor Summary | |
|---|---|
ContainerParser(Resource resource)
Constructor |
|
| Method Summary | |
|---|---|
protected FragmentHandler |
buildFragmentHandler()
|
protected void |
checkClosedParentReference(URI uri,
String rootId,
URI fragmentUri)
Checks the validity of the parent reference in a closed resource |
protected void |
checkLoadedParentReference(EModelElement resourceRoot,
EObject eObj,
URI uri)
Checks the validity of the parent reference in a loaded resource |
protected void |
closedContainerParse(FragmentHandler fh,
ResourceSet resSet,
URI fragmentUri)
Container parsing of closed resources |
protected void |
closedFragmentsParse(FragmentHandler fh,
ResourceSet resSet,
URI fragmentUri)
Stub implementation of fragment parsing for subclasses |
protected void |
closedResourceParse()
Uses SAX parser to parse the resource. |
Resource |
getContainerResource()
|
URI |
getContainerUri()
|
ResourceHealth |
getResourceHealth()
|
protected void |
loadedContainerParse(EModelElement resourceRoot,
ResourceSet resSet,
EAnnotation fragmentAnnotation)
Container parsing of loaded resources |
protected void |
loadedFragmentsParse(EModelElement resourceRoot,
ResourceSet resSet)
Stub implementation of fragment parsing for subclasses |
protected void |
loadedResourceParse()
Uses EMF to parse the resource. |
void |
parse()
Parses the specified resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Resource resource
protected Resource containerResource
protected URI containerUri
protected ResourceHealth resourceHealth
| Constructor Detail |
|---|
public ContainerParser(Resource resource)
resource - The resource whose fragment data are collected. The resource
does not have to be loaded.| Method Detail |
|---|
public void parse()
protected void loadedResourceParse()
protected void closedResourceParse()
protected void closedContainerParse(FragmentHandler fh,
ResourceSet resSet,
URI fragmentUri)
fh - XML sax element handler for fragmented resourcesresSet - active resource setfragmentUri - uri of the current resource
protected void loadedContainerParse(EModelElement resourceRoot,
ResourceSet resSet,
EAnnotation fragmentAnnotation)
resourceRoot - root element of the current resourceresSet - active resource setfragmentAnnotation - fragment annotation of the current resource
protected void checkLoadedParentReference(EModelElement resourceRoot,
EObject eObj,
URI uri)
resourceRoot - root element of the current resourceeObj - container elementuri - uri of the current resource
protected void checkClosedParentReference(URI uri,
String rootId,
URI fragmentUri)
uri - container resource urirootId - id of the root element of the current resourcefragmentUri - uri of the current resource
protected void loadedFragmentsParse(EModelElement resourceRoot,
ResourceSet resSet)
resourceRoot - root element of the current resourceresSet - active resource set
protected void closedFragmentsParse(FragmentHandler fh,
ResourceSet resSet,
URI fragmentUri)
fh - XML sax element handler for fragmented resourcesresSet - active resource setfragmentUri - uri of the current resourceprotected FragmentHandler buildFragmentHandler()
public Resource getContainerResource()
public ResourceHealth getResourceHealth()
ResourceHealthpublic URI getContainerUri()
|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||