Package org.exolab.castor.mapping

Examples of org.exolab.castor.mapping.Mapping$IncludeListener


        URL url = getClass().getResource(WEB_XML_MAPPING);
        if(url == null)
            throw new NullPointerException(
                    "Configuration Error.  Resource: "+WEB_XML_MAPPING+" not found."
            );
        Mapping mapping = new Mapping();
        mapping.loadMapping(url);
        return mapping;
    }
View Full Code Here


    {
       final String METHOD_NAME = "init()";

        String _mapping = PlutoAdminContext.getInstance().getPlutoHome() + "/" + DEFAULT_MAPPING;

        this.mapping = new Mapping();
        try
        {
            this.mapping.loadMapping(_mapping);
        }
        catch (Exception e)
View Full Code Here

        if (webModule.endsWith(".war"))
            webModule = webModule.substring(0, webModule.lastIndexOf("."));

        System.out.println("prepare web archive '" + webModule + "' ...");

        Mapping mappingPortletXml = null;
        Mapping mappingWebXml = null;

        // get portlet xml mapping file
        String _portlet_mapping =
            webAppsDir + portalImplWebDir + "WEB-INF" + dirDelim + "data" + dirDelim + "xml" +dirDelim + "portletdefinitionmapping.xml";
        mappingPortletXml = new Mapping();
        try {
            mappingPortletXml.loadMapping(_portlet_mapping);
        } catch (Exception e) {
            System.out.println("CASTOR-Exception: " + e);
            throw new IOException(
                "Failed to load mapping file " + _portlet_mapping);
        }

        File portletXml =
            new File(webAppsDir + webModule + webInfDir + "portlet.xml");

        // get web xml mapping file
        String _web_mapping =
            webAppsDir
                + portalImplWebDir
                + "WEB-INF" + dirDelim + "data" + dirDelim + "xml" + dirDelim + "servletdefinitionmapping.xml";
        mappingWebXml = new Mapping();
        try {
            mappingWebXml.loadMapping(_web_mapping);
        } catch (Exception e) {
            throw new IOException(
                "Failed to load mapping file " + _web_mapping);
        }
View Full Code Here

    if(bean == null){
      getLogger().debug ("no bean found");
      return;
    }
    try{
      Mapping mapping;
      if(mappingpath != null){
        mapping=mappingLoader(mappingpath);
      }
      else{
         mapping=mappingLoader(defaultmapping);
View Full Code Here

      if(mappingCache.containsKey(path)){
          return (Mapping)mappingCache.get(path);
      }
    }
    // mapping not found in cache or the cache is new
    Mapping mapping = new Mapping();
    mapping.loadMapping(getFile(resolver,path));
    mappingCache.put(path,mapping);
    return mapping;

  }
View Full Code Here

      try {
        String clazzName = clazzConf.getValue();
        String mappingURI = clazzConf.getAttribute("mapping");

        if (mappingURI != null) {
          mapping = new Mapping();
          // resolve
          //mapping.loadMapping(getFile(resolver,mappingURI));
          getLogger().debug("bean class = [" + String.valueOf(clazzName) + "] mapping [" + String.valueOf(mappingURI) + "]");
        }
        else {
View Full Code Here

        if(url == null) {
            throw new NullPointerException(
                    "Configuration Error.  Resource: "+PORTLET_XML_MAPPING+" not found."
            );
        }
        Mapping mapping = new Mapping();
        mapping.loadMapping(url);
        return mapping;
    }
View Full Code Here

     * @throws IOException
     */
    protected Object readInternal(InputStream is) throws IOException {
        Object object = null;
        try {
            Mapping mapping = getCastorMapping();
            Unmarshaller unmarshaller = new Unmarshaller(mapping);
            unmarshaller.setEntityResolver(new EntityResolverImpl());
            unmarshaller.setIgnoreExtraElements(getIgnoreExtraElements());
            if(is!=null) {
                InputStreamReader in = new InputStreamReader(is);
View Full Code Here

        URL url = getClass().getResource(WEB_XML_MAPPING);
        if(url == null)
            throw new NullPointerException(
                    "Configuration Error.  Resource: "+WEB_XML_MAPPING+" not found."
            );
        Mapping mapping = new Mapping();
        mapping.loadMapping(url);
        return mapping;
    }
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

TOP

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

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.