|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ValueFactory
FactoryInterface for Text and Reference instances
TODO: Still not sure if we need that
| Method Summary | |
|---|---|
Reference |
createReference(Object value)
Creates a reference instance for the parsed value. |
Representation |
createRepresentation(String id)
Creates an empty representation instance of with the type SignTypeEnum#Sign
for the parsed ID. |
Text |
createText(Object value)
Creates a Text instance without an language |
Text |
createText(String text,
String language)
Creates a Text instance for a language |
| Method Detail |
|---|
Text createText(Object value)
throws UnsupportedTypeException,
IllegalArgumentException
value - The value if the text. Implementations might support special
support for specific classes. As an default the Object.toString()
method is used to get the lexical form of the text from the parsed value
and null should be used as language.
UnsupportedTypeException - if the type of the parsed object is not
can not be used to create Text instances
IllegalArgumentException - If null is parsed or if the
parsed instance type is supported, but
the parsed instance can not be used to create a text instance
Text createText(String text,
String language)
throws IllegalArgumentException
text - the textlanguage - the language or null.
IllegalArgumentException - if null is parsed as text or
if the parsed parameter can not be used to create a Text instance
Reference createReference(Object value)
throws UnsupportedTypeException,
IllegalArgumentException
Object.toString() method is used to get the unicode representation
of the reference.Implementation MUST support at least the following types:
String: The parsed string need not be be checked for a valid
IRI, URI or URL in any form. However in case of an empty String a
IllegalArgumentException MUST BE thrown)
URI: Any valid URI MUST BE accepted
URL: any valid URL MUST BE accepted
value - the unicode representation of the reference
UnsupportedTypeException - if the type of the parsed object can
not be converted to a Reference.
IllegalArgumentException - if the parsed value is null
or if the parsed value can not be used to
create a valid Reference (e.g. when parsing an empty String)
Representation createRepresentation(String id)
throws IllegalArgumentException
SignTypeEnum#Sign
for the parsed ID. The id MUST not be null nor empty
id - The id of the representation
IllegalArgumentException - if null or an empty string
is parsed as ID
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||