Package org.symphonyoss.s2.canon.parser
Class ModelSetParserContext
- java.lang.Object
-
- org.symphonyoss.s2.canon.parser.ModelSetParserContext
-
public class ModelSetParserContext extends Object
-
-
Constructor Summary
Constructors Constructor Description ModelSetParserContext()Create a ModelSetParserContext with the default (SLF4J) logger adaptor.ModelSetParserContext(LoggerFactory logFactory)Create a ModelSetParserContext with the given LoggerFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGenerationSource(File file)voidaddGenerationSource(URL baseUrl, Reader reader)RootParserContextaddReferencedModel(URL url)voidgenerate(GenerationContext generationContext)LoggerFactorygetLogFactory()ModelgetModel(URL url)ModelparseOneModel()voidprocess(Map<String,String> uriMap)Parse, validate and generate for all source inputs.voidvalidate(Model model)voidvisitAllModels(IModelVisitor visitor)
-
-
-
Constructor Detail
-
ModelSetParserContext
public ModelSetParserContext()
Create a ModelSetParserContext with the default (SLF4J) logger adaptor.
-
ModelSetParserContext
public ModelSetParserContext(LoggerFactory logFactory)
Create a ModelSetParserContext with the given LoggerFactory. This is provided so that the maven plugin (mojo) can receive log entries in the maven logger.- Parameters:
logFactory- ALoggerFactory to use for logging.
-
-
Method Detail
-
getLogFactory
public LoggerFactory getLogFactory()
-
addGenerationSource
public void addGenerationSource(File file) throws ParsingException
- Throws:
ParsingException
-
addGenerationSource
public void addGenerationSource(URL baseUrl, Reader reader) throws ParsingException
- Throws:
ParsingException
-
parseOneModel
public Model parseOneModel() throws ParsingException
- Throws:
ParsingException
-
process
public void process(Map<String,String> uriMap) throws ParsingException
Parse, validate and generate for all source inputs.- Parameters:
uriMap-- Throws:
ParsingException- if there is a parsing error.
-
validate
public void validate(Model model)
-
addReferencedModel
public RootParserContext addReferencedModel(URL url) throws ParsingException
- Throws:
ParsingException
-
generate
public void generate(GenerationContext generationContext) throws GenerationException
- Throws:
GenerationException
-
visitAllModels
public void visitAllModels(IModelVisitor visitor)
-
-