001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }