Exemple #1
0
 /**
  * ${@inheritDoc}.
  *
  * @see org.openstreetmap.osm.data.IDataSet#getRelationByID(long)
  */
 public Relation getRelationByID(final long aRelationID) {
   Relation n = myCachingDataSet.getRelationByID(aRelationID);
   if (n == null) {
     n = myDataSource.getRelationByID(aRelationID);
     if (n != null) myCachingDataSet.addRelation(n);
   }
   return n;
 }
Exemple #2
0
 /**
  * ${@inheritDoc}.
  *
  * @see
  *     org.openstreetmap.osm.data.IDataSet#containsRelation(org.openstreetmap.osmosis.core.domain.v0_5.Relation)
  */
 public boolean containsRelation(final Relation aR) {
   if (myCachingDataSet.containsRelation(aR)) return true;
   Relation n = myDataSource.getRelationByID(aR.getId());
   if (n == null) return false;
   myCachingDataSet.addRelation(n);
   return true;
 }