Package org.apache.marmotta.platform.core.exception

Examples of org.apache.marmotta.platform.core.exception.TemplatingException


        this.context = context;
        try {
            //try-run to check it from the very beginning
            templatingService.getTemplate(TemplatingService.ADMIN_TPL);
        } catch (Exception e) {
            throw new TemplatingException("Severe Error: admin template cannot be found: " + e.getMessage());
        }
    }
View Full Code Here


            Matcher m = PATTERN.matcher(s);
            while (m.find()) {
                datamodel.put(m.group(1),m.group(2));
            }
        } catch (Exception e) {
            throw new TemplatingException(e.getMessage());
        }

        //make magic happen
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            templatingService.process(TemplatingService.ADMIN_TPL, datamodel, new OutputStreamWriter(bos));
            bytes = bos.toByteArray();
            bos.flush();
            bos.close();
        } catch (Exception e) {
            throw new TemplatingException(e.getMessage());
        }
        return bytes;
    }
View Full Code Here

            Matcher m = PATTERN.matcher(s);
            while (m.find()) {
                datamodel.put(m.group(1),m.group(2));
            }
        } catch (Exception e) {
            throw new TemplatingException(e.getMessage());
        }

        //make magic happen
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            templatingService.process(TemplatingService.ADMIN_TPL, datamodel, new OutputStreamWriter(bos));
            bytes = bos.toByteArray();
            bos.flush();
            bos.close();
        } catch (Exception e) {
            throw new TemplatingException(e.getMessage());
        }
        return bytes;
    }
View Full Code Here

        this.context = context;
        try {
           //try-run to check it from the very beginning
            templatingService.getTemplate(TEMPLATE_STRING);
        } catch (Exception e) {
            throw new TemplatingException("Severe Error: admin template cannot be found: " + e.getMessage());
        }
    }
View Full Code Here

            Matcher m = PATTERN.matcher(s);
            while (m.find()) {
                datamodel.put(m.group(1),m.group(2));
            }
        } catch (Exception e) {
            throw new TemplatingException(e.getMessage());
        }

        //make magic happen
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
          templatingService.process(TEMPLATE_STRING, datamodel, new OutputStreamWriter(bos));
            bytes = bos.toByteArray();
            bos.flush();
            bos.close();
        } catch (Exception e) {
            throw new TemplatingException(e.getMessage());
        }
        return bytes;
    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.platform.core.exception.TemplatingException

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.