org.integratedmodelling.api.metadata.IDocumentationTemplate Maven / Gradle / Ivy
The newest version!
package org.integratedmodelling.api.metadata;
import java.util.List;
import org.integratedmodelling.api.knowledge.IConcept;
/**
* One of these will be created for each documentable object. If the object
* provides a template file through the classpath, that will be used. Otherwise
* a default will be provided based on KIM annotations.
*
* @author ferdinando.villa
*
*/
public interface IDocumentationTemplate {
/**
* All these correspond to k.IM annotations that can be used either in k.IM
* on top of the object being documented or in a template file to separate
* out the various pieces of Markdown/Velocity.
*/
public static final String SECTION_TITLE = "title";
public static final String SECTION_METHODS = "methods";
public static final String SECTION_RESULTS = "title";
public static final String SECTION_DESCRIPTION = "description";
public static final String SECTION_REFERENCE = "reference";
public static final String SECTION_LINK = "link";
public static final String SECTION_ANCHOR = "anchor";
public static final String SECTION_VALUE = "value";
/**
* Get the named section template for the main object. The template will
* processed according to parameters and used to create a IReport. Markdown
* should be at level 0 - levels will be added as necessary.
*
*
* @param section
* @return an array of template text sections (array because each section may
* be seen multiple times in a template).
*/
public List getTemplate(String section);
/**
* Get the named section template for the passed object in the context of
* the main object. Markdown should be at level 0 - levels will be added as
* necessary.
*
* @param section
* @param concept
* @return an array of template text sections (array because each section may
* be seen multiple times in a template).
*/
public List getTemplate(String section, IConcept concept);
}