All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sweble.wikitext.lazy.parser.ImageLink Maven / Gradle / Ivy

There is a newer version: 3.1.9
Show newest version
/* 
 * This file is auto-generated.
 * DO NOT MODIFY MANUALLY!
 * 
 * Generated by AstNodeGenerator.
 * Last generated: 2014-09-12 00:37:37.
 */

package org.sweble.wikitext.lazy.parser;

import de.fau.cs.osr.ptk.common.ast.*;




/**
 * 

Image Link

*/ public class ImageLink extends InnerNode.InnerNode2 { private static final long serialVersionUID = 1L; // ========================================================================= public ImageLink() { super(new NodeList(), new LinkTitle()); } public ImageLink(String target, NodeList options, LinkTitle title, ImageViewFormat format, boolean border, ImageHorizAlign hAlign, ImageVertAlign vAlign, int width, int height, boolean upright, String linkPage, Url linkUrl, LinkOptionAltText alt) { super(options, title); setTarget(target); setFormat(format); setBorder(border); setHAlign(hAlign); setVAlign(vAlign); setWidth(width); setHeight(height); setUpright(upright); setLinkPage(linkPage); setLinkUrl(linkUrl); setAlt(alt); } @Override public int getNodeType() { return org.sweble.wikitext.lazy.AstNodeTypes.NT_IMAGE_LINK; } // ========================================================================= // Properties private String target; public final String getTarget() { return this.target; } public final String setTarget(String target) { String old = this.target; this.target = target; return old; } private int width; public final int getWidth() { return this.width; } public final int setWidth(int width) { int old = this.width; this.width = width; return old; } private int height; public final int getHeight() { return this.height; } public final int setHeight(int height) { int old = this.height; this.height = height; return old; } private boolean upright; public final boolean getUpright() { return this.upright; } public final boolean setUpright(boolean upright) { boolean old = this.upright; this.upright = upright; return old; } private ImageHorizAlign hAlign; public final ImageHorizAlign getHAlign() { return this.hAlign; } public final ImageHorizAlign setHAlign(ImageHorizAlign hAlign) { ImageHorizAlign old = this.hAlign; this.hAlign = hAlign; return old; } private ImageVertAlign vAlign; public final ImageVertAlign getVAlign() { return this.vAlign; } public final ImageVertAlign setVAlign(ImageVertAlign vAlign) { ImageVertAlign old = this.vAlign; this.vAlign = vAlign; return old; } private ImageViewFormat format; public final ImageViewFormat getFormat() { return this.format; } public final ImageViewFormat setFormat(ImageViewFormat format) { ImageViewFormat old = this.format; this.format = format; return old; } private boolean border; public final boolean getBorder() { return this.border; } public final boolean setBorder(boolean border) { boolean old = this.border; this.border = border; return old; } private String linkPage; public final String getLinkPage() { return this.linkPage; } public final String setLinkPage(String linkPage) { String old = this.linkPage; this.linkPage = linkPage; return old; } private Url linkUrl; public final Url getLinkUrl() { return this.linkUrl; } public final Url setLinkUrl(Url linkUrl) { Url old = this.linkUrl; this.linkUrl = linkUrl; return old; } private LinkOptionAltText alt; public final LinkOptionAltText getAlt() { return this.alt; } public final LinkOptionAltText setAlt(LinkOptionAltText alt) { LinkOptionAltText old = this.alt; this.alt = alt; return old; } @Override public final int getPropertyCount() { return 11; } @Override public final AstNodePropertyIterator propertyIterator() { return new AstNodePropertyIterator() { @Override protected int getPropertyCount() { return 11; } @Override protected String getName(int index) { switch (index) { case 0: return "target"; case 1: return "width"; case 2: return "height"; case 3: return "upright"; case 4: return "hAlign"; case 5: return "vAlign"; case 6: return "format"; case 7: return "border"; case 8: return "linkPage"; case 9: return "linkUrl"; case 10: return "alt"; default: throw new IndexOutOfBoundsException(); } } @Override protected Object getValue(int index) { switch (index) { case 0: return ImageLink.this.getTarget(); case 1: return ImageLink.this.getWidth(); case 2: return ImageLink.this.getHeight(); case 3: return ImageLink.this.getUpright(); case 4: return ImageLink.this.getHAlign(); case 5: return ImageLink.this.getVAlign(); case 6: return ImageLink.this.getFormat(); case 7: return ImageLink.this.getBorder(); case 8: return ImageLink.this.getLinkPage(); case 9: return ImageLink.this.getLinkUrl(); case 10: return ImageLink.this.getAlt(); default: throw new IndexOutOfBoundsException(); } } @Override protected Object setValue(int index, Object value) { switch (index) { case 0: return ImageLink.this.setTarget((String) value); case 1: return ImageLink.this.setWidth((Integer) value); case 2: return ImageLink.this.setHeight((Integer) value); case 3: return ImageLink.this.setUpright((Boolean) value); case 4: return ImageLink.this.setHAlign((ImageHorizAlign) value); case 5: return ImageLink.this.setVAlign((ImageVertAlign) value); case 6: return ImageLink.this.setFormat((ImageViewFormat) value); case 7: return ImageLink.this.setBorder((Boolean) value); case 8: return ImageLink.this.setLinkPage((String) value); case 9: return ImageLink.this.setLinkUrl((Url) value); case 10: return ImageLink.this.setAlt((LinkOptionAltText) value); default: throw new IndexOutOfBoundsException(); } } }; } // ========================================================================= // Children public final void setOptions(NodeList options) { set(0, options); } public final NodeList getOptions() { return (NodeList) get(0); } public final void setTitle(LinkTitle title) { set(1, title); } public final LinkTitle getTitle() { return (LinkTitle) get(1); } private static final String[] CHILD_NAMES = new String[] {"options", "title"}; public final String[] getChildNames() { return CHILD_NAMES; } // ========================================================================= }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy