-
public final class GeoDataExtra extends Storable
Container with meta-data for GeoData objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classGeoDataExtra.LabelTextContainerContainer for text links and attachments.
public enumGeoDataExtra.AttachTypeType of attached object.
public classGeoDataExtra.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Integercountprivate final List<GeoDataExtra.LabelTextContainer>phonesprivate final List<GeoDataExtra.LabelTextContainer>emailsprivate final List<GeoDataExtra.LabelTextContainer>urlsprivate final List<String>photosprivate final List<String>videosprivate final List<String>audiosprivate final List<String>otherFilesprivate final List<String>allAttachmentsprivate final IntegerallAttachmentsCountprivate final Storablecopyprivate final ByteArrayasBytes
-
Constructor Summary
Constructors Constructor Description GeoDataExtra()
-
Method Summary
Modifier and Type Method Description final IntegergetCount()final List<GeoDataExtra.LabelTextContainer>getPhones()final List<GeoDataExtra.LabelTextContainer>getEmails()final List<GeoDataExtra.LabelTextContainer>getUrls()final List<String>getPhotos()final List<String>getVideos()final List<String>getAudios()final List<String>getOtherFiles()final List<String>getAllAttachments()final IntegergetAllAttachmentsCount()final StorablegetCopy()final ByteArraygetAsBytes()final BooleanaddParameter(Integer key, String value)Add a single parameter to container, defined by ID and it's text representation. final BooleanaddParameter(Integer key, Byte value)Add a single parameter to container, defined by ID and it's byte value. final BooleanaddParameter(Integer key, ByteArray value)Add a single parameter to container, defined by ID and it's byte array representation. final ByteArraygetParameterRaw(Integer key)Return Raw data from storage. final StringgetParameter(Integer key)Get parameter already converted to text represenation. final StringgetParameterNotNull(Integer key)Get parameter from private container. final BooleanhasParameter(Integer key)Check if certain parameter exists in container. final StringremoveParameter(Integer key)Remove certain parameter from the container. final BooleansearchInParameters(Function1<String, Boolean> contains)Iterate over all parameters and test if any match condition defined by contains method. final UnitcopyFrom(GeoDataExtra dataNew, IntArray ignoreList)Copy data from other GeoDataExtra container to current object. final BooleanaddAttachment(GeoDataExtra.AttachType type, String label, String value)Add attachment of certain type into container. final List<GeoDataExtra.LabelTextContainer>getAttachments(GeoDataExtra.AttachType type)Get all attachments of certain type. final BooleanremoveAttachment(GeoDataExtra.AttachType type, String value)Remove attachment defined by its value, from storage. final UnitremoveAllAttachments(GeoDataExtra.AttachType type)Remove all attachments of certain type. -
-
Method Detail
-
getPhones
final List<GeoDataExtra.LabelTextContainer> getPhones()
-
getEmails
final List<GeoDataExtra.LabelTextContainer> getEmails()
-
getUrls
final List<GeoDataExtra.LabelTextContainer> getUrls()
-
getOtherFiles
final List<String> getOtherFiles()
-
getAllAttachments
final List<String> getAllAttachments()
-
getAllAttachmentsCount
final Integer getAllAttachmentsCount()
-
getAsBytes
final ByteArray getAsBytes()
-
addParameter
final Boolean addParameter(Integer key, String value)
Add a single parameter to container, defined by ID and it's text representation.
- Parameters:
key- key valuevalue- value itself
-
addParameter
final Boolean addParameter(Integer key, Byte value)
Add a single parameter to container, defined by ID and it's byte value.
- Parameters:
key- key valuevalue- value itself
-
addParameter
final Boolean addParameter(Integer key, ByteArray value)
Add a single parameter to container, defined by ID and it's byte array representation.
- Parameters:
key- key valuevalue- value itself
-
getParameterRaw
final ByteArray getParameterRaw(Integer key)
Return Raw data from storage. Do not modify these data directly. For fast access is provided original array, not any copy!
- Parameters:
key- key ID
-
getParameter
final String getParameter(Integer key)
Get parameter already converted to text represenation.
- Parameters:
key- parameter key
-
getParameterNotNull
final String getParameterNotNull(Integer key)
Get parameter from private container. Result is always not-null.
- Parameters:
key- parameterID to obtain value for
-
hasParameter
final Boolean hasParameter(Integer key)
Check if certain parameter exists in container.
- Parameters:
key- parameter key
-
removeParameter
final String removeParameter(Integer key)
Remove certain parameter from the container.
- Parameters:
key- parameter key
-
searchInParameters
final Boolean searchInParameters(Function1<String, Boolean> contains)
Iterate over all parameters and test if any match condition defined by contains method.
-
copyFrom
final Unit copyFrom(GeoDataExtra dataNew, IntArray ignoreList)
Copy data from other GeoDataExtra container to current object.
- Parameters:
dataNew- new dataignoreList- list of ID's we wants to ignore during copy task
-
addAttachment
final Boolean addAttachment(GeoDataExtra.AttachType type, String label, String value)
Add attachment of certain type into container.
- Parameters:
type- attachment typelabel- (optional) item labelvalue- item value itself
-
getAttachments
final List<GeoDataExtra.LabelTextContainer> getAttachments(GeoDataExtra.AttachType type)
Get all attachments of certain type.
- Parameters:
type- attachment type
-
removeAttachment
final Boolean removeAttachment(GeoDataExtra.AttachType type, String value)
Remove attachment defined by its value, from storage.
- Parameters:
type- attachment typevalue- value of attachment
-
removeAllAttachments
final Unit removeAllAttachments(GeoDataExtra.AttachType type)
Remove all attachments of certain type.
- Parameters:
type- attachment type
-
-
-
-