org.tm4j.net .Locator
Description
The interface to be supported by all classes implementing resolvable addresses in TM4J. A locator may be absolute or relative, and it may be resolved relative to another locator.Each locator consists of the following components:
- A notation, defined by a String. It is accessible via the #getNotation() method.
- An address, also defined by a String. It is accessible via the #getAddress() method.
Locator
are usually not instantiated
directly — you should resort to using LocatorFactory#createLocator instead.
Classes implementing Locator
should ensure that they provide a
constructor of the signature (LocatorFactory, String, String)
to allow for proper locator creation on the factory's part. LocatorBase
provides such a constructor, so it's generally a good idea to extend that
class rather than implement Locator
directly.
Inheritance Hierarchy
- Locator
Implementations of this interface
Method Summary | |
---|---|
Locator |
copy()
Returns a copy of this object.
|
void |
equals(org.tm4j.net.Locator loc)
Determines the equality of this Locator to loc :
|
java.lang.String |
getAddress()
Gets the address associated with the locator
|
LocatorFactory |
getFactory()
Returns the locator factory associated with this locator.
|
java.lang.String |
getNotation()
Gets the string defining the notation type of this locator
|
void |
hashCode()
Returns the Locator's object hashcode.
|
void |
initialise(java.lang.String notation,java.lang.String address)
Initializes the locator with the specified notation and address.
|
Locator |
resolveRelative(java.lang.String rel)
Returns a new Locator whose address is the result of
resolvng the specified relative address string relative
to this Locator.
|
Locator |
resolveRelative(org.tm4j.net.Locator rel)
Returns a new Locator whose address is the result of
resolving the specified Locator relative to this Locator.
|
void |
setFactory(org.tm4j.net.LocatorFactory factory)
Associates the locator with the given factory.
|
Related Topics
Is Contained By
Is Imported By
Is Type For
Parameter loc of org.tm4j.topicmap.index.basic.OccurrenceLocatorIndex.getOccurrencesOfLocator
[
Typed Item
]
Parameter loc of org.tm4j.topicmap.index.basic.VariantLocatorIndex.getVariantsOfLocator
[
Typed Item
]
Parameter loc of org.tm4j.topicmap.unified.UnifiedTopicMap.getObjectByResourceLocator
[
Typed Item
]
Parameter resourceLocator of org.tm4j.topicmap.unified.UnifiedTopicMap.createAssociation
[
Typed Item
]
Parameter resourceLocator of org.tm4j.topicmap.utils.XTMBuilder.getTopicBySourceLocator
[
Typed Item
]
Parameter subjectIndicator of org.tm4j.topicmap.unified.UnifiedTopicMap.getTopicBySubjectIndicator
[
Typed Item
]
Parameter subjectIndicator of org.tm4j.topicmap.utils.WalkerFilterAdapter.onSubjectIndicator
[
Typed Item
]
Parameter subjectIndicator of org.tm4j.topicmap.utils.WalkerHandler.onSubjectIndicator
[
Typed Item
]
Parameter subjectIndicator of org.tm4j.topicmap.utils.WalkerHandlerAdapter.onSubjectIndicator
[
Typed Item
]
Parameter subjectIndicatorLocator of org.tm4j.topicmap.TopicMap.getTopicBySubjectIndicator
[
Typed Item
]
Parameter subjectOrIndicator of org.tm4j.topicmap.utils.testers.TypeTester.addAllowedType
[
Typed Item
]