|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ohf.stem.definitions.adapters.spatial.geo.PlatformLatLongDataProvider
public class PlatformLatLongDataProvider
This class interprets a URI that specifies a file of (i.e., "platform") lat/long data in some format (currently GML).
InlineLatLongDataProvider
,
LatLongProviderAdapter
Nested Class Summary | |
---|---|
class |
PlatformLatLongDataProvider.GMLDecoder
This class is a SAX Handler used to process the contents of a GML file specifying latitude/longitude data. |
Field Summary | |
---|---|
boolean |
isSampling
If true then the latitude/longitude points will be sampled
and some will be discarded to reduce their number. |
static java.lang.String |
PLATFORM_SCHEME
This is the scheme for a "platform" data URI that specifies a file that contains lat/long data. |
boolean |
reportIOExceptions
If true then I/O Exceptions are logged, otherwise they are
ignored. |
int |
sampleFrequency
This is the frequency at which the latitude/longitude data points will be sampled. |
static java.lang.String |
SAX_PARSER1
The class name of the first SAX XML parser to attempt to create if the default cannot be found. |
static java.lang.String |
SAX_PARSER2
The class name of the second SAX XML parser to attempt to create if the default cannot be found. |
boolean |
useLowerResolutionLatLongData
If true then the path to the GML file will be modified to
point to a smaller GML file that has a lower resolution. |
Constructor Summary | |
---|---|
PlatformLatLongDataProvider()
Constructor |
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
getIds(org.eclipse.emf.common.util.URI fileURI)
|
java.util.Set<java.lang.String> |
getIdsNoWait(org.eclipse.emf.common.util.URI fileURI)
This method is just like getIds(URI) except that it will return
an empty set if the data referenced by the URI has not been read yet. |
LatLong |
getLatLong(org.eclipse.emf.common.util.URI latlongFileURI)
|
LatLong |
getLatLongNoWait(org.eclipse.emf.common.util.URI latlongFileURI)
This method is just like getLatLong(URI) except that it will
immediately return an "empty" LatLong instance if the data for the URI
has not been retrieved. |
static org.xml.sax.XMLReader |
getSAXParser()
Try to create a SAX Parser. |
static void |
parseInputStream(java.io.BufferedReader in,
org.xml.sax.helpers.DefaultHandler handler)
Parse the specified input character stream using the specified Handler. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SAX_PARSER1
org.apache.xerces.parsers.SAXParser
public static final java.lang.String SAX_PARSER2
org.apache.crimson.parser.XMLReaderImpl
public static final java.lang.String PLATFORM_SCHEME
public boolean isSampling
true
then the latitude/longitude points will be sampled
and some will be discarded to reduce their number.
public int sampleFrequency
public boolean reportIOExceptions
true
then I/O Exceptions are logged, otherwise they are
ignored.
public boolean useLowerResolutionLatLongData
true
then the path to the GML file will be modified to
point to a smaller GML file that has a lower resolution.
Constructor Detail |
---|
public PlatformLatLongDataProvider()
Method Detail |
---|
public LatLong getLatLong(org.eclipse.emf.common.util.URI latlongFileURI)
getLatLong
in interface LatLongDataProvider
latlongFileURI
-
public LatLong getLatLongNoWait(org.eclipse.emf.common.util.URI latlongFileURI)
getLatLong(URI)
except that it will
immediately return an "empty" LatLong instance if the data for the URI
has not been retrieved. It will also start a seperate job to retrieve
that data and will return it when that job completes successfully.
getLatLongNoWait
in interface LatLongDataProvider
latlongFileURI
-
public java.util.Set<java.lang.String> getIds(org.eclipse.emf.common.util.URI fileURI)
fileURI
- the uri of a file of latitude/longitude data
public java.util.Set<java.lang.String> getIdsNoWait(org.eclipse.emf.common.util.URI fileURI)
getIds(URI)
except that it will return
an empty set if the data referenced by the URI has not been read yet. It
will then cause a seperate job to start that will read that data. A
subsequent call, after that job completes successfully, would return a
set of ids.
fileURI
- the uri of a file of latitude/longitude data
public static org.xml.sax.XMLReader getSAXParser()
java -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
If it is not successful in finding this parser, it will attempt to create
an instance of org.apache.xerces.parsers.SAXParser
, if
that fails, it will try the parser
"org.apache.crimson.parser.XMLReaderImpl
. If that fails,
it will throw a SimulationException
reporting the
inability to create a SAX XML Parser.
public static void parseInputStream(java.io.BufferedReader in, org.xml.sax.helpers.DefaultHandler handler)
in
- BufferedReader to read the XML from.handler
- The class that will handle the parsing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |