Examples of JibxMapping


Examples of net.sf.wsdl2jibx.mapping.bean.JibxMapping

import net.sf.wsdl2jibx.mapping.bean.JibxMapping;

public class JibxMappingComparator implements Comparator {
 
  public int compare(Object o1, Object o2) {
    JibxMapping mapping1 = (JibxMapping)o1;
    JibxMapping mapping2 = (JibxMapping)o2;
    String type1 = mapping1.getTypeName();
    String type2 = mapping2.getTypeName();
    if(type1==null) type1 = "";
    if(type2==null) type2 = "";
   
    return type1.compareTo(type2);
  }
View Full Code Here

Examples of net.sf.wsdl2jibx.mapping.bean.JibxMapping

   * @param clazz
   * @param typeName
   * @param _abstract
   */
  public void addMapping(String name, String clazz, String typeName, boolean _abstract) {
    currentMapping = new JibxMapping();
    binding.addMapping(currentMapping);
    currentMapping.setName(name);
    currentMapping.setClazz(clazz);
    currentMapping.setTypeName(typeName);
    currentMapping.setAbstract(Boolean.toString(_abstract));
View Full Code Here

Examples of net.sf.wsdl2jibx.mapping.bean.JibxMapping

   *
   */
  public void fixUnreferencedMappings() {
    List mappings = binding.getMappings();
    for(Iterator it=mappings.iterator();it.hasNext();) {
      JibxMapping mapping = (JibxMapping)it.next();

      if(mapping.getTypeName()!=null && !referencedTypeList.contains(mapping.getTypeName())) {
        log.debug(mapping.getTypeName()+" not referenced, abstract removed");
        String name = mapping.getTypeName();
        int lastDot = name.lastIndexOf(":");
        if(lastDot!=-1) name = name.substring(lastDot+1);
        //        name = name.substring(0,1).toLowerCase()+name.substring(1);
        mapping.setTypeName(null);
        mapping.setName(name);
        mapping.setAbstract(null);
      }
    }
  }
View Full Code Here

Examples of net.sf.wsdl2jibx.mapping.bean.JibxMapping

    List unrefMappings = new ArrayList();

    Collections.sort(mappings);

    for(Iterator it=mappings.iterator();it.hasNext();) {
      JibxMapping mapping = (JibxMapping)it.next();

      if(mapping.getTypeName()!=null && !referencedTypeList.contains(mapping.getTypeName()))
        unrefMappings.add(mapping);
    }

    for(Iterator it=unrefMappings.iterator();it.hasNext();) {
      JibxMapping mapping = (JibxMapping)it.next();
      mappings.remove(mapping);
      mappings.add(mapping);
    }
  }
View Full Code Here

Examples of net.sf.wsdl2jibx.mapping.bean.JibxMapping

   * @param mapping
   * @param ns
   * @return
   */
  public boolean isNamespaceDeclared(String ns) {
    JibxMapping mapping = currentMapping;
    if(mapping.getNamespaces()==null) return false;
    for(int i=0;i<mapping.getNamespaces().size();i++) {
      JibxNamespace namespace = (JibxNamespace)mapping.getNamespaces().get(i);
      if(namespace.getUri().equals(ns))
        return true;
    }
    return false;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.