net.sf.latexdraw.parsers.svg.parsers
Class URIReferenceParser
java.lang.Object
net.sf.latexdraw.parsers.CodeParser
net.sf.latexdraw.parsers.svg.parsers.AbstractSVGParser
net.sf.latexdraw.parsers.svg.parsers.URIReferenceParser
- All Implemented Interfaces:
- Parser
public class URIReferenceParser
- extends AbstractSVGParser
Defines a parser that parses URI references.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
11/21/07
- Version:
- 3.0
- Author:
- Arnaud BLOUIN
Field Summary |
protected java.lang.String |
uri
The parsed URI. |
Method Summary |
java.lang.String |
getUri()
|
java.lang.String |
getURI()
Reads a URI reference string from an url(#ref) attribute - such as url(#id123) - returns the extracted reference (id123). |
void |
parse()
Launches the parsing. |
Methods inherited from class net.sf.latexdraw.parsers.CodeParser |
getChar, getCharAt, getCode, getCodeCore, getLinePosition, getPosition, incLinePosition, initialise, isEOC, isEOL, nextChar, setCode, setCodeCore, setLinePosition, setPosition, skipWSPComments |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
uri
protected java.lang.String uri
- The parsed URI.
URIReferenceParser
public URIReferenceParser(java.lang.String code)
- Creates a parser.
- Parameters:
code
- The code to parse.
getURI
public java.lang.String getURI()
- Reads a URI reference string from an url(#ref) attribute - such as url(#id123) - returns the extracted reference (id123).
- Returns:
- The parsed reference or an empty string if the format of the code is not valid (not "url(#ref)")
parse
public void parse()
throws java.text.ParseException
- Description copied from interface:
Parser
- Launches the parsing.
- Throws:
java.text.ParseException
- If an error occurs.
getUri
public java.lang.String getUri()
- Returns:
- The parsed URI.
- Since:
- 2.0.3