Package net.aifusion.metamodel
Class MOFParser
java.lang.Object
net.aifusion.metamodel.MOFParser
- All Implemented Interfaces:
- Parser
Recursive descent parser implementing CIM Version 3 Metamodel as described in DSP0004 and DSP0221
- Author:
- Sharad Singhal
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a MOF Parser with a default in-memory repositoryMOFParser(Repository repository) Create a MOF Parser with the given repositoryMOFParser(Repository repository, Repository definitions) Create a MOF parser with a definition repository
- 
Method SummaryModifier and TypeMethodDescriptionGet the repository being used by the parserstatic voidParse one or more files into a repositoryvoidparse(BufferedReader in, NameSpacePath path) Parse model constructs from a buffered readervoidparse(InputStream in, NameSpacePath path) Parse the specification given in an inputstream into the parser repositoryvoidparse(String fileName, NameSpacePath path) Parse a filevoidparseParameters(List<CimParameter> params, InputStream in) Parse a list of comma separated parameter values from the input streamparsePropertyValue(ObjectPath path, String propertyName, InputStream inputStream) Parse a property value from the input streamparseValue(InputStream in, NameSpacePath path) Parse values from an input streamparseValue(String indication, NameSpacePath path) Parse a structure value from an incoming indication
- 
Constructor Details- 
MOFParserpublic MOFParser()Create a MOF Parser with a default in-memory repository
- 
MOFParserCreate a MOF Parser with the given repository- Parameters:
- repository- - CIM Repository to use for the parser
 
- 
MOFParserCreate a MOF parser with a definition repository- Parameters:
- repository- - repository to parse new input
- definitions- - repository containing pre-existing definitions (not modified)
 
 
- 
- 
Method Details- 
parseParse a file
- 
parseDescription copied from interface:ParserParse the specification given in an inputstream into the parser repository
- 
parseParse model constructs from a buffered reader
- 
parseValueDescription copied from interface:ParserParse a structure value from an incoming indication- Specified by:
- parseValuein interface- Parser
- Parameters:
- indication- - value of the indication
- path- - optional name space. if non-null, the parser will initialize to the name space before parsing the input
- Returns:
- - incoming structure value; null if none found
 
- 
parsePropertyValueParse a property value from the input stream- Parameters:
- path- - path of the element to use for the property
- propertyName- - name of the property to parse
- inputStream- - input stream containing property value
- Returns:
- - data value for the property
 
- 
parseParametersParse a list of comma separated parameter values from the input stream- Parameters:
- params- - expected parameters. At return values are set in the parameters
- in- - input stream to parse
 
- 
parseValueParse values from an input stream- Parameters:
- in- - input stream to parse values from
- path- - namespace path to be used as initial path for the incoming values
- Returns:
- - list of structure values
 
- 
getRepositoryDescription copied from interface:ParserGet the repository being used by the parser- Specified by:
- getRepositoryin interface- Parser
- Returns:
- - repository being used by the parser
 
- 
mainParse one or more files into a repository- Parameters:
- args- - program arguments in the form [options] fileName [fileName ...] The parser accepts the following options (defaults in [ ]):- -r repository : name of a directory in the file system where the parsed files will be added [repository]
- -n nameSpace : default namespace for the classes [/root/local]
- -l logLevel : logging level for parser messages [finest]
- -h : (must be first argument) print a usage message (also printed if no arguments are given)
 
 
 
-