Reading Objects

Some API exist to manipulate objects from their unique identifier.

Find an Object of the Model from its unique identifier

EObject object = xmlResource.getEObject(objectId);

Find the unique identifier of an Object

String objectId = object.eResource().getURIFragment(object);

Reading Start Object Behavior Action

Our MagicDraw reader will read Start Object Behavior Action like a Start Classifer Behavior Action.
To keep the origin type, an EAnnotation is added to the Object created.
To recover the original type:

String xmiType = UMLAnnotationKey.getAnnotation((Element) object, UMLAnnotationKey.ELEMENT_XMI_TYPE);
if ("StartObjectBehaviorAction".equals(xmiType)) {
	// this is a StartObjectBehaviorAction
}

Related concept
Diagram Interchange

Related tasks
Managing Diagram
Writing Diagram Properties

Related reference
MDAccess for UML API Reference
MDAccess for MagicDraw API Reference
DiagramProperties