Content type annotations

pull/1/head
Jens Pelzetter 2019-11-19 14:54:48 +01:00
parent 0d30b98253
commit ea40c42185
22 changed files with 282 additions and 39 deletions

View File

@ -5,15 +5,17 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.ArticleInCollectedVolumeCreateForm;
import com.arsdigita.cms.contenttypes.ui.ArticleInCollectedVolumePropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.ArticleInCollectedVolume;
import java.util.Objects;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import static org.scientificcms.publications.SciPublicationsConstants.*;
@ -25,6 +27,24 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "ARTICLE_IN_COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.ArticleInCollectedVolume",
descriptionBundle = "org.scientificcms.publications.contenttypes.ArticleInCollectedVolume"
)
@AuthoringKit(
createComponent = ArticleInCollectedVolumeCreateForm.class,
steps = {
@AuthoringStep(
component = ArticleInCollectedVolumePropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class ArticleInCollectedVolumeItem
extends PublicationItem<ArticleInCollectedVolume> {

View File

@ -5,7 +5,14 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.ArticleInJournalCreateForm;
import com.arsdigita.cms.contenttypes.ui.ArticleInJournalPropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.ArticleInJournal;
import javax.persistence.Entity;
@ -20,6 +27,24 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "ARTICLE_IN_COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.ArticleInJournal",
descriptionBundle = "org.scientificcms.publications.contenttypes.ArticleInJournal"
)
@AuthoringKit(
createComponent = ArticleInJournalCreateForm.class,
steps = {
@AuthoringStep(
component = ArticleInJournalPropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class ArticleInJournalItem extends PublicationItem<ArticleInJournal> {
private static final long serialVersionUID = 1L;

View File

@ -5,16 +5,17 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.CollectedVolumeCreateForm;
import com.arsdigita.cms.contenttypes.ui.CollectedVolumePropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.CollectedVolume;
import org.scientificcms.publications.PublicationWithPublisher;
import java.util.Objects;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import static org.scientificcms.publications.SciPublicationsConstants.*;
@ -26,6 +27,24 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.CollectedVolume",
descriptionBundle = "org.scientificcms.publications.contenttypes.CollectedVolume"
)
@AuthoringKit(
createComponent = CollectedVolumeCreateForm.class,
steps = {
@AuthoringStep(
component = CollectedVolumePropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class CollectedVolumeItem
extends PublicationWithPublisherItem<CollectedVolume> {

View File

@ -5,15 +5,18 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.ExpertiseCreateForm;
import com.arsdigita.cms.contenttypes.ui.ExpertisePropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.Expertise;
import java.util.Objects;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import static org.scientificcms.publications.SciPublicationsConstants.*;
@ -25,6 +28,24 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "EXPERTISE_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.Expertise",
descriptionBundle = "org.scientificcms.publications.contenttypes.Expertise"
)
@AuthoringKit(
createComponent = ExpertiseCreateForm.class,
steps = {
@AuthoringStep(
component = ExpertisePropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class ExpertiseItem extends PublicationItem<Expertise> {
private static final long serialVersionUID = 1L;

View File

@ -5,15 +5,17 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.GreyLiteratureCreateForm;
import com.arsdigita.cms.contenttypes.ui.GreyLiteraturePropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.GreyLiterature;
import java.util.Objects;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import static org.scientificcms.publications.SciPublicationsConstants.*;
@ -25,6 +27,25 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "GREY_LITERATURE_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.GreyLiterature",
descriptionBundle
= "org.scientificcms.publications.contenttypes.GreyLiterature"
)
@AuthoringKit(
createComponent = GreyLiteratureCreateForm.class,
steps = {
@AuthoringStep(
component = GreyLiteraturePropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class GreyLiteratureItem extends PublicationItem<GreyLiterature> {
private static final long serialVersionUID = 1L;
@ -87,5 +108,4 @@ public class GreyLiteratureItem extends PublicationItem<GreyLiterature> {
// Objects.toString(greyLiterature),
// data));
// }
}

View File

@ -5,15 +5,17 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.InProceedingsCreateForm;
import com.arsdigita.cms.contenttypes.ui.InProceedingsPropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.InProceedings;
import java.util.Objects;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import static org.scientificcms.publications.SciPublicationsConstants.*;
@ -25,6 +27,25 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "INPROCEEDINGS_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.InProceedings",
descriptionBundle
= "org.scientificcms.publications.contenttypes.InProceedings"
)
@AuthoringKit(
createComponent = InProceedingsCreateForm.class,
steps = {
@AuthoringStep(
component = InProceedingsPropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class InProceedingsItem extends PublicationItem<InProceedings> {
private static final long serialVersionUID = 1L;
@ -46,7 +67,6 @@ public class InProceedingsItem extends PublicationItem<InProceedings> {
// protected void setPublication(final InProceedings inProceedings) {
// this.inProcedings = inProceedings;
// }
@Override
public int hashCode() {
int hash = super.hashCode();
@ -88,5 +108,4 @@ return other.canEqual(this);
// Objects.toString(inProcedings),
// data));
// }
}

View File

@ -5,15 +5,17 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.InternetArticleCreateForm;
import com.arsdigita.cms.contenttypes.ui.InternetArticlePropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.InternetArticle;
import java.util.Objects;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import static org.scientificcms.publications.SciPublicationsConstants.*;
@ -25,6 +27,25 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "INTERNET_ARTICLE_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.InternetArticle",
descriptionBundle
= "org.scientificcms.publications.contenttypes.InternetArticle"
)
@AuthoringKit(
createComponent = InternetArticleCreateForm.class,
steps = {
@AuthoringStep(
component = InternetArticlePropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class InternetArticleItem extends PublicationItem<InternetArticle> {
private static final long serialVersionUID = 1L;
@ -87,5 +108,4 @@ public class InternetArticleItem extends PublicationItem<InternetArticle> {
// Objects.toString(expertise),
// data));
// }
}

View File

@ -5,6 +5,13 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.MonographCreateForm;
import com.arsdigita.cms.contenttypes.ui.MonographPropertiesStep;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.Monograph;
import javax.persistence.Entity;
@ -18,6 +25,24 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
*/
@Entity
@Table(name = "MONOGRAPH_ITEMS", schema = DB_SCHEMA)
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.Monograph",
descriptionBundle = "org.scientificcms.publications.contenttypes.Monograph"
)
@AuthoringKit(
createComponent = MonographCreateForm.class,
steps = {
@AuthoringStep(
component = MonographPropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class MonographItem extends PublicationWithPublisherItem<Monograph> {
private static final long serialVersionUID = 1L;
@ -79,5 +104,4 @@ public class MonographItem extends PublicationWithPublisherItem<Monograph> {
// Objects.toString(monograph),
// data));
// }
}

View File

@ -5,6 +5,14 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.ProceedingsCreateForm;
import com.arsdigita.cms.contenttypes.ui.ProceedingsPropertiesStep;
import jdk.jfr.ContentType;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.Proceedings;
import javax.persistence.Entity;
@ -18,6 +26,25 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
*/
@Entity
@Table(name = "PROCEEDINGS_ITEMS", schema = DB_SCHEMA)
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.Proceedings",
descriptionBundle
= "org.scientificcms.publications.contenttypes.Proceedings"
)
@AuthoringKit(
createComponent = ProceedingsCreateForm.class,
steps = {
@AuthoringStep(
component = ProceedingsPropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class ProceedingsItem extends PublicationWithPublisherItem<Proceedings> {
private static final long serialVersionUID = 1L;
@ -80,5 +107,4 @@ public class ProceedingsItem extends PublicationWithPublisherItem<Proceedings> {
// Objects.toString(article),
// data));
// }
}

View File

@ -5,7 +5,14 @@
*/
package org.scientificcms.publications.contenttypes;
import com.arsdigita.cms.contenttypes.ui.WorkingPaperCreateForm;
import com.arsdigita.cms.contenttypes.ui.WorkingPaperPropertiesStep;
import org.hibernate.envers.Audited;
import org.librecms.CmsConstants;
import org.librecms.contenttypes.AuthoringKit;
import org.librecms.contenttypes.AuthoringStep;
import org.librecms.contenttypes.ContentTypeDescription;
import org.scientificcms.publications.WorkingPaper;
import javax.persistence.Entity;
@ -20,6 +27,25 @@ import static org.scientificcms.publications.SciPublicationsConstants.*;
@Entity
@Table(name = "WORKING_PAPER_ITEMS", schema = DB_SCHEMA)
@Audited
@ContentTypeDescription(
labelBundle = "org.scientificcms.publications.contenttypes.WorkingPaper",
descriptionBundle
= "org.scientificcms.publications.contenttypes.WorkingPaper"
)
@AuthoringKit(
createComponent = WorkingPaperCreateForm.class,
steps = {
@AuthoringStep(
component = WorkingPaperPropertiesStep.class,
labelBundle = CmsConstants.CMS_BUNDLE,
labelKey = "cms.contenttypes.shared.basic_properties.title",
descriptionBundle = CmsConstants.CMS_BUNDLE,
descriptionKey = "cms.contenttypes.shared.basic_properties"
+ ".description",
order = 1
)
}
)
public class WorkingPaperItem extends PublicationItem<WorkingPaper> {
private static final long serialVersionUID = 1L;
@ -82,5 +108,4 @@ public class WorkingPaperItem extends PublicationItem<WorkingPaper> {
// Objects.toString(workingPaper),
// data));
// }
}

View File

@ -0,0 +1,2 @@
label = Article in collected volume
description = An article in a collected volume

View File

@ -0,0 +1,2 @@
label = Article in Journal
description = An article in a journal

View File

@ -0,0 +1,2 @@
label = Collected Volume
description = A collected volume

View File

@ -0,0 +1,2 @@
label = Expertise
description = An expertise

View File

@ -0,0 +1,2 @@
label = Grey literature
description = A publications which doesn't fit into the other types.

View File

@ -0,0 +1,2 @@
label = InProccedings
description = A paper in the proceedings of a conference

View File

@ -0,0 +1,2 @@
label = InternetArticle
description = An internet article

View File

@ -0,0 +1,2 @@
label = Monograph
descripition = A monograph

View File

@ -0,0 +1,2 @@
label = Proceedings
description = Content type for Proceedings

View File

@ -0,0 +1,2 @@
label = Review
description = A review of another publication (e.g. a monography) which appered in a journal.

View File

@ -0,0 +1,2 @@
label = Talk
description = A talk given on an event.

View File

@ -0,0 +1,2 @@
label = Working Paper
description = Content type for Working Papers