|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
EDU.utwente.CoCompose.xml.ModelReader
XML reader for reading a CoCompose Model XML document and create the corresponding objects. Based on the SAX2 DefaultHandler class.
Field Summary | |
static int |
CREATING_COMPOSITE
|
static int |
CREATING_CONCEPT
|
static int |
CREATING_LINK
|
static int |
CREATING_NONE
|
static int |
CREATING_PUBLISHED
|
static int |
CREATING_ROLE
|
static int |
CREATING_SOLROLE
|
protected java.lang.String |
implConstrConceptID_
New implementation constraint concept ID. |
protected java.util.Collection |
implConstrForms_
New implementation constraint concept forms collection. |
protected int |
mode_
Mode flag for checking what element was started. |
protected Model |
model
The model that is being read. |
protected Composite |
newComposite_
New Composite. |
protected Concept |
newConcept_
New Concept. |
protected Implementation |
newImpl_
New concept implementation. |
protected Link |
newLink_
New Link. |
protected PublishedConcept |
newPublished_
New PublishedConcept. |
protected CompositeRole |
newRole_
New CompositeRole. |
protected SolutionRole |
newSolutionRole_
New SolutionRole. |
static int |
PCDATA_COMMENTS
|
static int |
PCDATA_GML
|
static int |
PCDATA_NONE
|
static int |
PCDATA_SPEC
|
protected int |
pcdataMode_
Mode flag for checking what type of character data is coming in. |
protected java.lang.String |
transPrior_
New translation priority. |
static java.lang.String |
XMLNAME_COMMENTS
|
static java.lang.String |
XMLNAME_COMPOSITE
|
static java.lang.String |
XMLNAME_CONCEPT
|
static java.lang.String |
XMLNAME_FORM
|
static java.lang.String |
XMLNAME_GML
|
static java.lang.String |
XMLNAME_ICONSTR
|
static java.lang.String |
XMLNAME_ICONT
|
static java.lang.String |
XMLNAME_IMPL
|
static java.lang.String |
XMLNAME_IMPLGEN
|
static java.lang.String |
XMLNAME_LINK
|
static java.lang.String |
XMLNAME_MODEL
|
static java.lang.String |
XMLNAME_MULT
|
static java.lang.String |
XMLNAME_PRI_ITEM
|
static java.lang.String |
XMLNAME_PRIORITY
|
static java.lang.String |
XMLNAME_PUBLISHED
|
static java.lang.String |
XMLNAME_ROLE
|
static java.lang.String |
XMLNAME_SOLPATT
|
static java.lang.String |
XMLNAME_SOLROLE
|
static java.lang.String |
XMLNAME_SPEC
|
Constructor Summary | |
ModelReader(Model model_in)
Constructs a ModelReader. |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Characters. |
protected void |
conceptChar(AbstractConcept concept)
Parse character data into the given concept. |
protected void |
edgeChar()
Parse character data into the given edge. |
void |
endElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw)
End element. |
protected void |
endImplementation()
Finish Implementation element. |
protected void |
endImplementationConstraint()
End ImplementationConstraint element. |
protected void |
endImplementationContent()
Finish ImplementationContent element. |
protected void |
endModel()
Finish Model element - handles extra operations after parsing. |
protected void |
parseGML(AbstractConcept concept,
java.lang.String gml)
Parses the GML data into the concept. |
protected void |
parseGML(java.lang.String gml)
Parses the GML data into a new link. |
protected void |
startAbstractConcept(AbstractConcept concept,
org.xml.sax.Attributes attrs)
Start AbstractConcept element. |
protected void |
startComments(org.xml.sax.Attributes attrs)
Start Comments element. |
protected void |
startComposite(org.xml.sax.Attributes attrs)
Start Composite element. |
protected void |
startCompositePartConcept(CompositePartConcept concept,
org.xml.sax.Attributes attrs)
Start CompositePartConcept element. |
protected void |
startConcept(org.xml.sax.Attributes attrs)
Start Concept element. |
protected void |
startConceptForm(org.xml.sax.Attributes attrs)
Start ConceptForm element. |
protected void |
startConstrainedConcept(ConstrainedConcept concept,
org.xml.sax.Attributes attrs)
Start ConstrainedConcept element. |
void |
startElement(java.lang.String uri,
java.lang.String local,
java.lang.String raw,
org.xml.sax.Attributes attrs)
Start element. |
protected void |
startGML(org.xml.sax.Attributes attrs)
Start GML element. |
protected void |
startImplementation(org.xml.sax.Attributes attrs)
Start Implementation element. |
protected void |
startImplementationConstraint(org.xml.sax.Attributes attrs)
Start ImplementationConstraint element. |
protected void |
startImplementationContent(org.xml.sax.Attributes attrs)
Start ImplementationContent element. |
protected void |
startImplementationGenerator(org.xml.sax.Attributes attrs)
Start ImplementationGenerator element. |
protected void |
startLink(org.xml.sax.Attributes attrs)
Start ConceptLink element. |
protected void |
startModel(org.xml.sax.Attributes attrs)
Start DesignModel element. |
protected void |
startMult(org.xml.sax.Attributes attrs)
Start Multiplicity element. |
protected void |
startPriority(org.xml.sax.Attributes attrs)
Start TranslationPriority element. |
protected void |
startPriorityItem(org.xml.sax.Attributes attrs)
Start PriorityItem element. |
protected void |
startPublished(org.xml.sax.Attributes attrs)
Start PublishedConcept element. |
protected void |
startRole(org.xml.sax.Attributes attrs)
Start CompositeRole element. |
protected void |
startSolutionPattern(org.xml.sax.Attributes attrs)
Start SolutionPattern element. |
protected void |
startSolutionRole(org.xml.sax.Attributes attrs)
Start SolutionRole element. |
protected void |
startSpec(org.xml.sax.Attributes attrs)
Start Specification element. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String XMLNAME_MODEL
public static final java.lang.String XMLNAME_SOLROLE
public static final java.lang.String XMLNAME_CONCEPT
public static final java.lang.String XMLNAME_COMPOSITE
public static final java.lang.String XMLNAME_ROLE
public static final java.lang.String XMLNAME_PUBLISHED
public static final java.lang.String XMLNAME_LINK
public static final java.lang.String XMLNAME_GML
public static final java.lang.String XMLNAME_COMMENTS
public static final java.lang.String XMLNAME_SPEC
public static final java.lang.String XMLNAME_MULT
public static final java.lang.String XMLNAME_SOLPATT
public static final java.lang.String XMLNAME_IMPLGEN
public static final java.lang.String XMLNAME_IMPL
public static final java.lang.String XMLNAME_ICONT
public static final java.lang.String XMLNAME_ICONSTR
public static final java.lang.String XMLNAME_FORM
public static final java.lang.String XMLNAME_PRIORITY
public static final java.lang.String XMLNAME_PRI_ITEM
public static final int CREATING_NONE
public static final int CREATING_SOLROLE
public static final int CREATING_CONCEPT
public static final int CREATING_COMPOSITE
public static final int CREATING_ROLE
public static final int CREATING_PUBLISHED
public static final int CREATING_LINK
public static final int PCDATA_NONE
public static final int PCDATA_GML
public static final int PCDATA_COMMENTS
public static final int PCDATA_SPEC
protected int mode_
protected int pcdataMode_
protected Model model
protected SolutionRole newSolutionRole_
protected Concept newConcept_
protected Composite newComposite_
protected CompositeRole newRole_
protected PublishedConcept newPublished_
protected Link newLink_
protected Implementation newImpl_
protected java.lang.String transPrior_
protected java.lang.String implConstrConceptID_
protected java.util.Collection implConstrForms_
Constructor Detail |
public ModelReader(Model model_in) throws org.xml.sax.SAXException
model_in
- The model object to build from the XML file.
org.xml.sax.SAXException
- if the model is null.Method Detail |
protected void startModel(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startAbstractConcept(AbstractConcept concept, org.xml.sax.Attributes attrs) throws java.lang.Exception
concept
- The new AbstractConcept to build.attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startConstrainedConcept(ConstrainedConcept concept, org.xml.sax.Attributes attrs) throws java.lang.Exception
concept
- The new ConstrainedConcept to build.attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startSolutionRole(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startConcept(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startComposite(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startCompositePartConcept(CompositePartConcept concept, org.xml.sax.Attributes attrs) throws java.lang.Exception
concept
- The composite part concept.attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startRole(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startPublished(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startMult(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startSolutionPattern(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startImplementationGenerator(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startImplementation(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startImplementationContent(org.xml.sax.Attributes attrs)
attrs
- Element attributes.protected void startImplementationConstraint(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startConceptForm(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void endImplementationConstraint()
protected void startLink(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startPriority(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startPriorityItem(org.xml.sax.Attributes attrs) throws java.lang.Exception
attrs
- Element attributes.
java.lang.Exception
- if the attributes could not be read.protected void startGML(org.xml.sax.Attributes attrs)
attrs
- Element attributes.protected void startComments(org.xml.sax.Attributes attrs)
attrs
- Element attributes.protected void startSpec(org.xml.sax.Attributes attrs)
attrs
- Element attributes.protected void endImplementationContent()
protected void endImplementation()
protected void endModel() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if an error occurs in post processing.protected void parseGML(AbstractConcept concept, java.lang.String gml) throws org.xml.sax.SAXException
concept
- The Concept to parse the GML data into.gml
- The GML data.
org.xml.sax.SAXException
- if the GML data could not be parsed.protected void parseGML(java.lang.String gml) throws org.xml.sax.SAXException
gml
- The GML data.
org.xml.sax.SAXException
- if the GML data could not be parsed.protected void conceptChar(AbstractConcept concept) throws org.xml.sax.SAXException
concept
- The Concept to parse character data for.
org.xml.sax.SAXException
- if the character data could not be parsed.protected void edgeChar() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if the character data could not be parsed.public void startElement(java.lang.String uri, java.lang.String local, java.lang.String raw, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException
uri
- Ignored.local
- Ignored.raw
- Element name.attrs
- Element attributes.
org.xml.sax.SAXException
- if the new element could not be parsed.public void characters(char[] ch, int start, int length)
start
- Starting index of characters.length
- Length of characters.public void endElement(java.lang.String uri, java.lang.String local, java.lang.String raw) throws org.xml.sax.SAXException
uri
- Ignored.local
- Ignored.raw
- Element name.
org.xml.sax.SAXException
- if the new element could not be parsed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |