Examples of MountPoint


Examples of edu.mit.simile.butterfly.MountPoint

            return paths;
        }
    }
   
    static protected String resolve(ButterflyModule module, String path) {
        MountPoint mountPoint = module.getMountPoint();
        if (mountPoint != null) {
            String mountPointPath = mountPoint.getMountPoint();
            if (mountPointPath != null) {
                StringBuffer sb = new StringBuffer();
               
                boolean slashed = path.startsWith("/");
                char[] mountPointChars = mountPointPath.toCharArray();
View Full Code Here

Examples of jp.javelindev.wicket.parameter.bind.MountPoint

            }

            Filer filer = processingEnv.getFiler();

            JAXBContext context = JAXBContext.newInstance(MountPoint.class);
            MountPoint mountPoint = readExistingData(filer, context);

            FileObject file = createXmlFile(filer, messager, elementList);
            setupMountPoint(mountPoint, pathList);
            writeMountPoint(context, file, mountPoint);
        } catch (JAXBException ex) {
View Full Code Here

Examples of jp.javelindev.wicket.parameter.bind.MountPoint

    private MountPoint readExistingData(Filer filer, JAXBContext context) throws IOException, JAXBException {
        FileObject file = filer.getResource(StandardLocation.CLASS_OUTPUT, "", XML_FILE_NAME);
        InputStream stream = null;

        MountPoint mountPoint = null;
        try {
            stream = new BufferedInputStream(file.openInputStream());
            Unmarshaller unmarshaller = context.createUnmarshaller();
            LOGGER.info("XML file exists.");

            Object unmarshalled = unmarshaller.unmarshal(stream);
            if (unmarshalled != null) {
                if ((unmarshalled instanceof MountPoint) == false) {
                    throw new IllegalArgumentException("Unmarshalled Object is not an instance of MountPoint.");
                }
                mountPoint = (MountPoint) unmarshalled;
            }
        } catch(FileNotFoundException ex) {
            LOGGER.info("XML file does not exists.");
            mountPoint = new MountPoint();
        } finally {
            if (stream != null) {
                try {
                    stream.close();
                } catch (IOException ex) {
                    LOGGER.error("Can not close a file.", ex);
                }
            }
        }
        if(mountPoint == null) mountPoint = new MountPoint();
        return mountPoint;
    }
View Full Code Here

Examples of jp.javelindev.wicket.parameter.bind.MountPoint

            Unmarshaller unmarshaller = context.createUnmarshaller();
            Object unmarshalled = unmarshaller.unmarshal(stream);
            if (unmarshalled == null || (unmarshalled instanceof MountPoint) == false) {
                throw new IllegalStateException("Can not unmarshall " + "/" + PathAnnotationProcessor.XML_FILE_NAME + ".");
            }
            MountPoint mountPoint = (MountPoint) unmarshalled;
            IResourceMounter resourceMounter = newResourceMounter(application);
            IPageMounter pageMounter = newPageMounter(application);
            for (MountPath path : mountPoint.getPathSet()) {
                final String mountPath = path.getMountPath();
                final Class<?> targetClass = Class.forName(path.getClassName());
                if(Resource.class.isAssignableFrom(targetClass)) {
                    //mount as SharedResource
                    resourceMounter.mount(mountPath, targetClass.asSubclass(Resource.class));
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.