本文整理了Java中org.openstreetmap.osmosis.core.domain.v0_6.Entity.getId()
方法的一些代码示例,展示了Entity.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.getId()
方法的具体详情如下:
包路径:org.openstreetmap.osmosis.core.domain.v0_6.Entity
类名称:Entity
方法名:getId
[英]Gets the identifier.
[中]获取标识符。
代码示例来源:origin: mapsforge/mapsforge
} catch (NumberFormatException e) {
LOGGER.finest("could not parse layer information to byte type: " + tag.getValue()
+ "\t entity-id: " + entity.getId() + "\tentity-type: " + entity.getType().name());
+ "\t entity-id: " + entity.getId() + "\tentity-type: " + entity.getType().name());
代码示例来源:origin: ncolomer/elasticsearch-osmosis-plugin
protected ESEntity(Entity entity) {
this.id = entity.getId();
this.tags = new HashMap<String, String>();
for (Tag tag : entity.getTags()) {
this.tags.put(tag.getKey(), tag.getValue());
}
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-set
/**
* {@inheritDoc}
*/
@Override
public void process(ChangeContainer change) {
// If the current change is for a different entity to those in our current changes list,
// then we must process the current changes.
if (currentChanges.size() > 0) {
long currentId;
currentId = currentChanges.get(0).getEntityContainer().getEntity().getId();
if (currentId != change.getEntityContainer().getEntity().getId()) {
flushCurrentChanges();
}
}
currentChanges.add(change);
}
代码示例来源:origin: openstreetmap/osmosis
/**
* Adds the specified entity to the database.
*
* @param entity
* The entity to add.
*/
public void addEntity(T entity) {
Map<String, Object> args;
args = new HashMap<String, Object>();
entityMapper.populateEntityParameters(args, entity);
namedParameterJdbcTemplate.update(entityMapper.getSqlInsert(1), args);
actionDao.addAction(entityMapper.getEntityType(), ChangesetAction.CREATE, entity.getId());
}
代码示例来源:origin: openstreetmap/osmosis
/**
* Updates the specified entity details in the database.
*
* @param entity
* The entity to update.
*/
public void modifyEntity(T entity) {
Map<String, Object> args;
args = new HashMap<String, Object>();
entityMapper.populateEntityParameters(args, entity);
namedParameterJdbcTemplate.update(entityMapper.getSqlUpdate(true), args);
actionDao.addAction(entityMapper.getEntityType(), ChangesetAction.MODIFY, entity.getId());
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-core
/**
* {@inheritDoc}
*/
public void process(EntityContainer entityContainer) {
Entity entity;
entity = entityContainer.getEntity();
if (progressTracker.updateRequired()) {
LOG.info(
prefix
+ "Processing " + entity.getType() + " " + entity.getId() + ", "
+ progressTracker.getObjectsPerSecond() + " objects/second.");
}
sink.process(entityContainer);
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb
private void assertEntityHasTimestamp(Entity entity) {
if (entity.getTimestamp() == null) {
throw new OsmosisRuntimeException(
entity.getType().toString() + " " + entity.getId() + " does not have a timestamp set.");
}
}
代码示例来源:origin: openstreetmap/osmosis
/**
* {@inheritDoc}
*/
@Override
public void populateFeatures(Te entity) {
// Add all applicable tags to the entity.
while (source.hasNext()
&& source.peekNext().getEntityId() == entity.getId()) {
featureLoader.getFeatureCollection(entity).add(source.next().getFeature());
}
}
代码示例来源:origin: openstreetmap/osmosis
private void assertEntityHasTimestamp(Entity entity) {
if (entity.getTimestamp() == null) {
throw new OsmosisRuntimeException(
entity.getType().toString() + " " + entity.getId() + " does not have a timestamp set.");
}
}
代码示例来源:origin: openstreetmap/osmosis
private void assertEntityHasTimestamp(Entity entity) {
if (entity.getTimestamp() == null) {
throw new OsmosisRuntimeException(
entity.getType().toString() + " " + entity.getId() + " does not have a timestamp set.");
}
}
代码示例来源:origin: openstreetmap/osmosis
/**
* {@inheritDoc}
*/
public void process(EntityContainer entityContainer) {
Entity entity;
entity = entityContainer.getEntity();
if (progressTracker.updateRequired()) {
LOG.info(
prefix
+ "Processing " + entity.getType() + " " + entity.getId() + ", "
+ progressTracker.getObjectsPerSecond() + " objects/second.");
}
sink.process(entityContainer);
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb
private void assertEntityHasTimestamp(Entity entity) {
if (entity.getTimestamp() == null) {
throw new OsmosisRuntimeException(
entity.getType().toString() + " " + entity.getId() + " does not have a timestamp set.");
}
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-core
/**
* Initializes the contents of the builder to the specified data.
*
* @param entity
* The entity to initialise to.
* @return This object allowing method chaining.
*/
protected EntityBuilder<T> initialize(Entity entity) {
// Delegate to the more specific method.
initialize(entity.getId(), entity.getVersion(), entity.getTimestampContainer(), entity.getUser(), entity
.getChangesetId());
tags.addAll(entity.getTags());
return this;
}
代码示例来源:origin: openstreetmap/osmosis
/**
* Performs any validation and pre-processing required for all entity types.
*/
private void processEntityPrerequisites(Entity entity) {
// We can't write an entity with a null timestamp.
if (entity.getTimestamp() == null) {
throw new OsmosisRuntimeException("Entity(" + entity.getType()
+ ") " + entity.getId() + " does not have a timestamp set.");
}
// Process the user data.
writeUser(entity.getUser());
}
代码示例来源:origin: openstreetmap/osmosis
/**
* Initializes the contents of the builder to the specified data.
*
* @param entity
* The entity to initialise to.
* @return This object allowing method chaining.
*/
protected EntityBuilder<T> initialize(Entity entity) {
// Delegate to the more specific method.
initialize(entity.getId(), entity.getVersion(), entity.getTimestampContainer(), entity.getUser(), entity
.getChangesetId());
tags.addAll(entity.getTags());
return this;
}
代码示例来源:origin: openstreetmap/osmosis
/**
* Performs any validation and pre-processing required for all entity types.
*/
private void processEntityPrerequisites(Entity entity) {
// We can't write an entity with a null timestamp.
if (entity.getTimestamp() == null) {
throw new OsmosisRuntimeException("Entity(" + entity.getType()
+ ") " + entity.getId() + " does not have a timestamp set.");
}
// Process the user data.
writeUser(entity.getUser());
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-core
/**
* {@inheritDoc}
*/
public void process(ChangeContainer changeContainer) {
Entity entity;
ChangeAction action;
entity = changeContainer.getEntityContainer().getEntity();
action = changeContainer.getAction();
if (progressTracker.updateRequired()) {
LOG.info(
prefix
+ "Processing " + entity.getType() + " " + entity.getId() + " with action " + action + ", "
+ progressTracker.getObjectsPerSecond() + " objects/second.");
}
changeSink.process(changeContainer);
}
代码示例来源:origin: openstreetmap/osmosis
/**
* {@inheritDoc}
*/
public void process(ChangeContainer changeContainer) {
Entity entity;
ChangeAction action;
entity = changeContainer.getEntityContainer().getEntity();
action = changeContainer.getAction();
if (progressTracker.updateRequired()) {
LOG.info(
prefix
+ "Processing " + entity.getType() + " " + entity.getId() + " with action " + action + ", "
+ progressTracker.getObjectsPerSecond() + " objects/second.");
}
changeSink.process(changeContainer);
}
代码示例来源:origin: openstreetmap/osmosis
/**
* {@inheritDoc}
*/
@Override
public void populateFeatures(Te entity) {
// Add all applicable tags to the entity.
while (source.hasNext()
&& source.peekNext().getFeature().getEntityId() == entity.getId()
&& source.peekNext().getVersion() == entity.getVersion()) {
featureLoader.getFeatureCollection(entity).add(source.next().getFeature().getFeature());
}
}
代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb
/**
* {@inheritDoc}
*/
@Override
public void populateFeatures(Te entity) {
// Add all applicable tags to the entity.
while (source.hasNext()
&& source.peekNext().getFeature().getEntityId() == entity.getId()
&& source.peekNext().getVersion() == entity.getVersion()) {
featureLoader.getFeatureCollection(entity).add(source.next().getFeature().getFeature());
}
}
内容来源于网络,如有侵权,请联系作者删除!