Verschiedene Korrekturen zur Verbesserung der Suchergebnisse
git-svn-id: https://svn.libreccm.org/ccm/trunk@1430 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
7e11539fb6
commit
ed4b6497ac
|
|
@ -247,4 +247,9 @@ public class GenericOrganizationalUnit extends ContentPage {
|
||||||
public boolean hasSubordinateOrgaUnits() {
|
public boolean hasSubordinateOrgaUnits() {
|
||||||
return !getSubordinateOrgaUnits().isEmpty();
|
return !getSubordinateOrgaUnits().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchSummary() {
|
||||||
|
return String.format("%s %s", getTitle(), getAddendum());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -306,4 +306,9 @@ public class GenericPerson extends ContentPage implements
|
||||||
public String getRelationAttributeKey(String propertyName) {
|
public String getRelationAttributeKey(String propertyName) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchSummary() {
|
||||||
|
return getFullName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import com.arsdigita.cms.contenttypes.GenericOrganizationalUnit;
|
||||||
import com.arsdigita.cms.contenttypes.ui.GenericOrgaUnitTab;
|
import com.arsdigita.cms.contenttypes.ui.GenericOrgaUnitTab;
|
||||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
|
import com.arsdigita.globalization.GlobalizationHelper;
|
||||||
import com.arsdigita.navigation.ui.AbstractComponent;
|
import com.arsdigita.navigation.ui.AbstractComponent;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.util.UncheckedWrapperException;
|
import com.arsdigita.util.UncheckedWrapperException;
|
||||||
|
|
@ -60,6 +61,13 @@ public class GenericOrgaUnitTabComponent extends AbstractComponent {
|
||||||
GenericOrganizationalUnit orgaunit =
|
GenericOrganizationalUnit orgaunit =
|
||||||
(GenericOrganizationalUnit) DomainObjectFactory.
|
(GenericOrganizationalUnit) DomainObjectFactory.
|
||||||
newInstance(orgaunitOid);
|
newInstance(orgaunitOid);
|
||||||
|
|
||||||
|
if (!(orgaunit.getLanguage().equals(GlobalizationHelper.
|
||||||
|
getNegotiatedLocale().getLanguage()))) {
|
||||||
|
orgaunit = (GenericOrganizationalUnit) orgaunit.getContentBundle().
|
||||||
|
getInstance(GlobalizationHelper.getNegotiatedLocale());
|
||||||
|
}
|
||||||
|
|
||||||
if ((DispatcherHelper.getDispatcherPrefix(request) == null)
|
if ((DispatcherHelper.getDispatcherPrefix(request) == null)
|
||||||
|| !DispatcherHelper.getDispatcherPrefix(request).equals("preview")) {
|
|| !DispatcherHelper.getDispatcherPrefix(request).equals("preview")) {
|
||||||
orgaunit = (GenericOrganizationalUnit) orgaunit.getLiveVersion();
|
orgaunit = (GenericOrganizationalUnit) orgaunit.getLiveVersion();
|
||||||
|
|
@ -67,7 +75,9 @@ public class GenericOrgaUnitTabComponent extends AbstractComponent {
|
||||||
|
|
||||||
final Element contentPanelElem = new Element("cms:contentPanel",
|
final Element contentPanelElem = new Element("cms:contentPanel",
|
||||||
CMS.CMS_XML_NS);
|
CMS.CMS_XML_NS);
|
||||||
final Element cmsItemElem = contentPanelElem.newChildElement("cms:item", CMS.CMS_XML_NS);
|
final Element cmsItemElem =
|
||||||
|
contentPanelElem.newChildElement("cms:item",
|
||||||
|
CMS.CMS_XML_NS);
|
||||||
cmsItemElem.addAttribute("oid", orgaunitOid.toString());
|
cmsItemElem.addAttribute("oid", orgaunitOid.toString());
|
||||||
final Element objTypeElem = cmsItemElem.newChildElement("objectType");
|
final Element objTypeElem = cmsItemElem.newChildElement("objectType");
|
||||||
objTypeElem.setText(orgaunit.getClass().getName());
|
objTypeElem.setText(orgaunit.getClass().getName());
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,7 @@ public class Publication extends ContentPage {
|
||||||
protected void updateAuthorsStr() {
|
protected void updateAuthorsStr() {
|
||||||
final AuthorshipCollection authors = getAuthors();
|
final AuthorshipCollection authors = getAuthors();
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
while(authors.next()) {
|
while (authors.next()) {
|
||||||
if (builder.length() > 0) {
|
if (builder.length() > 0) {
|
||||||
builder.append("; ");
|
builder.append("; ");
|
||||||
}
|
}
|
||||||
|
|
@ -318,4 +318,12 @@ public class Publication extends ContentPage {
|
||||||
generators.add(new SciPublicationExtraXmlGenerator());
|
generators.add(new SciPublicationExtraXmlGenerator());
|
||||||
return generators;
|
return generators;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchSummary() {
|
||||||
|
return String.format("%s %s %s",
|
||||||
|
getTitle(),
|
||||||
|
getAuthors(),
|
||||||
|
getAbstract());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -230,4 +230,9 @@ public class SciDepartment extends GenericOrganizationalUnit {
|
||||||
generators.add(new SciDepartmentExtraXmlGenerator());
|
generators.add(new SciDepartmentExtraXmlGenerator());
|
||||||
return generators;
|
return generators;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchSummary() {
|
||||||
|
return getDepartmentShortDescription();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,4 +237,9 @@ public class SciInstitute extends GenericOrganizationalUnit {
|
||||||
generators.add(new SciInstituteExtraXmlGenerator());
|
generators.add(new SciInstituteExtraXmlGenerator());
|
||||||
return generators;
|
return generators;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchSummary() {
|
||||||
|
return getInstituteShortDescription();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -366,4 +366,9 @@ public class SciProject extends GenericOrganizationalUnit {
|
||||||
generators.add(new SciProjectExtraXmlGenerator());
|
generators.add(new SciProjectExtraXmlGenerator());
|
||||||
return generators;
|
return generators;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSearchSummary() {
|
||||||
|
return getProjectShortDescription();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue