Package com.mucommander.bookmark

Examples of com.mucommander.bookmark.Bookmark


        }

        // If the URL contains a host, look it up in the bookmark list and use that
        // as the root of the returned path.
        else {
            Bookmark bookmark;
            // If the bookmark doesn't exist, but a path is specified, throws an exception.
            // Otherwise, returns the requested bookmark.
            if((bookmark = BookmarkManager.getBookmark(url.getHost())) == null) {
                if(!url.getPath().equals("/"))
                    throw new IOException();
                return new BookmarkFile(new Bookmark(url.getHost(), url.getPath()));
            }

            // If the bookmark exists, and a path is specified, creates a new path
            // from the bookmark's location and the specified path.
            if(!url.getPath().equals("/"))
                return FileFactory.getFile(bookmark.getLocation() + url.getPath());

            // Otherwise, creates a new bookmark file.
            return new BookmarkFile(bookmark);
        }
    }
View Full Code Here

TOP

Related Classes of com.mucommander.bookmark.Bookmark

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.