本文整理汇总了Java中org.javarosa.core.services.PrototypeManager类的典型用法代码示例。如果您正苦于以下问题:Java PrototypeManager类的具体用法?Java PrototypeManager怎么用?Java PrototypeManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PrototypeManager类属于org.javarosa.core.services包,在下文中一共展示了PrototypeManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initializeJavaRosa
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
/**
* Isolate the initialization of JavaRosa into one method, called first
* by the Collect Application. Called subsequently whenever the Preferences
* dialogs are exited (to potentially update username and email fields).
*
* @param mgr
*/
public static synchronized void initializeJavaRosa(IPropertyManager mgr) {
if ( !isJavaRosaInitialized ) {
// need a list of classes that formdef uses
// unfortunately, the JR registerModule() functions do more than this.
// register just the classes that would have been registered by:
// new JavaRosaCoreModule().registerModule();
// new CoreModelModule().registerModule();
// replace with direct call to PrototypeManager
PrototypeManager.registerPrototypes(SERIALIABLE_CLASSES);
new XFormsModule().registerModule();
isJavaRosaInitialized = true;
}
// needed to override rms property manager
org.javarosa.core.services.PropertyManager
.setPropertyManager(mgr);
}
开发者ID:Last-Mile-Health,项目名称:ODK-Liberia,代码行数:26,代码来源:FormController.java
示例2: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule() {
String[] prototypes = new String[] {BasicInstaller.class.getName(),
LocaleFileInstaller.class.getName(),
SuiteInstaller.class.getName(),
ProfileInstaller.class.getName(),
MediaInstaller.class.getName(),
XFormInstaller.class.getName(),
Text.class.getName(),
PropertySetter.class.getName(),
FormEntry.class.getName(),
DummyGraphDetailTemplate.class.getName()};
PrototypeManager.registerPrototypes(prototypes);
StorageManager.registerStorage(CommCareContext.STORAGE_TABLE_GLOBAL, Resource.class);
StorageManager.registerStorage(Suite.STORAGE_KEY, Suite.class);
StorageManager.registerStorage(Profile.STORAGE_KEY, Profile.class);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:18,代码来源:CommCareModule.java
示例3: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule() {
//Note: Do not remove fully qualified names here, otherwise the imports mess up the polish preprocessing
//#if polish.api.wmapi
String[] prototypes = new String[] { SimpleHttpTransportMessage.class.getName(), org.javarosa.services.transport.impl.sms.SMSTransportMessage.class.getName(), org.javarosa.services.transport.impl.binarysms.BinarySMSTransportMessage.class.getName(), TransportMessageSerializationWrapper.class.getName(), org.javarosa.core.services.transport.payload.ByteArrayPayload.class.getName(), org.javarosa.core.services.transport.payload.DataPointerPayload.class.getName(), org.javarosa.core.services.transport.payload.MultiMessagePayload.class.getName(), org.javarosa.services.transport.impl.simplehttp.multipart.HttpTransportHeader.class.getName()};
//#else
//# String[] prototypes = new String[] { SimpleHttpTransportMessage.class.getName(), TransportMessageSerializationWrapper.class.getName(), org.javarosa.core.services.transport.payload.ByteArrayPayload.class.getName(), org.javarosa.core.services.transport.payload.DataPointerPayload.class.getName(), org.javarosa.core.services.transport.payload.MultiMessagePayload.class.getName(), org.javarosa.services.transport.impl.simplehttp.multipart.HttpTransportHeader.class.getName()};
//#endif
PrototypeManager.registerPrototypes(prototypes);
StorageManager.registerWrappedStorage(TransportMessageStore.Q_STORENAME, TransportMessageStore.Q_STORENAME, new TransportMessageSerializationWrapper());
StorageManager.registerWrappedStorage(TransportMessageStore.RECENTLY_SENT_STORENAME, TransportMessageStore.RECENTLY_SENT_STORENAME, new TransportMessageSerializationWrapper());
ReferenceManager._().addReferenceFactory(new HttpRoot(listener));
PropertyManager._().addRules(new TransportPropertyRules());
TransportService.init();
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:21,代码来源:TransportManagerModule.java
示例4: initializeJavaRosa
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
/**
* The JR implementation here does not look thread-safe or
* like something to be invoked more than once.
* Moving it within a critical section and a do-once guard.
*/
private static void initializeJavaRosa() {
synchronized (log) {
if (!isJavaRosaInitialized) {
// Register prototypes for classes that FormDef uses
PrototypeManager.registerPrototypes(JavaRosaCoreModule.classNames);
PrototypeManager.registerPrototypes(CoreModelModule.classNames);
new XFormsModule().registerModule();
isJavaRosaInitialized = true;
}
}
}
开发者ID:opendatakit,项目名称:aggregate,代码行数:17,代码来源:BaseFormParserForJavaRosa.java
示例5: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule() {
String[] classes = {
"org.javarosa.model.xform.XPathReference",
"org.javarosa.xpath.XPathConditional"
};
PrototypeManager.registerPrototypes(classes);
PrototypeManager.registerPrototypes(XPathParseTool.xpathClasses);
RestoreUtils.xfFact = new IXFormyFactory () {
public TreeReference ref (String refStr) {
return FormInstance.unpackReference(new XPathReference(refStr));
}
public IDataPayload serializeInstance (FormInstance dm) {
try {
return (new XFormSerializingVisitor()).createSerializedPayload(dm);
} catch (IOException e) {
return null;
}
}
public FormInstance parseRestore(byte[] data, Class restorableType) {
return XFormParser.restoreDataModel(data, restorableType);
}
public IAnswerData parseData (String textVal, int dataType, TreeReference ref, FormDef f) {
return XFormAnswerDataParser.getAnswerData(textVal, dataType, XFormParser.ghettoGetQuestionDef(dataType, f, ref));
}
public String serializeData(IAnswerData data) {
return (String)(new XFormAnswerDataSerializer().serializeAnswerData(data));
}
public IConditionExpr refToPathExpr(TreeReference ref) {
return new XPathConditional(XPathPathExpr.fromRef(ref));
}
};
}
开发者ID:medic,项目名称:javarosa,代码行数:39,代码来源:XFormsModule.java
示例6: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule() {
StorageManager.registerStorage(FormDef.STORAGE_KEY, FormDef.class);
StorageManager.registerStorage(FormInstance.STORAGE_KEY, FormInstance.class);
String[] classes = {
"org.javarosa.core.model.SubmissionProfile",
"org.javarosa.core.model.QuestionDef",
"org.javarosa.core.model.GroupDef",
"org.javarosa.core.model.instance.FormInstance",
"org.javarosa.core.model.data.BooleanData",
"org.javarosa.core.model.data.DateData",
"org.javarosa.core.model.data.DateTimeData",
"org.javarosa.core.model.data.DecimalData",
"org.javarosa.core.model.data.GeoLineData",
"org.javarosa.core.model.data.GeoPointData",
"org.javarosa.core.model.data.GeoShapeData",
"org.javarosa.core.model.data.IntegerData",
"org.javarosa.core.model.data.LongData",
"org.javarosa.core.model.data.MultiPointerAnswerData",
"org.javarosa.core.model.data.PointerAnswerData",
"org.javarosa.core.model.data.SelectMultiData",
"org.javarosa.core.model.data.SelectOneData",
"org.javarosa.core.model.data.StringData",
"org.javarosa.core.model.data.TimeData",
"org.javarosa.core.model.data.UncastData",
"org.javarosa.core.model.data.helper.BasicDataPointer",
"org.javarosa.core.model.Action",
"org.javarosa.core.model.actions.SetValueAction"
};
PrototypeManager.registerPrototypes(classes);
}
开发者ID:medic,项目名称:javarosa,代码行数:32,代码来源:CoreModelModule.java
示例7: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule() {
String[] classes = {
"org.javarosa.core.services.locale.ResourceFileDataSource",
"org.javarosa.core.services.locale.TableLocaleSource"
};
PrototypeManager.registerPrototypes(classes);
ReferenceManager._().addReferenceFactory(new ResourceReferenceFactory());
}
开发者ID:medic,项目名称:javarosa,代码行数:9,代码来源:JavaRosaCoreModule.java
示例8: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule()
{
String[] classes = {
"org.javarosa.media.audio.model.FileDataPointer",
};
PrototypeManager.registerPrototypes(classes);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:8,代码来源:RecordModule.java
示例9: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
@Override
public void registerModule() {
String[] classes = {
"org.javarosa.model.xform.XPathReference",
"org.javarosa.xpath.XPathConditional"
};
PrototypeManager.registerPrototypes(classes);
PrototypeManager.registerPrototypes(XPathParseTool.xpathClasses);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:11,代码来源:XFormsModule.java
示例10: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
@Override
public void registerModule() {
StorageManager.registerStorage(FormDef.STORAGE_KEY, FormDef.class);
StorageManager.registerStorage(FormInstance.STORAGE_KEY, FormInstance.class);
String[] classes = {
"org.javarosa.core.model.SubmissionProfile",
"org.javarosa.core.model.QuestionDef",
"org.javarosa.core.model.GroupDef",
"org.javarosa.core.model.instance.FormInstance",
"org.javarosa.core.model.instance.ExternalDataInstance",
"org.javarosa.core.model.data.BooleanData",
"org.javarosa.core.model.data.DateData",
"org.javarosa.core.model.data.DateTimeData",
"org.javarosa.core.model.data.DecimalData",
"org.javarosa.core.model.data.GeoPointData",
"org.javarosa.core.model.data.IntegerData",
"org.javarosa.core.model.data.LongData",
"org.javarosa.core.model.data.PointerAnswerData",
"org.javarosa.core.model.data.SelectMultiData",
"org.javarosa.core.model.data.SelectOneData",
"org.javarosa.core.model.data.StringData",
"org.javarosa.core.model.data.TimeData",
"org.javarosa.core.model.data.UncastData",
"org.javarosa.core.model.actions.SetValueAction"
};
PrototypeManager.registerPrototypes(classes);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:29,代码来源:CoreModelModule.java
示例11: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
@Override
public void registerModule() {
String[] classes = {
"org.javarosa.core.services.locale.ResourceFileDataSource",
"org.javarosa.core.services.locale.TableLocaleSource"
};
PrototypeManager.registerPrototypes(classes);
ReferenceManager._().addReferenceFactory(new ResourceReferenceFactory());
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:10,代码来源:JavaRosaCoreModule.java
示例12: defaultPrototypes
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public static PrototypeFactory defaultPrototypes () {
return PrototypeManager.getDefault();
}
开发者ID:medic,项目名称:javarosa,代码行数:4,代码来源:ExtUtil.java
示例13: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule() {
String[] prototypes = new String[] { ReferenceDataPointer.class.getName()};
PrototypeManager.registerPrototypes(prototypes);
PropertyManager._().addRules(new FormManagerProperties());
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:6,代码来源:FormManagerModule.java
示例14: registerModule
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public void registerModule() {
String[] classes = {
"org.javarosa.media.image.model.FileDataPointer",
};
PrototypeManager.registerPrototypes(classes);
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:7,代码来源:ImageCaptureModule.java
示例15: defaultPrototypes
import org.javarosa.core.services.PrototypeManager; //导入依赖的package包/类
public static PrototypeFactory defaultPrototypes() {
return PrototypeManager.getDefault();
}
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:4,代码来源:ExtUtil.java
注:本文中的org.javarosa.core.services.PrototypeManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论