org.inria.ns.reflex.structures
Interface Localizable

All Known Subinterfaces:
Catalog, Schema
All Known Implementing Classes:
ActiveSchemaAction, ADTSchema, BadCatalogFormatException, BadPatternException, Bootstrap.PrimalCatalog, BreakException, BuiltinSchema, BuiltinTypeSchema, CatalogAction, CatalogReader, ChannelFunction.Channel, ContinueException, ControlableException, EmptyExpressionException, EngineCorruptedException, ExecutionException, ExitException, GlobalSchema, IgnorableException, InitializationException, LocalizableException, NamespaceException, PatternEvaluationException, ProcessorInstance, RecoverableException, ReflexCLI, SAXAdaptableParser, SAXAggregator, SAXBuffer, SAXDocument, SAXFilter, SAXFragmentParser, SAXMultihandler, SAXSafeDocument, SAXSafeParser, SerializeException, StandaloneProducer.Impl, TimeoutException, TypeFormatException, UnlocalizableException, UnmarshalException, UnrecoverableException, UnsupportedAxisException, XFactoryConfigurationException, XIncludeFilter, XIncludeLoopException, XMLBuilder.SAXSplitter, XMLException, XPathException, XPathFilter, XPathFunctionException, XPathSyntaxException, XPointerEvaluationException, XPointerSyntaxException, XSLTFilter, XSSchema

public interface Localizable

A Localizable component has an URI deliverable as an XFile URI.

A localizable component may be used to resolve relative paths.

Classes that implement this interface may have instances that are not localizable ; in this case, trying to resolve relative paths is irrelevant for such instances.

Author:
Philippe Poulard
See Also:
UnlocalizableException, XFile

Method Summary
 XFile getLocation()
          Return the absolute localization of this component.
 boolean isLocalizable()
          To prevent getLocation() to throw an exception, this method might be called before to ensure that this instance is localizable.
 void setLocation(XFile location)
          Set the localization of this component.
 

Method Detail

getLocation

XFile getLocation()
                  throws UnlocalizableException
Return the absolute localization of this component.

Returns:
The URI of this component, as an XFile, or null.
Throws:
UnlocalizableException - If this instance is unable to localize this component.
See Also:
isLocalizable()

setLocation

void setLocation(XFile location)
                 throws UnlocalizableException
Set the localization of this component.

Parameters:
location - The absolute URI of this component, as an XFile.
Throws:
UnlocalizableException - If a base URI is irrelevant for this instance.

isLocalizable

boolean isLocalizable()
To prevent getLocation() to throw an exception, this method might be called before to ensure that this instance is localizable.

Returns:
true if this instance is localizable, false otherwise.