FileDocCategorySizeDatePackage
KeyFieldParser.javaAPI DocphoneME MR2 API (J2ME)2402Wed May 02 18:00:42 BST 2007gov.nist.javax.sdp.parser

KeyFieldParser

public class KeyFieldParser extends SDPParser
Key field parser.
version
1.0

Fields Summary
Constructors Summary
public KeyFieldParser(String keyField)
Creates new KeyFieldParser.

param
keyField the key field string to be parsed

        lexer = new Lexer("charLexer", keyField);
    
protected KeyFieldParser()
Default constructor.

        super();
    
Methods Summary
public KeyFieldkeyField()
Perform the key field parsing

return
the parsed key field
exception
ParseException if a parsing error occurs

        lexer.match('k");
        lexer.SPorHT();
        lexer.match('=");
        lexer.SPorHT();

        KeyField keyField = new KeyField();
        NameValue nameValue = nameValue();
        String name = nameValue.getName();
        String value =  (String) nameValue.getValue();

        keyField.setType(name);

        keyField.setKeyData(value);

        return keyField;

    
public SDPFieldparse()
Perform the key field parsing

return
the parsed key field
exception
ParseException if a parsing error occurs

        return keyField();