當前位置: 首頁>>代碼示例>>Java>>正文


Java IAnswerDataSerializer類代碼示例

本文整理匯總了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;
}
 
開發者ID:medic,項目名稱:javarosa,代碼行數:19,代碼來源:XFormAnswerDataSerializer.java

示例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;
}
 
開發者ID:dimagi,項目名稱:commcare-j2me,代碼行數:17,代碼來源:XFormAnswerDataSerializer.java

示例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;
}
 
開發者ID:dimagi,項目名稱:commcare-j2me,代碼行數:18,代碼來源:XFormAnswerDataSerializer.java

示例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;
}
 
開發者ID:dimagi,項目名稱:commcare-core,代碼行數:18,代碼來源:XFormAnswerDataSerializer.java

示例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;
}
 
開發者ID:dimagi,項目名稱:commcare-core,代碼行數:19,代碼來源:XFormAnswerDataSerializer.java

示例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;
}
 
開發者ID:medic,項目名稱:javarosa,代碼行數:13,代碼來源:XFormAnswerDataSerializer.java

示例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;
}
 
開發者ID:medic,項目名稱:javarosa,代碼行數:16,代碼來源:XFormAnswerDataSerializer.java

示例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);
}
 
開發者ID:dimagi,項目名稱:commcare-j2me,代碼行數:14,代碼來源:XFormAnswerDataSerializer.java

示例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);
}
 
開發者ID:dimagi,項目名稱:commcare-core,代碼行數:15,代碼來源:XFormAnswerDataSerializer.java

示例10: setAnswerDataSerializer

import org.javarosa.core.model.IAnswerDataSerializer; //導入依賴的package包/類
public void setAnswerDataSerializer(IAnswerDataSerializer ads) {
	this.serializer = ads;
}
 
開發者ID:medic,項目名稱:javarosa,代碼行數:4,代碼來源:XFormSerializingVisitor.java

示例11: registerAnswerSerializer

import org.javarosa.core.model.IAnswerDataSerializer; //導入依賴的package包/類
public void registerAnswerSerializer(IAnswerDataSerializer ads) {
	additionalSerializers.add(ads);
}
 
開發者ID:medic,項目名稱:javarosa,代碼行數:4,代碼來源:XFormAnswerDataSerializer.java

示例12: setAnswerDataSerializer

import org.javarosa.core.model.IAnswerDataSerializer; //導入依賴的package包/類
@Override
public void setAnswerDataSerializer(IAnswerDataSerializer ads) {
    this.serializer = ads;
}
 
開發者ID:dimagi,項目名稱:commcare-j2me,代碼行數:5,代碼來源:XFormSerializingVisitor.java

示例13: setAnswerDataSerializer

import org.javarosa.core.model.IAnswerDataSerializer; //導入依賴的package包/類
public void setAnswerDataSerializer(IAnswerDataSerializer ads) {
    this.serializer = ads;
}
 
開發者ID:dimagi,項目名稱:commcare-j2me,代碼行數:4,代碼來源:SMSSerializingVisitor.java

示例14: setAnswerDataSerializer

import org.javarosa.core.model.IAnswerDataSerializer; //導入依賴的package包/類
void setAnswerDataSerializer(IAnswerDataSerializer ads); 
開發者ID:medic,項目名稱:javarosa,代碼行數:2,代碼來源:IInstanceSerializingVisitor.java


注:本文中的org.javarosa.core.model.IAnswerDataSerializer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。