|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.utah.further.mdr.impl.service.uml.XmiParser21Impl
@Implementation @Service(value="xmiParser21") @Scope(value="prototype") public class XmiParser21Impl
XMI 2.1 parser implementation. Right now this is not a singleton service and requires an instance per model loading. In the future, we might make it a singleton class.
-----------------------------------------------------------------------------------
(c) 2008-2011 FURTHeR Project, AVP Health Sciences IT Office, University of Utah
Contact: Dr. Scott Narus <scott.narus@hsc.utah.edu>
Biomedical Informatics, 26 South 2000 East
Room 5775 HSEB, Salt Lake City, UT 84112
Day Phone: 1-801-213-3288
-----------------------------------------------------------------------------------
<oren.livne@utah.edu>
http://www.ibm.com/developerworks/library/x-javaxpathapi.html#changed
Nested Class Summary | |
---|---|
protected static interface |
AbstractXmiParser.LineTransformer
A function pointer for transforming lines in the xquery file. |
Field Summary | |
---|---|
protected XmiParserOptions |
options
XMI Parser options. |
protected XQueryDataSource |
xqueryDataSource
Instantiates prototype XQuery data sources. |
Constructor Summary | |
---|---|
XmiParser21Impl()
Create an XMI 1.1 parser. |
Method Summary | |
---|---|
protected boolean |
addLineTransformer(AbstractXmiParser.LineTransformer lineTransformer)
Add a line transformer at the end of the transformer list. |
protected void |
addMessage(Severity severity,
String text)
|
protected void |
addMessages(SeverityMessageContainer container)
|
protected javax.xml.xquery.XQExpression |
createExpression(javax.xml.xquery.XQConnection connection)
Create an XQuery expression. |
protected InputStream |
fixXmiFile(InputStream originalXmi)
Fix XMI file. |
SeverityMessageContainer |
getMessages()
Return the message container. |
XmiParserOptions |
getOptions()
Return the options property. |
protected InputStream |
getQueryFileResource(String fileName)
|
protected UmlModel |
loadModel()
Extract DTS information from the XMI resource #resourceName . |
UmlModel |
parse(String queryResourceName,
InputStream xmiInputStream)
Parse UML model from an XMI input stream. |
UmlModel |
parse(String queryResourceName,
String xmiResourceName)
Parse UML model from XMI file. |
protected UmlModel |
parseResults(javax.xml.xquery.XQSequence results)
Parse the XML results. |
void |
setOptions(XmiParserOptions options)
Set a new value for the options property. |
protected void |
setupXQuery(String queryResourceName)
|
protected void |
tearDown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected XmiParserOptions options
protected XQueryDataSource xqueryDataSource
Constructor Detail |
---|
public XmiParser21Impl()
Method Detail |
---|
protected javax.xml.xquery.XQExpression createExpression(javax.xml.xquery.XQConnection connection) throws javax.xml.xquery.XQException
connection
- XQuery engine connection
javax.xml.xquery.XQException
protected UmlModel parseResults(javax.xml.xquery.XQSequence results) throws javax.xml.xquery.XQException
results
-
javax.xml.xquery.XQException
@DtsTransactional public UmlModel parse(String queryResourceName, String xmiResourceName)
parse
in interface XmiParser
queryResourceName
- XQuery file resource namexmiResourceName
- XMI file resource name
uml.XmiParser
@DtsTransactional public UmlModel parse(String queryResourceName, InputStream xmiInputStream)
parse
in interface XmiParser
queryResourceName
- XQuery file resource namexmiInputStream
- XMI file resource input stream
uml.XmiParser
public SeverityMessageContainer getMessages()
getMessages
in interface XmiParser
public XmiParserOptions getOptions()
getOptions
in interface XmiParser
public void setOptions(XmiParserOptions options)
setOptions
in interface XmiParser
options
- the options to setprotected final InputStream fixXmiFile(InputStream originalXmi) throws IOException
originalXmi
- original XMI input source
IOException
protected final void setupXQuery(String queryResourceName) throws javax.xml.xquery.XQException
javax.xml.xquery.XQException
protected final void tearDown() throws javax.xml.xquery.XQException, IOException
javax.xml.xquery.XQException
IOException
protected final boolean addLineTransformer(AbstractXmiParser.LineTransformer lineTransformer)
lineTransformer
- transformer to addList.add(java.lang.Object)
protected final UmlModel loadModel() throws javax.xml.xquery.XQException
#resourceName
. A template
method.
javax.xml.xquery.XQException
protected final void addMessage(Severity severity, String text)
severity
- text
- List.add(java.lang.Object)
protected final void addMessages(SeverityMessageContainer container)
container
- protected final InputStream getQueryFileResource(String fileName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |