public abstract class PnmlElement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static PnmlElementFactory |
factory |
int |
lineNumber |
java.lang.String |
tag
The PNML tag for this element.
|
Constructor and Description |
---|
PnmlElement(java.lang.String tag)
Creates a fresh PNML element.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkValidity(Pnml pnml)
Default check for validity: No action.
|
protected java.lang.String |
exportAttribute(java.lang.String tag,
java.lang.String value,
Pnml pnml)
Default way to export some attribute.
|
protected java.lang.String |
exportAttributes(Pnml pnml)
Exports all standard attributes: None.
|
java.lang.String |
exportElement(Pnml pnml)
Exports the element.
|
protected java.lang.String |
exportElements(Pnml pnml)
Exports all standard elements: None.
|
protected void |
importAttributes(org.xmlpull.v1.XmlPullParser xpp,
Pnml pnml)
Imports all standard attributes: None.
|
void |
importElement(org.xmlpull.v1.XmlPullParser xpp,
Pnml pnml)
Imports the given element.
|
protected boolean |
importElements(org.xmlpull.v1.XmlPullParser xpp,
Pnml pnml)
Imports all standard child elements: None.
|
protected void |
importText(java.lang.String text,
Pnml pnml)
Imports standard text: No action.
|
static void |
setFactory(PnmlElementFactory factory)
When changing the factory for the purpose of exporting with non-default
pnml, please make sure no other thread can change the factory during
export.
|
protected static PnmlElementFactory factory
public java.lang.String tag
public int lineNumber
public PnmlElement(java.lang.String tag)
tag
- public static void setFactory(PnmlElementFactory factory)
factory
- public void importElement(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)
xpp
- pnml
- public java.lang.String exportElement(Pnml pnml)
protected void importAttributes(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)
xpp
- pnml
- protected java.lang.String exportAttributes(Pnml pnml)
protected boolean importElements(org.xmlpull.v1.XmlPullParser xpp, Pnml pnml)
xpp
- pnml
- protected java.lang.String exportElements(Pnml pnml)
protected void importText(java.lang.String text, Pnml pnml)
text
- pnml
- protected java.lang.String exportAttribute(java.lang.String tag, java.lang.String value, Pnml pnml)
tag
- The attribute tag.value
- The attribute value.protected void checkValidity(Pnml pnml)
pnml
-