Package net.ontopia.topicmaps.utils.ctm
Class IRIAsArgumentGenerator
- java.lang.Object
-
- net.ontopia.topicmaps.utils.ctm.IRIAsArgumentGenerator
-
- All Implemented Interfaces:
ValueGeneratorIF
public class IRIAsArgumentGenerator extends Object implements ValueGeneratorIF
INTERNAL: A special generator that's used when an IRI is passed as an argument to a template because this can be either a topic reference or an IRI literal, and we don't know which.
-
-
Constructor Summary
Constructors Constructor Description IRIAsArgumentGenerator(ParseContextIF context, LocatorIF locator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueGeneratorIF
copy()
LocatorIF
getDatatype()
String
getLiteral()
LocatorIF
getLocator()
Returns a locator if the literal is a locator.TopicIF
getTopic()
boolean
isTopic()
Returns true if this generator produces a topic.
-
-
-
Constructor Detail
-
IRIAsArgumentGenerator
public IRIAsArgumentGenerator(ParseContextIF context, LocatorIF locator)
-
-
Method Detail
-
isTopic
public boolean isTopic()
Description copied from interface:ValueGeneratorIF
Returns true if this generator produces a topic.- Specified by:
isTopic
in interfaceValueGeneratorIF
-
getTopic
public TopicIF getTopic()
- Specified by:
getTopic
in interfaceValueGeneratorIF
-
copy
public ValueGeneratorIF copy()
- Specified by:
copy
in interfaceValueGeneratorIF
-
getLiteral
public String getLiteral()
- Specified by:
getLiteral
in interfaceValueGeneratorIF
-
getDatatype
public LocatorIF getDatatype()
- Specified by:
getDatatype
in interfaceValueGeneratorIF
-
getLocator
public LocatorIF getLocator()
Description copied from interface:ValueGeneratorIF
Returns a locator if the literal is a locator. Otherwise it throws an exception.- Specified by:
getLocator
in interfaceValueGeneratorIF
-
-