Ignore:
Timestamp:
03.02.2010 22:53:24 (2 years ago)
Author:
mjulius
Message:

bring PrimitiveData.getId() in line with OsmPrimitive.getId()
remove OsmReader.OsmPrimitiveData and use PrimitiveData instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java

    r2818 r2932  
    44import java.util.ArrayList; 
    55import java.util.Collection; 
     6import java.util.Date; 
    67import java.util.HashMap; 
    78import java.util.List; 
     
    4748    private User user; 
    4849    private int version; 
    49     private int timestamp; 
     50    private Date timestamp = new Date(); 
    5051    private int changesetId; 
    5152 
     
    6970    } 
    7071    public long getId() { 
    71         return id; 
     72        return id > 0 ? id : 0; 
    7273    } 
    7374    public void setId(long id) { 
     
    8687        this.version = version; 
    8788    } 
    88     public int getTimestamp() { 
     89    public Date getTimestamp() { 
    8990        return timestamp; 
    9091    } 
    91     public void setTimestamp(int timestamp) { 
     92    public void setTimestamp(Date timestamp) { 
    9293        this.timestamp = timestamp; 
    9394    } 
     
    194195    } 
    195196 
     197    /** 
     198     * Returns a PrimitiveId object for this primitive 
     199     * 
     200     * @return the PrimitiveId for this primitive 
     201     */ 
     202    public PrimitiveId getPrimitiveId() { 
     203        return new SimplePrimitiveId(getUniqueId(), getType()); 
     204    } 
     205 
    196206    public boolean isNew() { 
    197207        return id <= 0; 
Note: See TracChangeset for help on using the changeset viewer.