Package org.exolab.castor.mapping

Examples of org.exolab.castor.mapping.Mapping


    }
    return instance;
  }
 
  public NamedQuery() throws Exception {
    Mapping mapping = new Mapping();
    InputSource input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/query/NamedQueriesMapping.xml"));
    mapping.loadMapping(input);
   
    XMLContext context = new XMLContext();
    context.addMapping(mapping);
   
    InputStream stream = getClass().getResourceAsStream("/com/jada/xml/query/Query.xml");
View Full Code Here


    postUsername = paymentExpress.getPostUsername();
    postPassword = paymentExpress.getPostPassword();
    environment = paymentExpress.getEnvironment();
   
    Mapping mapping = new Mapping();
    InputSource input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/paymentexpress/TxnRequestMapping.xml"));
    mapping.loadMapping(input);
    xmlContext = new XMLContext();
    xmlContext.addMapping(mapping);
   
    input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/paymentexpress/TxnResultMapping.xml"));
    mapping.loadMapping(input);
    xmlContext = new XMLContext();
    xmlContext.addMapping(mapping);   
  }
View Full Code Here

    }
    return instance;
  }
 
  public PersistenceLoader() throws Exception {
    Mapping mapping = new Mapping();
    InputSource input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/persistence/PersistenceMapping.xml"));
    mapping.loadMapping(input);
   
    XMLContext context = new XMLContext();
    context.addMapping(mapping);
   
    InputStream stream = getClass().getResourceAsStream("/META-INF/persistence.xml");
View Full Code Here

    bpostalcode = siteDomainParamBean.getBusinessPostalCode();
    phone = siteDomainParamBean.getBusinessPhone();
    fax = siteDomainParamBean.getBusinessFax();
    email = siteDomainParamBean.getBusinessEmail();
   
    Mapping mapping = new Mapping();
   
    InputSource input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/psigate/OrderMapping.xml"));
    mapping.loadMapping(input);
    xmlContext = new XMLContext();
    xmlContext.addMapping(mapping);
   
    input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/psigate/ResultMapping.xml"));
    mapping.loadMapping(input);
    xmlContext = new XMLContext();
    xmlContext.addMapping(mapping);   
  }
View Full Code Here

public class ItemSimpleXmlTransformation extends ItemSimpleTransformationBase implements ItemSimpleTransformation {
  XMLContext xmlContext = null;
 
  public ItemSimpleXmlTransformation() throws MappingException {
    Mapping mapping = new Mapping();
    InputSource input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/ie/ItemSimpleMapping.xml"));
    mapping.loadMapping(input);
   
    xmlContext = new XMLContext();
    xmlContext.addMapping(mapping);   
  }
View Full Code Here

      Url urls[] = new Url[urlSet.size()];
      urlSet.copyInto(urls);
      UrlSet urlSet = new UrlSet();
      urlSet.setUrl(urls);
     
    Mapping mapping = new Mapping();
    InputSource input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/sitemap/UrlSetMapping.xml"));
    mapping.loadMapping(input);
   
    XMLContext context = new XMLContext();
    context.addMapping(mapping);
   
    StringWriter writer = new StringWriter();
View Full Code Here

    }
    return instance;
  }
 
  public DatabaseUpgradeQuery() throws Exception {
    Mapping mapping = new Mapping();
    InputSource input = new InputSource(getClass().getResourceAsStream("/com/jada/xml/databaseUpgrade/DatabaseUpgradeQueriesMapping.xml"));
    mapping.loadMapping(input);
   
    XMLContext context = new XMLContext();
    context.addMapping(mapping);
   
    InputStream stream = getClass().getResourceAsStream("/com/jada/xml/databaseUpgrade/DatabaseUpgradeQuery.xml");
View Full Code Here

        SourceResolver resolver = null;

        try {
            resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
            Mapping mappingPortletXml = new Mapping();
            Mapping mappingWebXml = new Mapping();
            Source source = null;
            try {
                source = resolver.resolveURI(PORTLET_MAPPING);

                mappingPortletXml.loadMapping(SourceUtil.getInputSource(source));
            } finally {
                resolver.release(source);
            }
            try {
                source = resolver.resolveURI(WEBXML_MAPPING);

                mappingWebXml.loadMapping(SourceUtil.getInputSource(source));
            } finally {
                resolver.release(source);
            }

            String baseWMDir = servletContext.getRealPath("");
View Full Code Here

        Source source = null;
        try {
      Entry entry;
      String name;
      String mappingSource;
      Mapping mapping;
      Iterator iterator = this.mappingSources.entrySet().iterator();
          while (iterator.hasNext()) {
            entry = (Map.Entry)iterator.next();
            name = (String)entry.getKey();
            mappingSource = (String)entry.getValue();
           
        source = resolver.resolveURI(mappingSource);
        mapping = new Mapping();
        mapping.loadMapping(SourceUtil.getInputSource(source));
        this.mappings.put(name, mapping);
          }
        } finally {
            if (source != null) {
                resolver.release(source);
View Full Code Here

     * @throws Exception
     */
    public void testXMLContextByMapping() throws Exception {
       
        XMLContext xmlContext = new XMLContext();
        Mapping mapping = xmlContext.createMapping();
        mapping.loadMapping(new InputSource(getResource(MAPPING_FILE)));
       
        xmlContext.addMapping(mapping);
       
        Unmarshaller unmarshaller = xmlContext.createUnmarshaller();
        assertNotNull(unmarshaller);
View Full Code Here

TOP

Related Classes of org.exolab.castor.mapping.Mapping

Copyright © 2018 www.massapicom. 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.