return this.meta("content", name);
}
private Object getContentMetaData(String name) throws WGAPIException {
WGContent content = this.content();
if (content == null) {
return this.getdocument().getMetaData(name);
}
Object mappingresult = this.getMappedMetaValue(name);
if (mappingresult != null) {
return mappingresult;
}
if (name.equals("created")) {
return content.getCreated();
}
else if (name.equals("modified")) {
return content.getLastModified();
}
else if (name.equals("title")) {
return content.getTitle();
}
else if (name.equals("titlepath")) {
return content.getStructEntry().getTitlePath();
}
else if (name.equals("uniquename") || name.equals("name") || name.equals("docname")) {
return content.getUniqueName();
}
else if (name.equals("pageuniquename") || name.equals("pagename") || name.equals("pagedocname")) {
return content.getStructEntry().getUniqueName();
}
else if (name.equals("position")) {
return content.getStructEntry().getPosition();
}
else if (name.equals("key")) {
return content.getContentKey(true).toString();
}
else if (name.equals("area")) {
if (!content.isDummy()) {
return content.getStructEntry().getArea().getName();
}
else {
return "";
}
}
else if (name.equals("level")) {
WGContentNavigator nav = new WGContentNavigator(null, new WebTMLLanguageChooser(db(), this));
return nav.getContentLevel(content);
}
else if (name.equals("index")) {
WGContentNavigator nav = new WGContentNavigator(null, new WebTMLLanguageChooser(db(), this));
return nav.getSiblingsIndex(content);
}
else if (name.equals("navindex")) {
WGContentNavigator nav = new WGContentNavigator(WGContent.DISPLAYTYPE_NAVIGATOR, new WebTMLLanguageChooser(db(), this));
return nav.getSiblingsIndex(content);
}
else if (name.equals("language")) {
return content.getLanguage().getName();
}
else if (name.equals("languagetitle")) {
return content.getLanguage().getTitle();
}
else if (name.equals("attachments")) {
return content.getFileNames();
}
else if (name.equals("doctype") || name.equals("contenttype")) {
if (!content.isDummy()) {
return content.getStructEntry().getContentType().getName();
}
else {
return null;
}
}
else if (name.equals("contenttypetitle")) {
return content.getStructEntry().getContentType().getNameForLanguage(getpreferredlanguage());
}
else if (name.equals("contenttypedescription")) {
return content.getStructEntry().getContentType().getDescriptionForLanguage(getpreferredlanguage());
}
else if (name.equals("siblings")) {
WGContentNavigator nav = new WGContentNavigator(null, new WebTMLLanguageChooser(db(), this));
return new Integer(nav.getSiblingsCount(content));
}
else if (name.equals("workflow")) {
//return content.getStructEntry().getContentType().getMetaData(WGContentType.META_WORKFLOW);
return content.getStructEntry().getWorkflowName();
}
else if (name.equals("status")) {
return content.getStatus();
}
else if (name.equals("structtitle")) {
return content.getStructEntry().getTitle();
}
else if (name.equals("structkey")) {
WGStructEntry entry = content.getStructEntry();
if (entry != null) {
return String.valueOf(entry.getStructKey());
}
else {
return null;
}
}
else if (name.equals("itemnames")) {
return content.getItemNames();
}
else if (name.equals("searchscore")) {
return new Float(content.getSearchScore());
}
else if (name.equals("searchexplanation")) {
return content.getSearchExplanation();
}
else if (name.equals("positionpath")) {
return content.getStructEntry().getPositionPath();
}
else if (name.equals("pagepublished")) {
return content.getStructEntry().getPublished().get(content.getLanguage().getName());
}
else if (name.equals("email")) {
return content.getAuthorEMail();
}
else {
Object result = null;
String upperName = name.toUpperCase();
boolean isNoValidMeta = true;
if (content.getMetaNames().indexOf(upperName) != -1) {
result = content.getMetaData(upperName);
isNoValidMeta = false;
}
else if (result == null) {
WGStructEntry structEntry = content.getStructEntry();
if (structEntry != null) {
if (structEntry.getMetaNames().indexOf(upperName) != -1) {
result = structEntry.getMetaData(upperName);
isNoValidMeta = false;
}