|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.pgsql.v0_6.impl.PostgreSqlDatasetContext
public class PostgreSqlDatasetContext
Provides read-only access to a PostgreSQL dataset store. Each thread accessing the store must create its own reader. It is important that all iterators obtained from this reader are released before releasing the reader itself.
Constructor Summary | |
---|---|
PostgreSqlDatasetContext(DatabaseLoginCredentials loginCredentials,
DatabasePreferences preferences)
Creates a new instance. |
Method Summary | |
---|---|
void |
complete()
Ensures that all information is fully persisted. |
Node |
getNode(long id)
Deprecated. |
EntityManager<Node> |
getNodeManager()
Returns the manager for manipulating node instances. |
Relation |
getRelation(long id)
Deprecated. |
EntityManager<Relation> |
getRelationManager()
Returns the manager for manipulating relation instances. |
Way |
getWay(long id)
Deprecated. |
EntityManager<Way> |
getWayManager()
Returns the manager for manipulating way instances. |
ReleasableIterator<EntityContainer> |
iterate()
Allows the entire dataset to be iterated across. |
ReleasableIterator<EntityContainer> |
iterateBoundingBox(double left,
double right,
double top,
double bottom,
boolean completeWays)
Allows all data within a bounding box to be iterated across. |
void |
release()
Performs resource cleanup tasks such as closing files, or database connections. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PostgreSqlDatasetContext(DatabaseLoginCredentials loginCredentials, DatabasePreferences preferences)
loginCredentials
- Contains all information required to connect to the database.preferences
- Contains preferences configuring database behaviour.Method Detail |
---|
@Deprecated public Node getNode(long id)
getNode
in interface DatasetContext
id
- The id of the node.
@Deprecated public Way getWay(long id)
getWay
in interface DatasetContext
id
- The id of the way.
@Deprecated public Relation getRelation(long id)
getRelation
in interface DatasetContext
id
- The id of the relation.
public EntityManager<Node> getNodeManager()
getNodeManager
in interface DatasetContext
public EntityManager<Way> getWayManager()
getWayManager
in interface DatasetContext
public EntityManager<Relation> getRelationManager()
getRelationManager
in interface DatasetContext
public ReleasableIterator<EntityContainer> iterate()
iterate
in interface DatasetContext
public ReleasableIterator<EntityContainer> iterateBoundingBox(double left, double right, double top, double bottom, boolean completeWays)
iterateBoundingBox
in interface DatasetContext
left
- The longitude marking the left edge of the bounding box.right
- The longitude marking the right edge of the bounding box.top
- The latitude marking the top edge of the bounding box.bottom
- The latitude marking the bottom edge of the bounding box.completeWays
- If true, all nodes within the ways will be returned even if
they lie outside the box.
public void complete()
complete
in interface Completable
public void release()
release
in interface Releasable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |