Resource xmlFile = null;
if (loc != null) {
this.setPageName(loc.getLocation());
xmlFile = loc.getSection().getXmlDocument().getXmlFile();
}
IResponseType thisType = getModelObject().getType();
String typeName = type.getName();
if (typeName.equals("AUDIO") || typeName.equals("SVG") || typeName.equals("UPLOAD"))
titleVisible = true;
if (metadata != null) {
TypeMetadata typeMD = metadata.getType(thisType);
if (typeMD != null) {
if (thisType.getName().equals("SVG") && typeMD.getFragments() != null) {
// Drawing starters - need to convert to URLs.
ArrayList<String> urls = new ArrayList<String>(typeMD.getFragments().size());
for (String frag : typeMD.getFragments()) {
ResourceReference fragResourceRef = ((IRelativeLinkSource)xmlFile).getRelativeReference(frag);
String url = RequestCycle.get().urlFor(fragResourceRef).toString();