public class GpxExtension extends WithAttributes
IWithAttributes and GpxConstants).GpxConstants.ColorFormat| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
key |
private IWithAttributes |
parent |
private java.lang.String |
prefix |
private java.lang.String |
qualifiedName |
private java.lang.String |
value |
private boolean |
visible |
attrEXTENSION_ABBREVIATIONS, FIX_VALUES, GARMIN_COLORS, GPX_CMT, GPX_DESC, GPX_NAME, GPX_PREFIX, GPX_SRC, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_BOUNDS, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, META_KEYWORDS, META_LINKS, META_NAME, META_PREFIX, META_TIME, PT_AGEOFDGPSDATA, PT_DGPSID, PT_ELE, PT_FIX, PT_GEOIDHEIGHT, PT_HDOP, PT_MAGVAR, PT_PDOP, PT_SAT, PT_SYM, PT_TIME, PT_TYPE, PT_VDOP, RTE_TRK_KEYS, RTKLIB_AGE, RTKLIB_Q, RTKLIB_RATIO, RTKLIB_SDE, RTKLIB_SDEU, RTKLIB_SDN, RTKLIB_SDNE, RTKLIB_SDU, RTKLIB_SDUN, WPT_KEYS, XML_URI_EXTENSIONS_DRAWING, XML_URI_EXTENSIONS_GARMIN, XML_URI_EXTENSIONS_JOSM, XML_URI_XSD, XML_XSD_EXTENSIONS_DRAWING, XML_XSD_EXTENSIONS_GARMIN, XML_XSD_EXTENSIONS_JOSM| Constructor and Description |
|---|
GpxExtension(java.lang.String namespaceURI,
java.lang.String qName,
org.xml.sax.Attributes atts)
Creates a new
GpxExtension |
GpxExtension(java.lang.String prefix,
java.lang.String key,
java.lang.String value)
Constructs a new
GpxExtension. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
GpxExtension |
findExtension(java.lang.String sPrefix,
java.lang.String sKey)
Searches recursively for the extension with the given key in all children
|
static GpxData.XMLNamespace |
findNamespace(java.lang.String prefix)
Finds the namespace for the given default prefix, if supported with schema location
|
static java.lang.String |
findPrefix(java.lang.String namespaceURI)
Finds the default prefix used by JOSM for the given namespaceURI as the document is free specify another one.
|
java.lang.String |
getFlatKey() |
java.lang.String |
getKey() |
IWithAttributes |
getParent() |
java.lang.String |
getPrefix() |
java.lang.String |
getQualifiedName() |
java.lang.String |
getValue() |
int |
hashCode() |
void |
hide()
Hides this extension and all then-empty parents so it isn't written
|
boolean |
isVisible() |
void |
remove()
Removes this extension from its parent and all then-empty parents
|
void |
setParent(IWithAttributes parent)
Sets the parent for this extension
|
void |
setValue(java.lang.String value) |
void |
show()
Shows this extension and all parents so it can be written
|
get, getAttributes, getCollection, getExtensions, getString, putclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetExtensionAbbreviations, getGarminColorsprivate final java.lang.String qualifiedName
private final java.lang.String prefix
private final java.lang.String key
private IWithAttributes parent
private java.lang.String value
private boolean visible
public GpxExtension(java.lang.String prefix, java.lang.String key, java.lang.String value)
GpxExtension.prefix - the prefixkey - the keyvalue - the valuepublic GpxExtension(java.lang.String namespaceURI, java.lang.String qName, org.xml.sax.Attributes atts)
GpxExtensionnamespaceURI - the URI of the XML namespace, used to determine supported extensions
(josm, gpxx, gpxd) regardless of the prefix that could legally vary from file to file.qName - the qualified name of the XML element including prefixatts - the attributespublic static java.lang.String findPrefix(java.lang.String namespaceURI)
namespaceURI - namespace URIpublic static GpxData.XMLNamespace findNamespace(java.lang.String prefix)
prefix - the prefix used by JOSMGpxData.XMLNamespace element, location and URI can be null if not found.public java.lang.String getQualifiedName()
public java.lang.String getPrefix()
public java.lang.String getKey()
public java.lang.String getFlatKey()
public GpxExtension findExtension(java.lang.String sPrefix, java.lang.String sKey)
sPrefix - the prefix to look forsKey - the key to look fornullpublic java.lang.String getValue()
public void setValue(java.lang.String value)
value - the value to setpublic void remove()
java.lang.IllegalStateException - if parent not setpublic void hide()
isVisible()public void show()
isVisible()public boolean isVisible()
public IWithAttributes getParent()
public void setParent(IWithAttributes parent)
parent - the parentjava.lang.IllegalStateException - if parent already setpublic int hashCode()
hashCode in class WithAttributespublic boolean equals(java.lang.Object obj)
equals in class WithAttributes