@Override public boolean setPartShortcut(Part part, String relationshipType) { if (relationshipType.equals(Namespaces.GLOSSARY_DOCUMENT)) { glossaryDocumentPart = (GlossaryDocumentPart)part; return true; } else { return super.setPartShortcut(part, relationshipType); } }
public boolean setPartShortcut(Part part, String relationshipType) { // Since each part knows its relationshipsType, // why is this passed in as an arg? // Answer: where the relationshipType is ascertained // from the rel itself, it is the most authoritative. // Note that we normally use the info in [Content_Types] // to create a part of the correct type. This info // will not necessary correspond to the info in the rel! if (relationshipType==null) { log.warn("trying to set part shortcut against a null relationship type."); return false; } if (relationshipType.equals(Namespaces.FONT_TABLE)) { fontTablePart = (FontTablePart)part; return true; } else if (relationshipType.equals(Namespaces.THEME)) { themePart = (ThemePart)part; return true; } else if (relationshipType.equals(Namespaces.STYLES)) { styleDefinitionsPart = (StyleDefinitionsPart)part; return true; } else if (relationshipType.equals(Namespaces.WEB_SETTINGS)) { webSettingsPart = (WebSettingsPart)part; return true; } else if (relationshipType.equals(Namespaces.SETTINGS)) { documentSettingsPart = (DocumentSettingsPart)part; return true;
@Override public boolean setPartShortcut(Part part, String relationshipType) { if (relationshipType.equals(Namespaces.GLOSSARY_DOCUMENT)) { glossaryDocumentPart = (GlossaryDocumentPart)part; return true; } else { return super.setPartShortcut(part, relationshipType); } }
public boolean setPartShortcut(Part part, String relationshipType) { // Since each part knows its relationshipsType, // why is this passed in as an arg? // Answer: where the relationshipType is ascertained // from the rel itself, it is the most authoritative. // Note that we normally use the info in [Content_Types] // to create a part of the correct type. This info // will not necessary correspond to the info in the rel! if (relationshipType==null) { log.warn("trying to set part shortcut against a null relationship type."); return false; } if (relationshipType.equals(Namespaces.FONT_TABLE)) { fontTablePart = (FontTablePart)part; return true; } else if (relationshipType.equals(Namespaces.THEME)) { themePart = (ThemePart)part; return true; } else if (relationshipType.equals(Namespaces.STYLES)) { styleDefinitionsPart = (StyleDefinitionsPart)part; return true; } else if (relationshipType.equals(Namespaces.WEB_SETTINGS)) { webSettingsPart = (WebSettingsPart)part; return true; } else if (relationshipType.equals(Namespaces.SETTINGS)) { documentSettingsPart = (DocumentSettingsPart)part; return true;