Class StreetsideSequence
- java.lang.Object
-
- org.openstreetmap.josm.plugins.streetside.StreetsideSequence
-
public class StreetsideSequence extends java.lang.Object
Class that stores a sequence ofStreetsideAbstractImageobjects.- See Also:
StreetsideAbstractImage
-
-
Field Summary
Fields Modifier and Type Field Description private longcdEpoch time when the sequence was createdprivate java.lang.StringidUnique identifier.private java.util.List<StreetsideAbstractImage>imagesThe images in the sequence.private doublelaprivate doubleloprivate UserProfileuser
-
Constructor Summary
Constructors Constructor Description StreetsideSequence()No argument constructor for StreetsideSequence - necessary for JSON serializationStreetsideSequence(java.lang.String id)StreetsideSequence(java.lang.String id, double la, double lo)StreetsideSequence(java.lang.String id, double la, double lo, long ca)StreetsideSequence(java.lang.String id, java.lang.Long ca)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.util.Collection<? extends StreetsideAbstractImage> images)Adds a set ofStreetsideAbstractImageobjects to the database.voidadd(StreetsideAbstractImage image)Adds a newStreetsideAbstractImageobject to the database.longgetCd()Returns the Epoch time when the sequence was captured.java.lang.StringgetId()Returns the unique identifier of the sequence.java.util.List<StreetsideAbstractImage>getImages()Returns allStreetsideAbstractImageobjects contained by this object.doublegetLa()doublegetLo()UserProfilegetUser()StreetsideAbstractImagenext(StreetsideAbstractImage image)Returns the nextStreetsideAbstractImagein the sequence of a givenStreetsideAbstractImageobject.StreetsideAbstractImageprevious(StreetsideAbstractImage image)Returns the previousStreetsideAbstractImagein the sequence of a givenStreetsideAbstractImageobject.voidremove(StreetsideAbstractImage image)Removes aStreetsideAbstractImageobject from the database.voidsetId(java.lang.String id)voidsetLa(double la)voidsetLo(double lo)
-
-
-
Field Detail
-
id
private java.lang.String id
Unique identifier. Used only forStreetsideImagesequences.
-
user
private UserProfile user
-
la
private double la
-
lo
private double lo
-
cd
private long cd
Epoch time when the sequence was created
-
images
private java.util.List<StreetsideAbstractImage> images
The images in the sequence.
-
-
Constructor Detail
-
StreetsideSequence
public StreetsideSequence(java.lang.String id, java.lang.Long ca)
-
StreetsideSequence
public StreetsideSequence(java.lang.String id, double la, double lo)
-
StreetsideSequence
public StreetsideSequence()
No argument constructor for StreetsideSequence - necessary for JSON serialization
-
StreetsideSequence
public StreetsideSequence(java.lang.String id, double la, double lo, long ca)
-
StreetsideSequence
public StreetsideSequence(java.lang.String id)
-
-
Method Detail
-
add
public void add(StreetsideAbstractImage image)
Adds a newStreetsideAbstractImageobject to the database.- Parameters:
image- TheStreetsideAbstractImageobject to be added
-
add
public void add(java.util.Collection<? extends StreetsideAbstractImage> images)
Adds a set ofStreetsideAbstractImageobjects to the database.- Parameters:
images- The set ofStreetsideAbstractImageobjects to be added.
-
next
public StreetsideAbstractImage next(StreetsideAbstractImage image)
Returns the nextStreetsideAbstractImagein the sequence of a givenStreetsideAbstractImageobject.- Parameters:
image- TheStreetsideAbstractImageobject whose next image is going to be returned.- Returns:
- The next
StreetsideAbstractImageobject in the sequence. - Throws:
java.lang.IllegalArgumentException- if the givenStreetsideAbstractImageobject doesn't belong the this sequence.
-
previous
public StreetsideAbstractImage previous(StreetsideAbstractImage image)
Returns the previousStreetsideAbstractImagein the sequence of a givenStreetsideAbstractImageobject.- Parameters:
image- TheStreetsideAbstractImageobject whose previous image is going to be returned.- Returns:
- The previous
StreetsideAbstractImageobject in the sequence. - Throws:
java.lang.IllegalArgumentException- if the givenStreetsideAbstractImageobject doesn't belong the this sequence.
-
remove
public void remove(StreetsideAbstractImage image)
Removes aStreetsideAbstractImageobject from the database.- Parameters:
image- TheStreetsideAbstractImageobject to be removed.
-
setId
public void setId(java.lang.String id)
- Parameters:
id- the id to set
-
getLa
public double getLa()
- Returns:
- the la
-
setLa
public void setLa(double la)
- Parameters:
la- the la to set
-
getLo
public double getLo()
- Returns:
- the lo
-
setLo
public void setLo(double lo)
- Parameters:
lo- the lo to set
-
getCd
public long getCd()
Returns the Epoch time when the sequence was captured. Negative values mean, no value is set.- Returns:
- A long containing the Epoch time when the sequence was captured.
-
getImages
public java.util.List<StreetsideAbstractImage> getImages()
Returns allStreetsideAbstractImageobjects contained by this object.- Returns:
- A
Listobject containing all theStreetsideAbstractImageobjects that are part of the sequence.
-
getId
public java.lang.String getId()
Returns the unique identifier of the sequence.- Returns:
- A
Stringcontaining the unique identifier of the sequence. null means that the sequence has been created locally for imported images.
-
getUser
public UserProfile getUser()
-
-