Package org.javarosa.core.model.instance
Class DataInstance<T extends AbstractTreeElement<T>>
java.lang.Object
org.javarosa.core.model.instance.DataInstance<T>
- All Implemented Interfaces:
Persistable,Externalizable
- Direct Known Subclasses:
ExternalDataInstance,FormInstance
public abstract class DataInstance<T extends AbstractTreeElement<T>> extends Object implements Persistable
A data instance represents a tree structure of abstract tree
elements which can be accessed and read with tree references. It is
a supertype of different types of concrete models which may or may not
be read only.
- Author:
- ctsims
-
Constructor Summary
Constructors Constructor Description DataInstance()DataInstance(String instanceid) -
Method Summary
-
Constructor Details
-
DataInstance
public DataInstance() -
DataInstance
-
-
Method Details
-
unpackReference
-
getBase
-
getRoot
-
getInstanceId
-
setInstanceId
-
isRuntimeEvaluated
public boolean isRuntimeEvaluated()Whether the structure of this instance is only available at runtime.- Returns:
- true if the instance structure is available and runtime and can't be checked for consistency until the reference is made available. False otherwise.
-
resolveReference
-
explodeReference
-
getTemplate
-
getTemplatePath
-
hasTemplatePath
Determines if a path exists for a reference; template elements are followed when available. Non-absolute references aren't followed.- Parameters:
ref- the reference path to be followed- Returns:
- was a valid path found for the reference?
-
resolveReference
-
setFormId
public void setFormId(int formId) -
getFormId
public int getFormId() -
getName
-
setName
-
toString
-
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getID
public int getID()- Specified by:
getIDin interfacePersistable
-
setID
public void setID(int recordid)- Specified by:
setIDin interfacePersistable
-
initialize
-