/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public WayNode(StoreReader sr, StoreClassRegister scr) { this(sr.readLong(), sr.readDouble(), sr.readDouble()); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public DbOrderedFeature(StoreReader sr, StoreClassRegister scr) { super(sr, scr); this.sequenceId = sr.readInteger(); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers within the store. */ public Bound(StoreReader sr, StoreClassRegister scr) { super(sr, scr); this.right = sr.readDouble(); this.left = sr.readDouble(); this.top = sr.readDouble(); this.bottom = sr.readDouble(); this.origin = sr.readString(); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public IntegerLongIndexElement(StoreReader sr, StoreClassRegister scr) { this(sr.readInteger(), sr.readLong()); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public OsmUser(StoreReader sr, StoreClassRegister scr) { name = sr.readString(); id = sr.readInteger(); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public CommonEntityData(StoreReader sr, StoreClassRegister scr) { this( sr.readLong(), sr.readInteger(), readTimestampContainer(sr, scr), readOsmUser(sr, scr), sr.readInteger(), new TagCollectionImpl(sr, scr) ); int metaTagCount; metaTagCount = sr.readInteger(); metaTags = new LazyHashMap<String, Object>(); for (int i = 0; i < metaTagCount; i++) { metaTags.put(sr.readString(), sr.readString()); } }
private static TimestampContainer readTimestampContainer(StoreReader sr, StoreClassRegister scr) { if (sr.readBoolean()) { return new SimpleTimestampContainer(new Date(sr.readLong())); } else { return null; } }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers within the store. */ public CompactPersistentNodeLocation(StoreReader sr, StoreClassRegister scr) { nodeLocation = new NodeLocation(sr.readDouble(), sr.readDouble()); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ @SuppressWarnings("unchecked") public EntityHistory(StoreReader sr, StoreClassRegister scr) { entity = (T) new GenericObjectReader(sr, scr).readObject(); visible = sr.readBoolean(); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public RelationMember(StoreReader sr, StoreClassRegister scr) { this( sr.readLong(), EntityType.valueOf(sr.readString()), sr.readString() ); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public Tag(StoreReader sr, StoreClassRegister scr) { this(sr.readString(), sr.readString()); }
/** * {@inheritDoc} */ public Class<?> getClassFromIdentifier(StoreReader storeReader) { byte classId; Byte idObj; classId = storeReader.readByte(); idObj = Byte.valueOf(classId); if (!byteToClassMap.containsKey(idObj)) { throw new OsmosisRuntimeException( "Byte " + classId + " is not a recognised class identifier, the data stream may be corrupt."); } return byteToClassMap.get(idObj); } }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public TagCollectionImpl(StoreReader sr, StoreClassRegister scr) { super(new ArrayList<Tag>()); int tagCount; tagCount = sr.readCharacter(); for (int i = 0; i < tagCount; i++) { add(new Tag(sr, scr)); } }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public CommonEntityData(StoreReader sr, StoreClassRegister scr) { this( sr.readLong(), sr.readInteger(), readTimestampContainer(sr, scr), readOsmUser(sr, scr), sr.readInteger(), new TagCollectionImpl(sr, scr) ); int metaTagCount; metaTagCount = sr.readInteger(); metaTags = new LazyHashMap<String, Object>(); for (int i = 0; i < metaTagCount; i++) { metaTags.put(sr.readString(), sr.readString()); } }
private static TimestampContainer readTimestampContainer(StoreReader sr, StoreClassRegister scr) { if (sr.readBoolean()) { return new SimpleTimestampContainer(new Date(sr.readLong())); } else { return null; } }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public IntegerLongIndexElement(StoreReader sr, StoreClassRegister scr) { this(sr.readInteger(), sr.readLong()); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ public OsmUser(StoreReader sr, StoreClassRegister scr) { name = sr.readString(); id = sr.readInteger(); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers within the store. */ public CompactPersistentNodeLocation(StoreReader sr, StoreClassRegister scr) { nodeLocation = new NodeLocation(sr.readDouble(), sr.readDouble()); }
/** * Creates a new instance. * * @param sr * The store to read state from. * @param scr * Maintains the mapping between classes and their identifiers * within the store. */ @SuppressWarnings("unchecked") public EntityHistory(StoreReader sr, StoreClassRegister scr) { entity = (T) new GenericObjectReader(sr, scr).readObject(); visible = sr.readBoolean(); }