Package edu.stanford.nlp.ling

Examples of edu.stanford.nlp.ling.MultiTokenTag$Tag


     * @param dbEntityTag The entity tag containing the data to be inserted.
     */
    private void populateEntityTagParameters(PreparedStatement statement, int initialIndex,
        DbFeatureHistory<DbFeature<Tag>> dbEntityTag) {
        int prmIndex;
        Tag tag;

        prmIndex = initialIndex;

        tag = dbEntityTag.getFeature().getFeature();

        try {
            statement.setLong(prmIndex++, dbEntityTag.getFeature().getEntityId());
            statement.setString(prmIndex++, tag.getKey());
            statement.setString(prmIndex++, tag.getValue());
            statement.setInt(prmIndex++, dbEntityTag.getVersion());

        } catch (SQLException e) {
            throw new OsmosisRuntimeException("Unable to set a prepared statement parameter for an entity tag.", e);
        }
View Full Code Here


    Way testWay;
   
    testWay = new Way(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testWay.getWayNodes().add(new WayNode(1234));
    testWay.getWayNodes().add(new WayNode(1235));
    testWay.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new WayContainer(testWay));
    // Nothing to assert; just expect no exception
  }
View Full Code Here

    Way testWay;
   
    testWay = new Way(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testWay.getWayNodes().add(new WayNode(1234));
    testWay.getWayNodes().add(new WayNode(1235));
    testWay.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new WayContainer(testWay));
    testOsmWriter.process(new BoundContainer(new Bound("source")));
  }
View Full Code Here

  public final void testProcess8() {
    Relation testRelation;
   
    testRelation = new Relation(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testRelation.getMembers().add(new RelationMember(1234, EntityType.Node, "role1"));
    testRelation.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new RelationContainer(testRelation));
    // Nothing to assert; just expect no exception
  }
View Full Code Here

  public final void testProcess9() {
    Relation testRelation;
   
    testRelation = new Relation(new CommonEntityData(3456, 0, new Date(), new OsmUser(12, "OsmosisTest"), 0));
    testRelation.getMembers().add(new RelationMember(1234, EntityType.Node, "role1"));
    testRelation.getTags().add(new Tag("test_key1", "test_value1"));
   
    testOsmWriter.process(new RelationContainer(testRelation));
    testOsmWriter.process(new BoundContainer(new Bound("source")));
  }
View Full Code Here

    OsmUser user;
    List<Tag> tags;
   
    user = new OsmUser(12, "OsmosisTest");
     
    tags = Arrays.asList(new Tag("amenity", "bank"), new Tag("Akey", "Avalue"));
    amenityNode = new Node(new CommonEntityData(1101, 0, new Date(), user, 0, tags), 1, 2);
    amenityNodeContainer = new NodeContainer(amenityNode);

    tags = new ArrayList<Tag>();
    taglessNode = new Node(new CommonEntityData(1102, 0, new Date(), user, 0, tags), 3, 4);
    taglessNodeContainer = new NodeContainer(taglessNode);

    tags = Arrays.asList(new Tag("highway", "motorway"), new Tag("Bkey", "Bvalue"));
    motorwayWay = new Way(new CommonEntityData(2201, 0, new Date(), user, 0, tags), new ArrayList<WayNode>());
    motorwayWayContainer = new WayContainer(motorwayWay);

    tags = Arrays.asList(new Tag("highway", "residential"), new Tag("Ckey", "Cvalue"));
    residentialWay =
      new Way(new CommonEntityData(2202, 0, new Date(), user, 0, tags), new ArrayList<WayNode>());
    residentialWayContainer = new WayContainer(residentialWay);

    tags = Arrays.asList(new Tag("Dkey", "Dvalue"));
    testRelation =
      new Relation(new CommonEntityData(3301, 0, new Date(), user, 0, tags), new ArrayList<RelationMember>());
    testRelationContainer = new RelationContainer(testRelation);
  }
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.ling.MultiTokenTag$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.