com.opensymphony.module.sitemesh.parser.rules
public class: MSOfficeDocumentPropertiesRule [javadoc |
source]
java.lang.Object
com.opensymphony.module.sitemesh.html.BasicRule
com.opensymphony.module.sitemesh.html.BlockExtractingRule
com.opensymphony.module.sitemesh.parser.rules.MSOfficeDocumentPropertiesRule
All Implemented Interfaces:
TagRule
Extracts the extra properties saved in HTML from MS Office applications (Word and Excel),
such as Author, Company, Version, etc.
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from com.opensymphony.module.sitemesh.parser.rules.MSOfficeDocumentPropertiesRule Detail: |
protected void end(Tag tag) {
String name = tag.getName().substring(2);
page.addProperty("office.DocumentProperties." + name, context.currentBuffer().toString());
context.mergeBuffer();
}
|
public void process(Tag tag) {
if (tag.getName().equals("o:DocumentProperties")) {
inDocumentProperties = (tag.getType() == Tag.OPEN);
tag.writeTo(context.currentBuffer());
} else {
super.process(tag);
}
}
|
public boolean shouldProcess(String name) {
return (inDocumentProperties && name.startsWith("o:")) || name.equals("o:DocumentProperties");
}
|
protected void start(Tag tag) {
}
|