001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.parsers.creole.ast.link;
016    
017    import com.liferay.portal.parsers.creole.ast.CollectionNode;
018    import com.liferay.portal.parsers.creole.ast.URLNode;
019    import com.liferay.portal.parsers.creole.visitor.ASTVisitor;
020    
021    /**
022     * @author Miguel Pastor
023     */
024    public class LinkNode extends URLNode {
025    
026            public LinkNode() {
027            }
028    
029            public LinkNode(int token) {
030                    super(token);
031            }
032    
033            public LinkNode(int token, String link) {
034                    super(token, link);
035            }
036    
037            public LinkNode(String link) {
038                    super(link);
039            }
040    
041            @Override
042            public void accept(ASTVisitor astVisitor) {
043                    astVisitor.visit(this);
044            }
045    
046            public CollectionNode getAltCollectionNode() {
047                    return _altCollectionNode;
048            }
049    
050            public boolean hasAltCollectionNode() {
051                    if (_altCollectionNode != null) {
052                            return true;
053                    }
054                    else {
055                            return false;
056                    }
057            }
058    
059            public void setAltCollectionNode(CollectionNode altCollectionNode) {
060                    _altCollectionNode = altCollectionNode;
061            }
062    
063            private CollectionNode _altCollectionNode;
064    
065    }