MCPcopy Create free account
hub / github.com/GateNLP/gate-core / doState7

Method doState7

src/main/java/gate/sgml/Sgml2Xml.java:299–325  ·  view source on GitHub ↗

If we find the pair ' or " go to state 9 Otherwhise read everything and stay in state 7 If in state 7 we read '>' then we add automaticaly a " at the end and go to state 1

(char currChar)

Source from the content-addressed store, hash-verified

297 * to state 1
298 */
299 private void doState7(char currChar){
300 //if ( ('\'' == currChar) || ('"' == currChar) ){
301 if ( endPair == currChar ){
302 if ('\'' == currChar){
303
304 // we have to replace ' with "
305 m_modifier = m_modifier.replace(m_cursor - 1, m_cursor,"\"");
306 }
307 // reset the endPair
308 endPair = ' ';
309 m_currState = 9;
310 }
311
312 if ('>' == currChar){
313 // go to state 1
314 m_currState = 1;
315
316 // insert the final " ata the end
317 m_modifier.insert(m_cursor - 1, '"');
318
319 // go to te current possition (because of insert)
320 m_cursor ++;
321
322 performFinalAction(elemName, m_cursor - 1);
323 }
324
325 }// doState7
326
327 /**
328 * If '>' go to state 1

Callers 1

convertMethod · 0.95

Calls 2

performFinalActionMethod · 0.95
insertMethod · 0.80

Tested by

no test coverage detected