Tabnine Logo
CollectionElement
Code IndexAdd Tabnine to your IDE (free)

How to use
CollectionElement
in
org.jibx.binding.model

Best Java code snippets using org.jibx.binding.model.CollectionElement (Showing top 8 results out of 315)

origin: org.jibx/jibx-tools

CollectionElement coll = new CollectionElement();
if (memb.getFieldName() == null) {
  coll.setGetName(gmeth);
  coll.setSetName(memb.getSetName());
} else {
  coll.setFieldName(memb.getFieldName());
  coll.setName(name);
  hold.addNamespaceUsage(hold.getNamespace());
  coll.setUsageName("optional");
  if (siblings.size() > 0 && coll.children().size() == 0 && coll.getName() == null) {
    ElementBase sibling = (ElementBase)siblings.get(siblings.size()-1);
    if (sibling.type() == ElementBase.COLLECTION_ELEMENT) {
      CollectionElement lastcoll = (CollectionElement)sibling;
      if (lastcoll.children().size() == 0 && lastcoll.getName() == null &&
        Utility.safeEquals(lastcoll.getItemTypeName(), coll.getItemTypeName())) {
        throw new IllegalStateException("Need to use wrapper element for collection member '" +
          memb.getBaseName() + "' of class " + cust.getName());
origin: org.jibx/jibx-tools

/**
 * Create a new <b>collection</b> element for the binding. This initializes the create and declared types of the
 * collection as appropriate, along with the wrapper name and optional status.
 * 
 * @param wrapname name to be used for wrapper collection or structure, <code>null</code> if none
 * @param wrapopt wrapper element optional flag (should be <code>false</code> if wrapname is <code>null</code>)
 * @param holder binding definition tracking information
 * @param node data node associated with collection
 * @return collection element
 */
private CollectionElement newCollection(QName wrapname, boolean wrapopt, BindingHolder holder, DataNode node) {
  CollectionElement collect = new CollectionElement();
  int reptype = getSchemaCustom().getRepeatType();
  boolean list = reptype == SchemaRootBase.REPEAT_LIST || reptype == SchemaRootBase.REPEAT_TYPED;
  if (list) {
    collect.setCreateType(m_listImplClass);
  }
  if (wrapname == null) {
    if (node.isOptional()) {
      collect.setUsage(PropertyAttributes.OPTIONAL_USAGE);
    }
  } else {
    setName(wrapname, holder, collect);
    if (wrapopt) {
      collect.setUsage(PropertyAttributes.OPTIONAL_USAGE);
    }
  }
  return collect;
}
origin: org.jibx/jibx-tools

  (StructureElementBase)new CollectionElement() : (StructureElementBase)new StructureElement();
String mapper;
switch (anytype) {
    collect.setGetName(gname);
    collect.setSetName(sname);
    if (parent.isSelectorNeeded()) {
      collect.setUsage(PropertyAttributes.OPTIONAL_USAGE);
      collect.setTestName("if" + leaf.getSelectPropName());
      collect.setCreateType(m_listImplClass);
      if (gname == null) {
        collect.setDeclaredType(COLLECTION_VARIABLE_TYPE);
          collect.setItemTypeName(defclas.getBindingName());
            setName(leaf.getQName(), holder, struct);
          collect.addChild(struct);
        collect.addChild(struct);
      collect.addChild(value);
origin: org.jibx/jibx-tools

} else if (comp instanceof CollectionElement) {
  CollectionElement coll = (CollectionElement)comp;
  if (coll.children().size() > 0) {
    if (coll.isOrdered()) {
    String itype = coll.getItemTypeName();
    TemplateElementBase ref = coll.getDefinitions().getSpecificTemplate(itype);
    if (ref instanceof MappingElement) {
origin: org.jibx/jibx-tools

  struct.setCreateType(custom.getCreateType());
  struct.setFactoryName(custom.getFactoryMethod());
  coll.addChild(struct);
  coll.setItemTypeName(itype);
coll.setItemTypeName(itype);
value.setName(iname);
value.setDeclaredType(itype);
coll.addChild(value);
if (custom != null) {
  value.setDefaultText(custom.getEnumValueMethod());
hold.addNamespaceUsage(hold.getNamespace());
fillStructure(custom, null, null, struct, hold);
coll.addChild(struct);
origin: org.jibx/jibx-tools

IClass itype = collect.getItemTypeClass();
if (isEnumeration(itype)) {
  TemplateElementBase ref = collect.getDefinitions().getSpecificTemplate(type);
  if (ref instanceof MappingElement) {
    MappingElement mapref = (MappingElement)ref;
origin: org.jibx/jibx-tools

String itype = coll.getItemTypeName();
TemplateElementBase ref = coll.getDefinitions().getSpecificTemplate(itype);
if (ref instanceof MappingElement) {
origin: org.jibx/jibx-tools

CollectionElement coll = new CollectionElement();
m_bindingGenerator.defineCollection(itype, value.getItemName(), coll, bind);
mapping.addChild(coll);
org.jibx.binding.modelCollectionElement

Most used methods

  • <init>
  • addChild
  • children
  • getDefinitions
  • getItemTypeClass
  • getItemTypeName
  • getName
  • isOrdered
  • setCreateType
  • setDeclaredType
  • setFieldName
  • setGetName
  • setFieldName,
  • setGetName,
  • setItemTypeName,
  • setName,
  • setSetName,
  • setTestName,
  • setUsage,
  • setUsageName

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JTable (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now