Package org.javarosa.core.model.instance
Class ExternalDataInstance
java.lang.Object
org.javarosa.core.model.instance.DataInstance
org.javarosa.core.model.instance.ExternalDataInstance
- All Implemented Interfaces:
Persistable,Externalizable
public class ExternalDataInstance extends DataInstance
-
Constructor Summary
Constructors Constructor Description ExternalDataInstance()No-args constructor for deserialization -
Method Summary
Modifier and Type Method Description static ExternalDataInstancebuild(String instanceSrc, String instanceId)Builds an ExternalDataInstanceAbstractTreeElementgetBase()AbstractTreeElementgetRoot()voidinitialize(InstanceInitializationFactory initializer, String instanceId)voidreadExternal(DataInputStream in, PrototypeFactory pf)voidwriteExternal(DataOutputStream out)Methods inherited from class org.javarosa.core.model.instance.DataInstance
explodeReference, getFormId, getID, getInstanceId, getName, getTemplate, getTemplatePath, hasTemplatePath, isRuntimeEvaluated, resolveReference, resolveReference, setFormId, setID, setInstanceId, setName, toString, unpackReference
-
Constructor Details
-
ExternalDataInstance
public ExternalDataInstance()No-args constructor for deserialization
-
-
Method Details
-
build
public static ExternalDataInstance build(String instanceSrc, String instanceId) throws IOException, UnfullfilledRequirementsException, org.xmlpull.v1.XmlPullParserException, InvalidStructureException, InvalidReferenceExceptionBuilds an ExternalDataInstance- Parameters:
instanceSrc- the value of the instance’s src attribute, e.g., jr://file/…instanceId- the ID of the new instance- Returns:
- a new ExternalDataInstance
- Throws:
IOException- if FileInputStream can’t find the file, or ElementParser can’t read the streamInvalidReferenceException- if the ReferenceManager in getPath(String srcLocation) can’t derive a referenceUnfullfilledRequirementsException- thrown byTreeElementParser.parse()org.xmlpull.v1.XmlPullParserException- thrown byTreeElementParser.parse()InvalidStructureException- thrown byTreeElementParser.parse()
-
getBase
- Specified by:
getBasein classDataInstance
-
getRoot
- Specified by:
getRootin classDataInstance
-
initialize
- Specified by:
initializein classDataInstance
-
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classDataInstance- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classDataInstance- Throws:
IOException
-