public abstract class Gramar extends Object implements IGramar
Modifier and Type | Field and Description |
---|---|
protected String |
gramarId |
protected String |
label |
protected String |
mainproduction |
static String |
META_FILE_NAME |
protected String |
provider |
protected ArrayList<ISampleModel> |
sampleModels |
protected ArrayList<TagLibSpec> |
taglibs |
Constructor and Description |
---|
Gramar() |
Modifier and Type | Method and Description |
---|---|
void |
free()
Free any cached resources
|
String |
getId() |
String |
getLabel() |
String |
getMainProductionId()
Answers the current relative path into the gramar of the gramar's primary production
|
Properties |
getProperties() |
String |
getProvider() |
IModel |
getSampleModel(String name) |
List<ISampleModel> |
getSamples() |
ArrayList<TagLibSpec> |
getTaglibs() |
ITemplate |
getTemplate(String id,
IGramarContext context) |
InputStream |
getTemplateBinary(String id) |
String |
getTemplateSource(String id) |
void |
loadMeta() |
abstract InputStream |
readTemplateBinary(String id) |
abstract String |
readTemplateSource(String id) |
Double |
scoreApplicability(IModel proposedModel)
Estimates the applicability of the receiving gramar to the specified
proposed model.
|
void |
setPrimaryProductionId(String newId)
Sets the relative path of the gramar production that will be processed when the gramar
is applied to the model.
|
void |
storeSource(String name,
String content) |
protected String gramarId
protected String label
protected String provider
protected String mainproduction
protected ArrayList<TagLibSpec> taglibs
protected ArrayList<ISampleModel> sampleModels
public static final String META_FILE_NAME
public Gramar() throws InvalidGramarException
InvalidGramarException
public void free()
IGramar
public String getProvider()
getProvider
in interface IGramar
public String getMainProductionId()
IGramar
getMainProductionId
in interface IGramar
public void setPrimaryProductionId(String newId)
IGramar
setPrimaryProductionId
in interface IGramar
public Properties getProperties()
public ITemplate getTemplate(String id, IGramarContext context) throws GramarException
getTemplate
in interface IGramar
GramarException
public String getTemplateSource(String id) throws NoSuchResourceException
getTemplateSource
in interface IGramar
NoSuchResourceException
public InputStream getTemplateBinary(String id) throws NoSuchResourceException
getTemplateBinary
in interface IGramar
NoSuchResourceException
public abstract String readTemplateSource(String id) throws NoSuchResourceException
NoSuchResourceException
public abstract InputStream readTemplateBinary(String id) throws NoSuchResourceException
NoSuchResourceException
public void loadMeta() throws InvalidGramarException
InvalidGramarException
public ArrayList<TagLibSpec> getTaglibs()
public List<ISampleModel> getSamples()
getSamples
in interface IGramar
public IModel getSampleModel(String name)
getSampleModel
in interface IGramar
public Double scoreApplicability(IModel proposedModel)
IGramar
scoreApplicability
in interface IGramar
Copyright © 2015. All rights reserved.