• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PrototypeManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Resource类代码示例发布时间:2022-05-23
下一篇:
Java SnapshotOffer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap