Fields Summary |
---|
protected static final String | META_DATA_SEPARATOR |
protected static final String | META_DATA_ENTRY_SEPARATOR |
protected static final String | STORAGE_OPERATION_SEPARATOR |
protected static final String | OPERATION_DELETE |
protected static final String | OPERATION_UPDATE |
protected static final String | OPERATION_INSERT |
protected static final String | FILE_PREFIX |
Methods Summary |
---|
public void | writeEntry(org.apache.lucene.gdata.storage.lucenestorage.StorageEntryWrapper wrapper, java.io.Writer writer)
writeOperation(wrapper.getOperation(),writer);
writeFeedID(wrapper.getFeedId(),writer);
writeEntryID(wrapper.getEntryId(),writer);
writeTimeStamp(wrapper.getTimestamp().toString(),writer);
if(!wrapper.getOperation().equals(StorageOperation.DELETE)){
writeService(wrapper,writer);
writer.write(META_DATA_ENTRY_SEPARATOR);
BaseEntry entry = wrapper.getEntry();
XmlWriter xmlWriter = new XmlWriter(writer);
entry.generateAtom(xmlWriter,wrapper.getConfigurator().getExtensionProfile());
}
writer.write(META_DATA_ENTRY_SEPARATOR);
writer.write(STORAGE_OPERATION_SEPARATOR);
writer.write(META_DATA_ENTRY_SEPARATOR);
writer.flush();
|
private void | writeEntryID(java.lang.String entryId, java.io.Writer writer)
writer.write(entryId);
writer.write(META_DATA_SEPARATOR);
|
private void | writeFeedID(java.lang.String feedId, java.io.Writer writer)
writer.write(feedId);
writer.write(META_DATA_SEPARATOR);
|
private void | writeOperation(org.apache.lucene.gdata.storage.lucenestorage.StorageEntryWrapper.StorageOperation operation, java.io.Writer writer)
if(operation.equals(StorageOperation.INSERT))
writer.write(OPERATION_INSERT);
else if (operation.equals(StorageOperation.UPDATE))
writer.write(OPERATION_UPDATE);
else if (operation.equals(StorageOperation.DELETE))
writer.write(OPERATION_DELETE);
writer.write(META_DATA_SEPARATOR);
|
private void | writeService(org.apache.lucene.gdata.storage.lucenestorage.StorageEntryWrapper wrapper, java.io.Writer writer)
ProvidedService config = wrapper.getConfigurator();
writer.write(config.getName());
writer.write(META_DATA_SEPARATOR);
|
private void | writeTimeStamp(java.lang.String timestamp, java.io.Writer writer)
writer.write(timestamp);
writer.write(META_DATA_SEPARATOR);
|