public class TimePlugin extends PluginActivator implements TimeService, PostCreateTopicListener, PostCreateAssociationListener, PostUpdateTopicListener, PostUpdateTopicRequestListener, PostUpdateAssociationListener, PreSendTopicListener, PreSendAssociationListener, ServiceResponseFilterListener
| Modifier and Type | Field and Description |
|---|---|
private static String |
HEADER_LAST_MODIFIED |
private Logger |
logger |
private static String |
PROP_CREATED |
private static String |
PROP_MODIFIED |
private DateFormat |
rfc2822 |
bundle, dm4, mf| Constructor and Description |
|---|
TimePlugin() |
| Modifier and Type | Method and Description |
|---|---|
private void |
enrichWithTimestamp(DeepaMehtaObject object) |
Collection<Association> |
getAssociationsByCreationTime(long from,
long to) |
Collection<Association> |
getAssociationsByModificationTime(long from,
long to) |
long |
getCreationTime(long objectId) |
long |
getModificationTime(long objectId) |
private Set<DeepaMehtaObject> |
getParents(Topic topic)
Returns all parent topics/associations of the given topic (recursively).
|
Collection<Topic> |
getTopicsByCreationTime(long from,
long to) |
Collection<Topic> |
getTopicsByModificationTime(long from,
long to) |
void |
init() |
void |
postCreateAssociation(Association assoc) |
void |
postCreateTopic(Topic topic) |
void |
postUpdateAssociation(Association assoc,
AssociationModel updateModel,
AssociationModel oldAssoc) |
void |
postUpdateTopic(Topic topic,
TopicModel updateModel,
TopicModel oldTopic) |
void |
postUpdateTopicRequest(Topic topic) |
void |
preSendAssociation(Association assoc) |
void |
preSendTopic(Topic topic) |
private DeepaMehtaObject |
responseObject(com.sun.jersey.spi.container.ContainerResponse response) |
void |
serviceResponseFilter(com.sun.jersey.spi.container.ContainerResponse response) |
private void |
setHeader(com.sun.jersey.spi.container.ContainerResponse response,
String header,
String value) |
private void |
setLastModifiedHeader(com.sun.jersey.spi.container.ContainerResponse response,
long time) |
void |
setModified(DeepaMehtaObject object) |
private void |
storeCreationTime(DeepaMehtaObject object,
long time) |
private void |
storeModificationTime(DeepaMehtaObject object,
long time) |
private void |
storeParentsTimestamp(Topic topic) |
private void |
storeTime(DeepaMehtaObject object,
String propUri,
long time) |
private void |
storeTimestamp(DeepaMehtaObject object) |
private void |
storeTimestamps(DeepaMehtaObject object) |
getBundleContext, getPluginName, getStaticResource, getUri, preInstall, publishFileSystem, serviceArrived, serviceGone, setCoreService, shutdown, start, stop, toStringprivate static String PROP_CREATED
private static String PROP_MODIFIED
private static String HEADER_LAST_MODIFIED
private DateFormat rfc2822
public TimePlugin()
public long getCreationTime(long objectId)
getCreationTime in interface TimeServicepublic long getModificationTime(long objectId)
getModificationTime in interface TimeServicepublic void setModified(DeepaMehtaObject object)
setModified in interface TimeServicepublic Collection<Topic> getTopicsByCreationTime(long from, long to)
getTopicsByCreationTime in interface TimeServicepublic Collection<Topic> getTopicsByModificationTime(long from, long to)
getTopicsByModificationTime in interface TimeServicepublic Collection<Association> getAssociationsByCreationTime(long from, long to)
getAssociationsByCreationTime in interface TimeServicepublic Collection<Association> getAssociationsByModificationTime(long from, long to)
getAssociationsByModificationTime in interface TimeServicepublic void init()
init in interface PluginContextinit in class PluginActivatorpublic void postCreateTopic(Topic topic)
postCreateTopic in interface PostCreateTopicListenerpublic void postCreateAssociation(Association assoc)
postCreateAssociation in interface PostCreateAssociationListenerpublic void postUpdateTopic(Topic topic, TopicModel updateModel, TopicModel oldTopic)
postUpdateTopic in interface PostUpdateTopicListenerpublic void postUpdateAssociation(Association assoc, AssociationModel updateModel, AssociationModel oldAssoc)
postUpdateAssociation in interface PostUpdateAssociationListenerpublic void postUpdateTopicRequest(Topic topic)
postUpdateTopicRequest in interface PostUpdateTopicRequestListenerpublic void preSendTopic(Topic topic)
preSendTopic in interface PreSendTopicListenerpublic void preSendAssociation(Association assoc)
preSendAssociation in interface PreSendAssociationListenerpublic void serviceResponseFilter(com.sun.jersey.spi.container.ContainerResponse response)
serviceResponseFilter in interface ServiceResponseFilterListenerprivate void storeTimestamps(DeepaMehtaObject object)
private void storeTimestamp(DeepaMehtaObject object)
private void storeParentsTimestamp(Topic topic)
private void storeCreationTime(DeepaMehtaObject object, long time)
private void storeModificationTime(DeepaMehtaObject object, long time)
private void storeTime(DeepaMehtaObject object, String propUri, long time)
private DeepaMehtaObject responseObject(com.sun.jersey.spi.container.ContainerResponse response)
private void enrichWithTimestamp(DeepaMehtaObject object)
private void setLastModifiedHeader(com.sun.jersey.spi.container.ContainerResponse response, long time)
private void setHeader(com.sun.jersey.spi.container.ContainerResponse response, String header, String value)
private Set<DeepaMehtaObject> getParents(Topic topic)
Copyright © 2017. All Rights Reserved.