|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.semanticweb.owl.util.CachingBidirectionalShortFormProvider
public abstract class CachingBidirectionalShortFormProvider
Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 18-Apr-2007
Constructor Summary | |
---|---|
protected |
CachingBidirectionalShortFormProvider()
|
Method Summary | |
---|---|
void |
add(OWLEntity entity)
Adds an entity to the cache. |
void |
dispose()
Disposes of the short form proivider. |
protected abstract java.lang.String |
generateShortForm(OWLEntity entity)
Generates the short form for the specified entity. |
java.util.Set<OWLEntity> |
getEntities(java.lang.String shortForm)
For a given short form this method obtains the entities which have this short form. |
OWLEntity |
getEntity(java.lang.String shortForm)
A convenience method which gets an entity from its short form. |
java.lang.String |
getShortForm(OWLEntity entity)
Gets the short form for the specified entity. |
java.util.Set<java.lang.String> |
getShortForms()
Gets all of the short forms that are cached by this short form provider. |
void |
rebuild(OWLEntitySetProvider<OWLEntity> entitySetProvider)
Rebuilds the cache using entities obtained from the specified entity set provider. |
void |
remove(OWLEntity entity)
Removes an entity and its short form from the cache. |
void |
update(OWLEntity entity)
If the short form for a cached entity has changed then this method may be used to update the cached short form mapping for the entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CachingBidirectionalShortFormProvider()
Method Detail |
---|
protected abstract java.lang.String generateShortForm(OWLEntity entity)
update
method.
entity
- The entity whose short form should be generated.public java.util.Set<java.lang.String> getShortForms()
getShortForms
in interface BidirectionalShortFormProvider
public void rebuild(OWLEntitySetProvider<OWLEntity> entitySetProvider)
entitySetProvider
- The OWLEntitySetProvider
that should be used to obtain the entities whose short forms
will be cached.public void add(OWLEntity entity)
entity
- The entity to be added to the cache - the short
form will automatically be generated and added to the cache.public void remove(OWLEntity entity)
entity
- The entity to be removed.public void update(OWLEntity entity)
entity
- The entity whose short form should be updated.public java.util.Set<OWLEntity> getEntities(java.lang.String shortForm)
BidirectionalShortFormProvider
getEntities
in interface BidirectionalShortFormProvider
shortForm
- The short form of the entities that will
be retrieved.
public OWLEntity getEntity(java.lang.String shortForm)
BidirectionalShortFormProvider
getEntity
in interface BidirectionalShortFormProvider
shortForm
- The short form of the entity.
null
if there
is no entity which has the specified short form. If the specified
short form corresponds to more than one entity then an entity will
be chosen by the implementation of the short form provider.public java.lang.String getShortForm(OWLEntity entity)
ShortFormProvider
getShortForm
in interface ShortFormProvider
entity
- The entity.
public void dispose()
ShortFormProvider
dispose
in interface ShortFormProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |