Class SetGeopointAction
java.lang.Object
org.javarosa.core.model.actions.Action
org.javarosa.core.model.actions.setgeopoint.SetGeopointAction
- All Implemented Interfaces:
Externalizable
- Direct Known Subclasses:
StubSetGeopointAction
public abstract class SetGeopointAction extends Action
Abstract implementation of odk:setgeopoint action. Concrete implementations must:
- provide a way to request location updates when the action is triggered
- use
saveLocationValue(String) to write a location to the model
- provide a no-argument constructor with no body for serialization
- get registered by the PrototypeManager-
Field Summary
Fields inherited from class org.javarosa.core.model.actions.Action
EVENT_JR_INSERT, EVENT_ODK_INSTANCE_FIRST_LOAD, EVENT_ODK_NEW_REPEAT, EVENT_QUESTION_VALUE_CHANGED, EVENT_XFORMS_READY, EVENT_XFORMS_REVALIDATE -
Constructor Summary
Constructors Constructor Description SetGeopointAction()SetGeopointAction(TreeReference targetReference) -
Method Summary
Modifier and Type Method Description TreeReferencegetContextualizedTargetReference()TreeReferencegetTargetReference()TreeReferenceprocessAction(FormDef model, TreeReference contextRef)Process actions that were triggered in the form.voidreadExternal(DataInputStream in, PrototypeFactory pf)abstract voidrequestLocationUpdates()Client-specific location request.voidsaveLocationValue(String location)Save the location to the model.voidsetTargetReference(TreeReference targetReference)voidwriteExternal(DataOutputStream out)
-
Constructor Details
-
SetGeopointAction
public SetGeopointAction() -
SetGeopointAction
-
-
Method Details
-
getTargetReference
-
getContextualizedTargetReference
-
setTargetReference
-
processAction
Description copied from class:ActionProcess actions that were triggered in the form. NOTE: Currently actions are only processed on nodes that are WITHIN the context provided, if one is provided. This will need to get changed possibly for future action types.- Specified by:
processActionin classAction- Returns:
- TreeReference targeted by the action or null if the action wasn't completed.
-
requestLocationUpdates
public abstract void requestLocationUpdates()Client-specific location request. Implementations could immediately read a location and write it to the model if available or could initiate a request and asynchronously write the location when available. -
saveLocationValue
Save the location to the model. -
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classAction- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classAction- Throws:
IOException
-