Package org.gstreamer

Examples of org.gstreamer.Bus$TAG


  public final void testProcessWayWithNoUser() {
    Way way =
      new Way(new CommonEntityData(1234, 2, timestamp, OsmUser.NONE, 0));
    way.getWayNodes().add(new WayNode(1235));
    way.getWayNodes().add(new WayNode(1236));
    way.getTags().add(new Tag("waykey", "wayvalue"));
   
    testWayWriter.process(way);
    try {
      testBufferedWriter.flush();
    } catch (IOException e) {
View Full Code Here


    Relation relation =
      new Relation(new CommonEntityData(1234, 2, timestamp, new OsmUser(23, "someuser"), 0));
    relation.getMembers().add(new RelationMember(2345, EntityType.Node, "noderole"));
    relation.getMembers().add(new RelationMember(3456, EntityType.Way, "wayrole"));
    relation.getMembers().add(new RelationMember(4567, EntityType.Relation, "relationrole"));
    relation.getTags().add(new Tag("relationkey", "relationvalue"));
   
    testRelationWriter.process(relation);
    try {
      testBufferedWriter.flush();
    } catch (IOException e) {
View Full Code Here

    Relation relation =
      new Relation(new CommonEntityData(1234, 2, timestamp, OsmUser.NONE, 0));
    relation.getMembers().add(new RelationMember(2345, EntityType.Node, "noderole"));
    relation.getMembers().add(new RelationMember(3456, EntityType.Way, "wayrole"));
    relation.getMembers().add(new RelationMember(4567, EntityType.Relation, "relationrole"));
    relation.getTags().add(new Tag("relationkey", "relationvalue"));
   
    testRelationWriter.process(relation);
    try {
      testBufferedWriter.flush();
    } catch (IOException e) {
View Full Code Here

          e);
    }
  }
 
  private Tag readTag() throws Exception {
    Tag tag = new Tag(reader.getAttributeValue(null, ATTRIBUTE_NAME_KEY),
        reader.getAttributeValue(null, ATTRIBUTE_NAME_VALUE));
    reader.nextTag();
    reader.nextTag();
    return tag;
  }
View Full Code Here

   
    writeableContainer = entityContainer.getWriteableInstance();
    entity = writeableContainer.getEntity();
   
    for (Iterator<Tag> i = entity.getTags().iterator(); i.hasNext();) {
      Tag tag;
     
      tag = i.next();
     
      if (keysToDrop.contains(tag.getKey())) {
        i.remove();
      } else {
        for (String prefix : keyPrefixesToDrop) {
          if (tag.getKey().startsWith(prefix)) {
            i.remove();
               break;
          }
        }
      }
View Full Code Here

  @Override
  public DbFeature<Tag> buildEntity(ResultSet resultSet) {
    try {
      return new DbFeature<Tag>(
        resultSet.getLong("entity_id"),
        new Tag(
          resultSet.getString("k"),
          resultSet.getString("v")
        )
      );
     
View Full Code Here

   */
  @Override
  public int populateEntityParameters(PreparedStatement statement, int initialIndex, DbFeature<Tag> entityFeature) {
    try {
      int prmIndex;
      Tag tag;
     
      tag = entityFeature.getFeature();
     
      prmIndex = initialIndex;
     
      statement.setLong(prmIndex++, entityFeature.getEntityId());
      statement.setString(prmIndex++, tag.getKey());
      statement.setString(prmIndex++, tag.getValue());
     
      return prmIndex;
     
    } catch (SQLException e) {
      throw new OsmosisRuntimeException(
View Full Code Here

   
    dbTags = (Map<String, String>) rs.getObject("tags");
    if (dbTags != null) {
      tags = entityData.getTags();
      for (Entry<String, String> tagEntry : dbTags.entrySet()) {
        tags.add(new Tag(tagEntry.getKey(), tagEntry.getValue()));
      }
    }
   
    return entityData;
  }
View Full Code Here

    Iterator<Integer> keyIterator = keys.iterator();
    Iterator<Integer> valueIterator = values.iterator();
    while (keyIterator.hasNext()) {
      String key = fieldDecoder.decodeString(keyIterator.next());
      String value = fieldDecoder.decodeString(valueIterator.next());
      Tag tag = new Tag(key, value);
      tags.add(tag);
    }
  }
View Full Code Here

          throw new OsmosisRuntimeException(
              "The PBF DenseInfo keys/values list contains a key with no corresponding value.");
        }
        int valueIndex = keysValuesIterator.next();

        Tag tag = new Tag(fieldDecoder.decodeString(keyIndex), fieldDecoder.decodeString(valueIndex));
        tags.add(tag);
      }

      node = new org.openstreetmap.osmosis.core.domain.v0_6.Node(entityData,
          fieldDecoder.decodeLatitude(latitude), fieldDecoder.decodeLongitude(longitude));
View Full Code Here

TOP

Related Classes of org.gstreamer.Bus$TAG

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.