
org.sweble.wikitext.engine.CompiledPage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swc-engine Show documentation
Show all versions of swc-engine Show documentation
A minimal engine using the Sweble Wikitext Parser to
process articles in the context of a MediaWiki-like configuration.
/*
* This file is auto-generated.
* DO NOT MODIFY MANUALLY!
*
* Generated by AstNodeGenerator.
* Last generated: 2014-09-12 00:38:33.
*/
package org.sweble.wikitext.engine;
import de.fau.cs.osr.ptk.common.ast.*;
import java.util.List;
import org.sweble.wikitext.engine.log.CompilerLog;
import de.fau.cs.osr.ptk.common.Warning;
import de.fau.cs.osr.ptk.common.EntityMap;
/**
* CompiledPage Node
*/
public class CompiledPage
extends InnerNode.InnerNode1
{
private static final long serialVersionUID = 1L;
// =========================================================================
public CompiledPage()
{
super(new Page());
}
public CompiledPage(Page page, List warnings, CompilerLog log)
{
super(page);
setWarnings(warnings);
setLog(log);
}
public CompiledPage(Page page, List warnings, EntityMap entityMap, CompilerLog log)
{
super(page);
setWarnings(warnings);
setEntityMap(entityMap);
setLog(log);
}
// =========================================================================
// Properties
private CompilerLog log;
public final CompilerLog getLog()
{
return this.log;
}
public final CompilerLog setLog(CompilerLog log)
{
CompilerLog old = this.log;
this.log = log;
return old;
}
private List warnings;
public final List getWarnings()
{
return this.warnings;
}
public final List setWarnings(List warnings)
{
List old = this.warnings;
this.warnings = warnings;
return old;
}
private EntityMap entityMap;
public final EntityMap getEntityMap()
{
return this.entityMap;
}
public final EntityMap setEntityMap(EntityMap entityMap)
{
EntityMap old = this.entityMap;
this.entityMap = entityMap;
return old;
}
@Override
public final int getPropertyCount()
{
return 3;
}
@Override
public final AstNodePropertyIterator propertyIterator()
{
return new AstNodePropertyIterator()
{
@Override
protected int getPropertyCount()
{
return 3;
}
@Override
protected String getName(int index)
{
switch (index)
{
case 0:
return "log";
case 1:
return "warnings";
case 2:
return "entityMap";
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object getValue(int index)
{
switch (index)
{
case 0:
return CompiledPage.this.getLog();
case 1:
return CompiledPage.this.getWarnings();
case 2:
return CompiledPage.this.getEntityMap();
default:
throw new IndexOutOfBoundsException();
}
}
@Override
protected Object setValue(int index, Object value)
{
switch (index)
{
case 0:
return CompiledPage.this.setLog((CompilerLog) value);
case 1:
return CompiledPage.this.setWarnings((List) value);
case 2:
return CompiledPage.this.setEntityMap((EntityMap) value);
default:
throw new IndexOutOfBoundsException();
}
}
};
}
// =========================================================================
// Children
public final void setPage(Page page)
{
set(0, page);
}
public final Page getPage()
{
return (Page) get(0);
}
private static final String[] CHILD_NAMES = new String[] {"page"};
public final String[] getChildNames()
{
return CHILD_NAMES;
}
// =========================================================================
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy