public void tmlStartTag() throws TMLException, WGAPIException {
Status status = (Status) getStatus();
WGContentNavigator navigator;
if (this.allowdefaultlang != null) {
addWarning("Attribute \"allowdefaultlang\" is deprecated and inoperable since OpenWGA 5.1");
}
WGContent relContent = this.getTMLContext().content();
// IF the relContent is a dummy, use the first released content of this database
if (relContent.isDummy()) {
relContent = relContent.getDatabase().getFirstReleasedContent((String) getTMLContext().meta("language"), true);
if (relContent == null) {
addWarning("No content in context and cannot find released content of language " + getTMLContext().meta("language") + " in the current database", true);
return;
}
}
String theRole = this.getRole();
String type = status.navType;
if (type.equals("children")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
WGStructEntryList childEntries = relContent.getStructEntry().getChildEntries();
status.contentList = WGContentList.create(navigator.collectRelevantContents(childEntries));
}
else if (type.equals("siblings")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
WGStructEntryList siblingEntries = relContent.getStructEntry().getSiblingEntries();
status.contentList = WGContentList.create(navigator.collectRelevantContents(siblingEntries));
}
else if (type.equals("parent") || type.equals("parents")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
WGStructEntryList parentEntries = relContent.getStructEntry().getParentEntry().getSiblingEntries();
status.contentList = WGContentList.create(navigator.collectRelevantContents(parentEntries));
}
else if (type.equals("path")) {
navigator = createContentNavigator(theRole, WGContent.DISPLAYTYPE_NAVIGATOR);
status.contentList = this.getPathListFor(relContent, navigator);
}