org.eclipse.higgins.idas.api.model
Interface IMetadataModel

All Superinterfaces:
IModel

public interface IMetadataModel
extends IModel

Represents a model of metadata as it defined in the context's ontology model.

See Also:
IMetadata

Method Summary
 URI getType()
          Returns XSD datatype of represented value as it defined in the context's schema.
 boolean isValid(String lexicalForm)
          Determines whether given String is valid lexical form of represented value.
 boolean isValidValue(Object valueForm)
          Determines whether given Object is valid value form of represented value.
 String toLexicalForm(Object value)
          Convert given Object to lexical form of represented value.
 Object toValueForm(String lexicalForm)
          Convert given String to value form of represented value.
 
Methods inherited from interface org.eclipse.higgins.idas.api.model.IModel
getDisplayData
 

Method Detail

getType

public URI getType()
Returns XSD datatype of represented value as it defined in the context's schema. Please note that XSD:ENTITY, XSD:ID and XSD:IDREF are not currently supported by context's ontology models.

Specified by:
getType in interface IModel
Returns:
URI of metadata's datatype.
See Also:
XML Schema

isValidValue

public boolean isValidValue(Object valueForm)
Determines whether given Object is valid value form of represented value.

Parameters:
valueForm - value to be checked.
Returns:
true if valueForm is valid value form and false otherwise.

isValid

public boolean isValid(String lexicalForm)
Determines whether given String is valid lexical form of represented value.

Parameters:
lexicalForm - value to be checked.
Returns:
true if lexicalForm is valid lexical form and false otherwise.

toValueForm

public Object toValueForm(String lexicalForm)
                   throws IdASModelException
Convert given String to value form of represented value.

Parameters:
lexicalForm - String value to be converted.
Returns:
Object which represents valid value form of represented value.
Throws:
IdASModelException - if given String can't be converted.

toLexicalForm

public String toLexicalForm(Object value)
                     throws IdASModelException
Convert given Object to lexical form of represented value.

Parameters:
value - Object value to be converted.
Returns:
String which represents valid lexical form of represented value.
Throws:
IdASModelException - if given Object can't be converted.