Codota Logo
FormatElement
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain FormatElement
private void myMethod () {
FormatElement f =
  • Codota Iconnew FormatElement()
  • Codota IconMap map;Object key;(FormatElement) map.get(key)
  • Smart code suggestions by Codota
}
origin: apache/axis2-java

/**
 * Add format definition for type with built-in JiBX handling to map.
 *
 * @param stype schema type name
 * @param jtype java type name
 * @param sname serializer method name
 * @param dname deserializer method name
 * @param dflt  default value
 * @param map   schema type qname to format definition map
 */
private static void buildFormat(String stype, String jtype, String sname,
                String dname, String dflt, Map map) {
  FormatElement format = new FormatElement();
  format.setTypeName(jtype);
  format.setSerializerName(sname);
  format.setDeserializerName(dname);
  format.setDefaultText(dflt);
  map.put(new QName(SCHEMA_NAMESPACE, stype), format);
}
origin: org.apache.axis2/axis2-jibx

    typename + " (used by element " + itemname + ')');
javatype = format.getTypeName();
param.setAttribute("form", "simple");
param.setAttribute("serializer", format.getSerializerName());
param.setAttribute("deserializer", format.getDeserializerName());
  String dflt = element.getDefaultValue();
  if (dflt == null) {
    dflt = format.getDefaultText();
    if (javatype.equals("float")) {
      dflt = dflt + 'F';
origin: org.jibx/jibx-tools

if (child instanceof FormatElement) {
  FormatElement format = (FormatElement)child;
  keep = format.getDefaultText() != null || format.getDeserializerName() != null ||
    format.getEnumValueName() != null || format.getSerializerName() != null;
origin: org.jibx/jibx-tools

/**
 * Recursively add all inner enumeration classes as formats to a <mapping> definition. This is used to create the
 * <format> elements for all nested enumerations, which need to be direct children of the <mapping> element
 * for the top-level class.
 * 
 * @param mapping Mapping
 */
private void addInnerFormats(MappingElementBase mapping) {
  for (int i = 0; i < m_inners.size(); i++) {
    ClassHolder inner = (ClassHolder)m_inners.get(i);
    if (inner.isSimpleValue()) {
      FormatElement format = new FormatElement();
      format.setTypeName(inner.getBindingName());
      ((EnumerationClassHolder)inner).setBinding(format);
      mapping.addTopChild(format);
    } else {
      ((StructureClassHolder)inner).addInnerFormats(mapping);
    }
  }
}

origin: org.jibx/jibx-tools

String name = format.getTypeName();
if (name != null) {
  TypeData data = buildClassData(name, true);
  typemap.put(format.getQName(), data);
origin: org.jibx/jibx-tools

FormatElement format = new FormatElement();
format.setTypeName(clas.getBindingName());
format.setQName(definition.getQName());
((EnumerationClassHolder)clas).setBinding(format);
m_bindingDirectory.addFormat(format);
origin: org.jibx/jibx-tools

boolean passctx = false;
if (format != null) {
  valsername = format.getSerializerName();
  valdesername = format.getDeserializerName();
  if (valsername == null && !"java.lang.String".equals(type)) {
    valuename = "toString";
origin: org.apache.axis2/axis2-jibx

registerElement(format.getQName(), format, simpleTypeMap);
bindingMap.put(format, binding);
origin: org.jibx/jibx-tools

} else {
  if (jclas == null) {
    jclas = def.getTypeName();
origin: org.jibx/jibx-tools

valueof.addParameter("text", "java.lang.String");
body = valueof.createBlock();
m_bindingFormat.setDeserializerName(getBindingName() + ".fromValue");
origin: apache/axis2-java

    typename + " (used by element " + itemname + ')');
javatype = format.getTypeName();
param.setAttribute("form", "simple");
param.setAttribute("serializer", format.getSerializerName());
param.setAttribute("deserializer", format.getDeserializerName());
  String dflt = element.getDefaultValue();
  if (dflt == null) {
    dflt = format.getDefaultText();
    if (javatype.equals("float")) {
      dflt = dflt + 'F';
origin: org.jibx/jibx-tools

text = child.getName();
if (group.isEnumeration()) {
  FormatElement format = new FormatElement();
  format.setTypeName(child.getBindingName());
  ((EnumerationClassHolder)child).setBinding(format);
  bindhold.addFormat(format);
origin: apache/axis2-java

registerElement(format.getQName(), format, simpleTypeMap);
bindingMap.put(format, binding);
origin: org.apache.axis2/axis2-jibx

/**
 * Add format definition for type with built-in JiBX handling to map.
 *
 * @param stype schema type name
 * @param jtype java type name
 * @param sname serializer method name
 * @param dname deserializer method name
 * @param dflt  default value
 * @param map   schema type qname to format definition map
 */
private static void buildFormat(String stype, String jtype, String sname,
                String dname, String dflt, Map map) {
  FormatElement format = new FormatElement();
  format.setTypeName(jtype);
  format.setSerializerName(sname);
  format.setDeserializerName(dname);
  format.setDefaultText(dflt);
  map.put(new QName(SCHEMA_NAMESPACE, stype), format);
}
origin: org.jibx/jibx-tools

/**
 * Generate any required format definitions. Format definitions are used for all classes defining serializer or
 * deserializer methods.
 */
private void generateFormats() {
  
  // add any required format definitions
  for (Iterator iter = m_formatSet.iterator(); iter.hasNext();) {
    String type = (String)iter.next();
    ClassCustom clas = m_global.getClassCustomization(type);
    if (clas.getSerializer() != null || clas.getDeserializer() != null) {
      FormatElement format = new FormatElement();
      format.setDeserializerName(clas.getDeserializer());
      format.setSerializerName(clas.getSerializer());
      format.setTypeName(type);
      m_directory.addFormat(format);
    }
  }
}

org.jibx.binding.modelFormatElement

Most used methods

  • <init>
  • getDefaultText
  • getDeserializerName
  • getQName
  • getSerializerName
  • getTypeName
  • setDeserializerName
  • setSerializerName
  • setTypeName
  • setDefaultText
  • getEnumValueName
  • setEnumValueName
  • getEnumValueName,
  • setEnumValueName,
  • setQName

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now