|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
easik.sketch.util.SketchHandler
public class SketchHandler
The SketchHandler is the overloaded handler for reading the sketches in from XML. There is very little error checking in here to deal with bad XML. TODO: Implement schema checking
Field Summary | |
---|---|
private boolean |
_allConstraintsVisible
Whether all constraints are visible |
private java.util.HashMap<java.lang.String,SketchPath> |
_allPaths
The paths of the sketch, indexed by name |
private java.util.LinkedList<Constraint> |
_constraints
The constraints of the sketch |
private java.util.ArrayList<SketchPath> |
_curConstraintPaths
The paths involved in the current constraint being defined |
private boolean |
_curConstraintVisible
The visibility of the current constraint |
private int |
_curConstraintX
The x-position of the current constraint being defined |
private int |
_curConstraintY
The y-position of the current constraint being defined |
private java.util.HashMap<java.lang.String,EntityAttribute> |
_curNodeAtts
Hash Map of the current node attributes, indexed by the name of the attribute |
private java.util.LinkedList<SketchEdge> |
_curPath
The edges involved in the current path being built from the XML file |
private java.lang.String |
_currNode
The name of the current entity or constraint |
private DataType |
_curType
The data type of the current attribute |
private java.util.ArrayList<EntityAttribute> |
_curUniqueKeyAtts
The EntityAttributes involved in the current Unique key being defined |
private java.lang.String |
_curUniqueKeyName
The name of the current unique key |
private java.util.ArrayList<DataType> |
_datatypes
The data types defined for the sketch |
private DocumentInfo |
_docInfo
The document information for the sketch |
private java.util.HashMap<java.lang.String,org.jgrapht.graph.DefaultEdge> |
_edges
The edges of the sketch, indexed by name |
private java.util.HashMap<java.lang.String,EntityNode> |
_entityNodes
The entity nodes of the sketch, indexed by name |
private EntityNode |
_newNode
The current entity node |
private boolean |
_useDB2
Variable to store whether the respective platform is in use and defined. |
private boolean |
_useMySQL
Variable to store whether the respective platform is in use and defined. |
private boolean |
_useOracle
Variable to store whether the respective platform is in use and defined. |
private boolean |
_useUserDefined
Variable to store whether the respective platform is in use and defined. |
private boolean |
_useXML
Variable to store whether the respective platform is in use and defined. |
Constructor Summary | |
---|---|
SketchHandler()
Default Constructor |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Overloaded method that is called any time the end of an element is found |
java.util.LinkedList<Constraint> |
getConstraints()
Returns LinkedList of constraints |
java.util.ArrayList<DataType> |
getDataTypes()
Returns ArrayList of data types |
DocumentInfo |
getDocumentInfo()
Get the document information of the current sketch |
java.util.HashMap<java.lang.String,org.jgrapht.graph.DefaultEdge> |
getEdges()
Returns HashMap of edges |
java.util.HashMap<java.lang.String,EntityNode> |
getEntities()
Returns HashMap of entities |
java.util.HashMap<java.lang.String,SketchPath> |
getPaths()
Returns HashMap of paths |
boolean |
is_useDB2()
|
boolean |
is_useMySQL()
|
boolean |
is_useOracle()
|
boolean |
is_useUserDefined()
|
boolean |
is_useXML()
|
void |
startElement(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Overloaded method that is called any time the start of an element is found |
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 |
---|
private java.util.HashMap<java.lang.String,EntityNode> _entityNodes
private java.util.HashMap<java.lang.String,org.jgrapht.graph.DefaultEdge> _edges
private java.util.HashMap<java.lang.String,SketchPath> _allPaths
private java.util.LinkedList<Constraint> _constraints
private java.util.ArrayList<DataType> _datatypes
private DocumentInfo _docInfo
private boolean _useMySQL
private boolean _useOracle
private boolean _useDB2
private boolean _useXML
private boolean _useUserDefined
private java.util.LinkedList<SketchEdge> _curPath
private int _curConstraintX
private int _curConstraintY
private boolean _curConstraintVisible
private boolean _allConstraintsVisible
private java.util.ArrayList<SketchPath> _curConstraintPaths
private java.util.ArrayList<EntityAttribute> _curUniqueKeyAtts
private java.util.HashMap<java.lang.String,EntityAttribute> _curNodeAtts
private java.lang.String _curUniqueKeyName
private EntityNode _newNode
private DataType _curType
private java.lang.String _currNode
Constructor Detail |
---|
public SketchHandler()
Method Detail |
---|
public java.util.HashMap<java.lang.String,org.jgrapht.graph.DefaultEdge> getEdges()
public java.util.HashMap<java.lang.String,SketchPath> getPaths()
public java.util.HashMap<java.lang.String,EntityNode> getEntities()
public java.util.LinkedList<Constraint> getConstraints()
public java.util.ArrayList<DataType> getDataTypes()
public DocumentInfo getDocumentInfo()
public void startElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
namespace
- @see org.xml.sax.helpers.DefaultHandlerlocalName
- @see org.xml.sax.helpers.DefaultHandlerqName
- @see org.xml.sax.helpers.DefaultHandleratts
- @see org.xml.sax.helpers.DefaultHandlerpublic void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
uri
- @see org.xml.sax.helpers.DefaultHandlerlocalName
- @see org.xml.sax.helpers.DefaultHandlerqName
- @see org.xml.sax.helpers.DefaultHandlerpublic void characters(char[] ch, int start, int length)
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
ch
- @see org.xml.sax.helpers.DefaultHandlerstart
- @see org.xml.sax.helpers.DefaultHandlerlength
- @see org.xml.sax.helpers.DefaultHandlerDefaultHandler
public boolean is_useDB2()
public boolean is_useMySQL()
public boolean is_useOracle()
public boolean is_useUserDefined()
public boolean is_useXML()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |