本文整理汇总了Java中org.javarosa.core.model.IAnswerDataSerializer类的典型用法代码示例。如果您正苦于以下问题:Java IAnswerDataSerializer类的具体用法?Java IAnswerDataSerializer怎么用?Java IAnswerDataSerializer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IAnswerDataSerializer类属于org.javarosa.core.model包,在下文中一共展示了IAnswerDataSerializer类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: retrieveExternalDataPointer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public IDataPointer[] retrieveExternalDataPointer(IAnswerData data) {
for (IAnswerDataSerializer serializer : additionalSerializers) {
Boolean contains = serializer.containsExternalData(data);
if(contains != null) {
return serializer.retrieveExternalDataPointer(data);
}
}
if( data instanceof PointerAnswerData) {
IDataPointer[] pointer = new IDataPointer[1];
pointer[0] = (IDataPointer)((PointerAnswerData)data).getValue();
return pointer;
}
else if (data instanceof MultiPointerAnswerData ) {
return (IDataPointer[])((MultiPointerAnswerData)data).getValue();
}
//This shouldn't have been called.
return null;
}
示例2: containsExternalData
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public Boolean containsExternalData(IAnswerData data) {
//First check for registered serializers to identify whether
//they override this one.
Enumeration en = additionalSerializers.elements();
while (en.hasMoreElements()) {
IAnswerDataSerializer serializer = (IAnswerDataSerializer)en.nextElement();
Boolean contains = serializer.containsExternalData(data);
if (contains != null) {
return contains;
}
}
if (data instanceof PointerAnswerData) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}
示例3: retrieveExternalDataPointer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public IDataPointer[] retrieveExternalDataPointer(IAnswerData data) {
Enumeration en = additionalSerializers.elements();
while (en.hasMoreElements()) {
IAnswerDataSerializer serializer = (IAnswerDataSerializer)en.nextElement();
Boolean contains = serializer.containsExternalData(data);
if (contains != null) {
return serializer.retrieveExternalDataPointer(data);
}
}
if (data instanceof PointerAnswerData) {
IDataPointer[] pointer = new IDataPointer[1];
pointer[0] = (IDataPointer)data.getValue();
return pointer;
}
//This shouldn't have been called.
return null;
}
示例4: containsExternalData
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
@Override
public Boolean containsExternalData(IAnswerData data) {
//First check for registered serializers to identify whether
//they override this one.
Enumeration en = additionalSerializers.elements();
while (en.hasMoreElements()) {
IAnswerDataSerializer serializer = (IAnswerDataSerializer)en.nextElement();
Boolean contains = serializer.containsExternalData(data);
if (contains != null) {
return contains;
}
}
if (data instanceof PointerAnswerData) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}
示例5: retrieveExternalDataPointer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
@Override
public IDataPointer[] retrieveExternalDataPointer(IAnswerData data) {
Enumeration en = additionalSerializers.elements();
while (en.hasMoreElements()) {
IAnswerDataSerializer serializer = (IAnswerDataSerializer)en.nextElement();
Boolean contains = serializer.containsExternalData(data);
if (contains != null) {
return serializer.retrieveExternalDataPointer(data);
}
}
if (data instanceof PointerAnswerData) {
IDataPointer[] pointer = new IDataPointer[1];
pointer[0] = (IDataPointer)data.getValue();
return pointer;
}
//This shouldn't have been called.
return null;
}
示例6: serializeAnswerData
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public Object serializeAnswerData(IAnswerData data, int dataType) {
// First, we want to go through the additional serializers, as they should
// take priority to the default serializations
for (IAnswerDataSerializer serializer : additionalSerializers) {
if(serializer.canSerialize(data)) {
return serializer.serializeAnswerData(data, dataType);
}
}
//Defaults
Object result = serializeAnswerData(data);
return result;
}
示例7: containsExternalData
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public Boolean containsExternalData(IAnswerData data) {
//First check for registered serializers to identify whether
//they override this one.
for (IAnswerDataSerializer serializer : additionalSerializers) {
Boolean contains = serializer.containsExternalData(data);
if(contains != null) {
return contains;
}
}
if( data instanceof PointerAnswerData ||
data instanceof MultiPointerAnswerData ) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}
示例8: serializeAnswerData
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public Object serializeAnswerData(IAnswerData data, int dataType) {
// First, we want to go through the additional serializers, as they should
// take priority to the default serializations
Enumeration en = additionalSerializers.elements();
while (en.hasMoreElements()) {
IAnswerDataSerializer serializer = (IAnswerDataSerializer)en.nextElement();
if (serializer.canSerialize(data)) {
return serializer.serializeAnswerData(data, dataType);
}
}
//Defaults
return serializeAnswerData(data);
}
示例9: serializeAnswerData
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
@Override
public Object serializeAnswerData(IAnswerData data, int dataType) {
// First, we want to go through the additional serializers, as they should
// take priority to the default serializations
Enumeration en = additionalSerializers.elements();
while (en.hasMoreElements()) {
IAnswerDataSerializer serializer = (IAnswerDataSerializer)en.nextElement();
if (serializer.canSerialize(data)) {
return serializer.serializeAnswerData(data, dataType);
}
}
//Defaults
return serializeAnswerData(data);
}
示例10: setAnswerDataSerializer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public void setAnswerDataSerializer(IAnswerDataSerializer ads) {
this.serializer = ads;
}
示例11: registerAnswerSerializer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public void registerAnswerSerializer(IAnswerDataSerializer ads) {
additionalSerializers.add(ads);
}
示例12: setAnswerDataSerializer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
@Override
public void setAnswerDataSerializer(IAnswerDataSerializer ads) {
this.serializer = ads;
}
示例13: setAnswerDataSerializer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
public void setAnswerDataSerializer(IAnswerDataSerializer ads) {
this.serializer = ads;
}
示例14: setAnswerDataSerializer
import org.javarosa.core.model.IAnswerDataSerializer; //导入依赖的package包/类
void setAnswerDataSerializer(IAnswerDataSerializer ads);