|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
be.ac.vub.cocompose.io.xmi.XMIModelLinkReader
Reads the links in a CoCompose model from an XMI file (requires first pass by XMIModelReader).
Constructor Summary | |
XMIModelLinkReader(Model model,
Map elementMap)
Creates an XMIModelLinkReader |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Characters. |
void |
endCoComposeElement(String local)
Start CoCompose element. |
void |
endElement(String uri,
String local,
String raw)
End element. |
void |
endOwnedElement()
Parses an ownedElement tag |
void |
endXMIElement(String local)
End XMI element. |
Concept |
getConcept()
Gets the last parsed concept. |
ModelElement |
getElement()
Gets the last parsed element. |
Map |
getElementMap()
Gets the mapping of IDs to elements. |
XMIElementLinkAttributesReader |
getElementReader()
Gets the attribute reader. |
protected ModelElement |
getFromRef(Attributes attrs)
Gets a ModelElement by IDREF or HREF attribute. |
Model |
getModel()
Gets the last parsed model. |
ModelProperty |
getModelProperty()
Gets the last parsed model property. |
Namespace |
getNamespace()
Gets the last parsed namespace. |
RefinedElement |
getRefinedElement()
Gets the last parsed refined element. |
Relationship |
getRelationship()
Gets the last parsed relationship. |
Role |
getRole()
Gets the last parsed role. |
SolutionPattern |
getSolutionPattern()
Gets the last parsed solution pattern. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Ignorable whitespace. |
void |
notationDecl(String name,
String publicId,
String systemId)
DTD declaration. |
void |
processingInstruction(String target,
String data)
Processing instruction. |
protected void |
setConcept(Concept concept)
Sets the last parsed concept. |
protected void |
setElement(ModelElement element)
Sets the last parsed element. |
protected void |
setElementMap(Map elementMap)
Sets the mapping of IDs to elements. |
protected void |
setElementReader(XMIElementLinkAttributesReader elementReader)
Sets the attribute reader. |
protected void |
setModel(Model model)
Sets the last parsed model. |
protected void |
setModelProperty(ModelProperty property)
Sets the last parsed model property. |
protected void |
setNamespace(Namespace namespace)
Sets the last parsed namespace. |
protected void |
setRefinedElement(RefinedElement refinedElement)
Sets the last parsed refined element. |
protected void |
setRelationship(Relationship relationship)
Sets the last parsed relationship. |
protected void |
setRole(Role role)
Sets the last parsed role. |
protected void |
setSolutionPattern(SolutionPattern pattern)
Sets the last parsed solution pattern. |
void |
startCoComposeElement(String local,
Attributes attrs)
Start CoCompose element. |
void |
startDocument()
Start document. |
void |
startElement(String uri,
String local,
String raw,
Attributes attrs)
Start element. |
void |
startInheritsFrom(Attributes attrs)
Parses an inheritsFrom tag. |
void |
startOwnedElement(Attributes attrs)
Parses an ownedElement tag |
void |
startPart(Attributes attrs)
Parses a part tag. |
void |
startParticipant(Attributes attrs)
Parses a participant tag |
void |
startPartOf(Attributes attrs)
Parses a partOf tag. |
void |
startSolutionModel(Attributes attrs)
Parses a solutionModel tag. |
void |
startSuperimposesOn(Attributes attrs)
Parses a superimposesOn tag. |
void |
startTargetModel(Attributes attrs)
Parses a targetModel tag. |
void |
startXMIElement(String local,
Attributes attrs)
Start XMI element. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMIModelLinkReader(Model model, Map elementMap) throws ModelElementException
model
- the model after one pass by XMIModelReaderelementMap
- the map of id -> elementMethod Detail |
public void processingInstruction(String target, String data) throws SAXException
target
- Processing instruction element name.data
- Processing instruction element data.
SAXException
public void startDocument() throws SAXException
SAXException
public void startElement(String uri, String local, String raw, Attributes attrs) throws SAXException
uri
- XML namespace URI.local
- local element name.raw
- raw (qualified) element name.attrs
- element attributes.
SAXException
public void startXMIElement(String local, Attributes attrs) throws SAXException
local
- local element name.attrs
- element attributes.
SAXException
public void startCoComposeElement(String local, Attributes attrs) throws SAXException
local
- local element name.attrs
- element attributes.
SAXException
public void startOwnedElement(Attributes attrs) throws ModelElementException
attrs
- element attributes
ModelElementException
public void startParticipant(Attributes attrs) throws ModelElementException
attrs
- element attributes
ModelElementException
public void startPartOf(Attributes attrs) throws ModelElementException
attrs
- element attributes.
ModelElementException.
ModelElementException
public void startPart(Attributes attrs) throws ModelElementException
attrs
- element attributes.
ModelElementException.
ModelElementException
public void startInheritsFrom(Attributes attrs) throws ModelElementException
attrs
- element attributes.
ModelElementException.
ModelElementException
public void startSuperimposesOn(Attributes attrs) throws ModelElementException
attrs
- element attributes.
ModelElementException.
ModelElementException
public void startSolutionModel(Attributes attrs) throws ModelElementException
attrs
- element attributes.
ModelElementException.
ModelElementException
public void startTargetModel(Attributes attrs) throws ModelElementException
attrs
- element attributes.
ModelElementException.
ModelElementException
public void characters(char[] ch, int start, int length) throws SAXException
ch
- Characters to print.start
- Starting index of characters.length
- Length of characters.
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ch
- Characters to print.start
- Starting index of characters.length
- Length of characters.
SAXException
public void endElement(String uri, String local, String raw) throws SAXException
uri
- Ignored.local
- Ignored.raw
- Element name.
SAXException
public void endXMIElement(String local) throws SAXException
local
- local element name.
SAXException
public void endCoComposeElement(String local) throws SAXException
local
- local element name.
SAXException
public void endOwnedElement() throws ModelElementException
ModelElementException
public void notationDecl(String name, String publicId, String systemId) throws SAXException
name
- DTD name.publicId
- DTD public ID.systemId
- DTD system ID.
SAXException
protected void setConcept(Concept concept)
concept
- the last parsed concept.public Concept getConcept()
protected void setElement(ModelElement element)
element
- the last parsed element.public ModelElement getElement()
protected void setElementMap(Map elementMap)
elementMap
- the mapping of IDs to elements.public Map getElementMap()
protected void setElementReader(XMIElementLinkAttributesReader elementReader)
elementReader
- the attribute reader.public XMIElementLinkAttributesReader getElementReader()
protected void setModel(Model model)
model
- the last parsed model.public Model getModel()
protected void setNamespace(Namespace namespace)
namespace
- the last parsed namespace.public Namespace getNamespace()
protected void setRelationship(Relationship relationship)
relationship
- the last parsed relationship.public Relationship getRelationship()
protected void setRole(Role role)
role
- the last parsed role.public Role getRole()
protected void setRefinedElement(RefinedElement refinedElement)
refinedElement
- the last parsed refined element.public RefinedElement getRefinedElement()
public SolutionPattern getSolutionPattern()
protected void setSolutionPattern(SolutionPattern pattern)
pattern
- the last parsed solution pattern.public ModelProperty getModelProperty()
protected void setModelProperty(ModelProperty property)
property
- the last parsed model property.protected ModelElement getFromRef(Attributes attrs) throws ModelElementException
attrs
- the XML attributes.
ModelElementException
- if no idref or href attribute is found or if
no model element is found.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |