fr.orsay.lri.varna.models.rna
Class RNAMLParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
fr.orsay.lri.varna.models.rna.RNAMLParser
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
public class RNAMLParser
- extends DefaultHandler
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
InputSource |
createSourceFromURL(String path)
|
private void |
debugPrintArray(Object[] str)
|
private void |
discardStacking()
|
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
Vector<RNAMLParser.BPTemp> |
getAllBPs()
|
Vector<Integer> |
getBaseNumbers()
|
List<String> |
getSequence()
|
static boolean |
isSelfCrossing(int[] str)
|
static void |
planarize(ArrayList<ModeleBP> input,
ArrayList<ModeleBP> planar,
ArrayList<ModeleBP> others,
int length)
|
static int[] |
planarize(int[] str)
Computes and returns a maximal planar subset of the current structure. |
private void |
postProcess()
|
InputSource |
resolveEntity(String publicId,
String systemId)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_sequence
private ArrayList<String> _sequence
_sequenceIDs
private Vector<Integer> _sequenceIDs
_structure
private Vector<RNAMLParser.BPTemp> _structure
_helices
private Vector<RNAMLParser.HelixTemp> _helices
_inSequenceIDs
private boolean _inSequenceIDs
_inLength
private boolean _inLength
_inSequence
private boolean _inSequence
_inHelix
private boolean _inHelix
_inStrAnnotation
private boolean _inStrAnnotation
_inBP
private boolean _inBP
_inBP5
private boolean _inBP5
_inBP3
private boolean _inBP3
_inEdge5
private boolean _inEdge5
_inEdge3
private boolean _inEdge3
_inPosition
private boolean _inPosition
_inBondOrientation
private boolean _inBondOrientation
_buffer
private StringBuffer _buffer
_firstModel
private String _firstModel
_currentModel
private String _currentModel
_id5
private int _id5
_id3
private int _id3
_length
private int _length
_edge5
String _edge5
_edge3
String _edge3
_orientation
String _orientation
_helixID
String _helixID
RNAMLParser
public RNAMLParser()
createSourceFromURL
public InputSource createSourceFromURL(String path)
resolveEntity
public InputSource resolveEntity(String publicId,
String systemId)
- Specified by:
resolveEntity
in interface EntityResolver
- Overrides:
resolveEntity
in class DefaultHandler
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class DefaultHandler
- Throws:
SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class DefaultHandler
- Throws:
SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class DefaultHandler
- Throws:
SAXException
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class DefaultHandler
- Throws:
SAXException
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Overrides:
endDocument
in class DefaultHandler
- Throws:
SAXException
discardStacking
private void discardStacking()
getSequence
public List<String> getSequence()
isSelfCrossing
public static boolean isSelfCrossing(int[] str)
debugPrintArray
private void debugPrintArray(Object[] str)
planarize
public static int[] planarize(int[] str)
- Computes and returns a maximal planar subset of the current structure.
- Parameters:
str
- A sequence of base-pairing positions
- Returns:
- A sequence of non-crossing base-pairing positions
planarize
public static void planarize(ArrayList<ModeleBP> input,
ArrayList<ModeleBP> planar,
ArrayList<ModeleBP> others,
int length)
postProcess
private void postProcess()
getBaseNumbers
public Vector<Integer> getBaseNumbers()
getAllBPs
public Vector<RNAMLParser.BPTemp> getAllBPs()