More Assets and Contentypes for sci-publications
parent
ba30f3d60e
commit
9691fd9af0
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications;
|
||||
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.AssociationOverride;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
* Basic properties of publication.
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Embeddable
|
||||
public class BasicPublicationProperties implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(name = "YEAR_OF_PUBLICATION")
|
||||
private Integer yearOfPublication;
|
||||
|
||||
@Embedded
|
||||
@AssociationOverride(
|
||||
name = "values",
|
||||
joinTable = @JoinTable(name = "PUBLICATION_TITLES",
|
||||
schema = DB_SCHEMA,
|
||||
joinColumns = {
|
||||
@JoinColumn(name = "OBJECT_ID")
|
||||
})
|
||||
)
|
||||
private LocalizedString title;
|
||||
|
||||
@Embedded
|
||||
@AssociationOverride(
|
||||
name = "values",
|
||||
joinTable = @JoinTable(name = "PUBLICATION_SHORT_DESCS",
|
||||
schema = DB_SCHEMA,
|
||||
joinColumns = {
|
||||
@JoinColumn(name = "OBJECT_ID")
|
||||
})
|
||||
)
|
||||
private LocalizedString shortDescription;
|
||||
|
||||
@Embedded
|
||||
@AssociationOverride(
|
||||
name = "values",
|
||||
joinTable = @JoinTable(name = "PUBLICATION_ABSTRACTS",
|
||||
schema = DB_SCHEMA,
|
||||
joinColumns = {
|
||||
@JoinColumn(name = "OBJECT_ID")
|
||||
})
|
||||
)
|
||||
private LocalizedString publicationAbstract;
|
||||
|
||||
@Embedded
|
||||
@AssociationOverride(
|
||||
name = "values",
|
||||
joinTable = @JoinTable(name = "PUBLICATION_MISC",
|
||||
schema = DB_SCHEMA,
|
||||
joinColumns = {
|
||||
@JoinColumn(name = "OBJECT_ID")
|
||||
})
|
||||
)
|
||||
private LocalizedString misc;
|
||||
|
||||
@Column(name = "PEER_REVIEWED")
|
||||
private Boolean peerReviewed;
|
||||
|
||||
@Column(name = "YEAR_FIRST_PUBLISHED")
|
||||
private Integer yearFirstPublished;
|
||||
|
||||
@Column(name = "LANGUAGE_OF_PUBLICATION")
|
||||
private Locale languageOfPublication;
|
||||
|
||||
public Integer getYearOfPublication() {
|
||||
return yearOfPublication;
|
||||
}
|
||||
|
||||
public void setYearOfPublication(final Integer yearOfPublication) {
|
||||
this.yearOfPublication = yearOfPublication;
|
||||
}
|
||||
|
||||
public LocalizedString getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(final LocalizedString title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public LocalizedString getShortDescription() {
|
||||
return shortDescription;
|
||||
}
|
||||
|
||||
public void setShortDescription(final LocalizedString shortDescription) {
|
||||
this.shortDescription = shortDescription;
|
||||
}
|
||||
|
||||
public LocalizedString getPublicationAbstract() {
|
||||
return publicationAbstract;
|
||||
}
|
||||
|
||||
public void setPublicationAbstract(final LocalizedString publicationAbstract) {
|
||||
this.publicationAbstract = publicationAbstract;
|
||||
}
|
||||
|
||||
public LocalizedString getMisc() {
|
||||
return misc;
|
||||
}
|
||||
|
||||
public void setMisc(final LocalizedString misc) {
|
||||
this.misc = misc;
|
||||
}
|
||||
|
||||
public Boolean getPeerReviewed() {
|
||||
return peerReviewed;
|
||||
}
|
||||
|
||||
public void setPeerReviewed(final Boolean peerReviewed) {
|
||||
this.peerReviewed = peerReviewed;
|
||||
}
|
||||
|
||||
public Integer getYearFirstPublished() {
|
||||
return yearFirstPublished;
|
||||
}
|
||||
|
||||
public void setYearFirstPublished(final Integer yearFirstPublished) {
|
||||
this.yearFirstPublished = yearFirstPublished;
|
||||
}
|
||||
|
||||
public Locale getLanguageOfPublication() {
|
||||
return languageOfPublication;
|
||||
}
|
||||
|
||||
public void setLanguageOfPublication(final Locale languageOfPublication) {
|
||||
this.languageOfPublication = languageOfPublication;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 5;
|
||||
hash = 97 * hash + Objects.hashCode(yearOfPublication);
|
||||
hash = 97 * hash + Objects.hashCode(title);
|
||||
hash = 97 * hash + Objects.hashCode(shortDescription);
|
||||
hash = 97 * hash + Objects.hashCode(publicationAbstract);
|
||||
hash = 97 * hash + Objects.hashCode(misc);
|
||||
hash = 97 * hash + Objects.hashCode(peerReviewed);
|
||||
hash = 97 * hash + Objects.hashCode(yearFirstPublished);
|
||||
hash = 97 * hash + Objects.hashCode(languageOfPublication);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof BasicPublicationProperties)) {
|
||||
return false;
|
||||
}
|
||||
final BasicPublicationProperties other
|
||||
= (BasicPublicationProperties) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(yearOfPublication, other.getYearOfPublication())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(title, other.getTitle())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(shortDescription, other.getShortDescription())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(publicationAbstract,
|
||||
other.getPublicationAbstract())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(misc, other.getMisc())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(peerReviewed, other.getPeerReviewed())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(yearFirstPublished, other.getYearFirstPublished())) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(languageOfPublication,
|
||||
other.getLanguageOfPublication());
|
||||
}
|
||||
|
||||
public boolean canEqual(final Object obj) {
|
||||
|
||||
return obj instanceof BasicPublicationProperties;
|
||||
}
|
||||
|
||||
public String toString(final String data) {
|
||||
|
||||
return String.format("%s{ "
|
||||
+ "yearOfPublication = %d, "
|
||||
+ "title = %s, "
|
||||
+ "shortDescription = %s, "
|
||||
+ "publicationAbstract = %s, "
|
||||
+ "misc = %s, "
|
||||
+ "peerReviewed = %b, "
|
||||
+ "yearFirstPublished = %d, "
|
||||
+ "languageOfPublication = \"%s\"%d"
|
||||
+ " }",
|
||||
super.toString(),
|
||||
yearOfPublication,
|
||||
Objects.toString(title),
|
||||
Objects.toString(shortDescription),
|
||||
Objects.toString(publicationAbstract),
|
||||
Objects.toString(misc),
|
||||
peerReviewed,
|
||||
yearFirstPublished,
|
||||
Objects.toString(languageOfPublication),
|
||||
data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString() {
|
||||
|
||||
return toString("");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications;
|
||||
|
||||
import org.libreccm.l10n.LocalizedString;
|
||||
import org.scientificcms.publications.assets.Publisher;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.AssociationOverride;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Embeddable
|
||||
public class PublicationWithPublisherProperties implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@OneToOne
|
||||
private Publisher publisher;
|
||||
|
||||
@Column(name = "ISBN10", length = 13)
|
||||
private String isbn10;
|
||||
|
||||
@Column(name = "ISBN13", length = 17)
|
||||
private String isbn13;
|
||||
|
||||
@Column(name = "VOLUME")
|
||||
private Integer volume;
|
||||
|
||||
@Column(name = "NUMBER_OF_VOLUMES")
|
||||
private Integer numberOfVolumes;
|
||||
|
||||
@Column(name = "NUMBER_OF_PAGES")
|
||||
private Integer numberOfPages;
|
||||
|
||||
@Embedded
|
||||
@AssociationOverride(
|
||||
name = "values",
|
||||
joinTable = @JoinTable(name = "PUBLICATION_EDITION",
|
||||
schema = DB_SCHEMA,
|
||||
joinColumns = {
|
||||
@JoinColumn(name = "OBJECT_ID")
|
||||
})
|
||||
)
|
||||
private LocalizedString edition;
|
||||
|
||||
public Publisher getPublisher() {
|
||||
return publisher;
|
||||
}
|
||||
|
||||
public void setPublisher(final Publisher publisher) {
|
||||
this.publisher = publisher;
|
||||
}
|
||||
|
||||
public String getIsbn10() {
|
||||
return isbn10;
|
||||
}
|
||||
|
||||
public void setIsbn10(final String isbn10) {
|
||||
this.isbn10 = isbn10;
|
||||
}
|
||||
|
||||
public String getIsbn13() {
|
||||
return isbn13;
|
||||
}
|
||||
|
||||
public void setIsbn13(final String isbn13) {
|
||||
this.isbn13 = isbn13;
|
||||
}
|
||||
|
||||
public Integer getVolume() {
|
||||
return volume;
|
||||
}
|
||||
|
||||
public void setVolume(final Integer volume) {
|
||||
this.volume = volume;
|
||||
}
|
||||
|
||||
public Integer getNumberOfVolumes() {
|
||||
return numberOfVolumes;
|
||||
}
|
||||
|
||||
public void setNumberOfVolumes(final Integer numberOfVolumes) {
|
||||
this.numberOfVolumes = numberOfVolumes;
|
||||
}
|
||||
|
||||
public Integer getNumberOfPages() {
|
||||
return numberOfPages;
|
||||
}
|
||||
|
||||
public void setNumberOfPages(final Integer numberOfPages) {
|
||||
this.numberOfPages = numberOfPages;
|
||||
}
|
||||
|
||||
public LocalizedString getEdition() {
|
||||
return edition;
|
||||
}
|
||||
|
||||
public void setEdition(final LocalizedString edition) {
|
||||
this.edition = edition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 47 * hash + Objects.hashCode(publisher);
|
||||
hash = 47 * hash + Objects.hashCode(isbn10);
|
||||
hash = 47 * hash + Objects.hashCode(isbn13);
|
||||
hash = 47 * hash + Objects.hashCode(volume);
|
||||
hash = 47 * hash + Objects.hashCode(numberOfVolumes);
|
||||
hash = 47 * hash + Objects.hashCode(numberOfPages);
|
||||
hash = 47 * hash + Objects.hashCode(edition);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof PublicationWithPublisherProperties)) {
|
||||
return false;
|
||||
}
|
||||
final PublicationWithPublisherProperties other
|
||||
= (PublicationWithPublisherProperties) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(isbn10, other.getIsbn10())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(isbn13, other.getIsbn13())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(publisher, other.getPublisher())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(volume, other.getVolume())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(numberOfVolumes, other.getNumberOfVolumes())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(numberOfPages, other.getNumberOfPages())) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(edition, other.getEdition());
|
||||
}
|
||||
|
||||
public boolean canEqual(final Object obj) {
|
||||
return obj instanceof PublicationWithPublisherProperties;
|
||||
}
|
||||
|
||||
public String toString(final String data) {
|
||||
|
||||
return (String.format("%s{ "
|
||||
+ "publisher = %s, "
|
||||
+ "isbn10 = \"%s\", "
|
||||
+ "isbn13 = \"%s\", "
|
||||
+ "volume = %d, "
|
||||
+ "numberOfVolumes = %d, "
|
||||
+ "numberOfPages = %d, "
|
||||
+ "edition = %s%s"
|
||||
+ "}",
|
||||
super.toString(),
|
||||
Objects.toString(publisher),
|
||||
isbn10,
|
||||
isbn13,
|
||||
volume,
|
||||
numberOfVolumes,
|
||||
numberOfPages,
|
||||
Objects.toString(edition),
|
||||
data));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return toString("");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms;
|
||||
package org.scientificcms.publications;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.assets;
|
||||
|
||||
import org.librecms.contentsection.Asset;
|
||||
import org.scientificcms.publications.BasicPublicationProperties;
|
||||
import org.scientificcms.publications.PublicationWithPublisherProperties;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "COLLECTED_VOLUMES", schema = DB_SCHEMA)
|
||||
public class CollectedVolume extends Asset {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private BasicPublicationProperties basicProperties;
|
||||
|
||||
private PublicationWithPublisherProperties withPublisherProperties;
|
||||
|
||||
public CollectedVolume() {
|
||||
|
||||
super();
|
||||
|
||||
basicProperties = new BasicPublicationProperties();
|
||||
withPublisherProperties = new PublicationWithPublisherProperties();
|
||||
}
|
||||
|
||||
public BasicPublicationProperties getBasicProperties() {
|
||||
return basicProperties;
|
||||
}
|
||||
|
||||
protected void setBasicProperties(
|
||||
final BasicPublicationProperties basicProperties) {
|
||||
this.basicProperties = basicProperties;
|
||||
}
|
||||
|
||||
public PublicationWithPublisherProperties getWithPublisherProperties() {
|
||||
return withPublisherProperties;
|
||||
}
|
||||
|
||||
protected void setWithPublisherProperties(
|
||||
final PublicationWithPublisherProperties withPublisherProperties) {
|
||||
this.withPublisherProperties = withPublisherProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 19 * hash + Objects.hashCode(basicProperties);
|
||||
hash = 19 * hash + Objects.hashCode(withPublisherProperties);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof CollectedVolume)) {
|
||||
return false;
|
||||
}
|
||||
final CollectedVolume other = (CollectedVolume) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(basicProperties, other.getBasicProperties())) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(withPublisherProperties,
|
||||
other.getWithPublisherProperties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
|
||||
return obj instanceof CollectedVolume;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
|
||||
return super.toString(String.format(
|
||||
"basicProperties = %s, "
|
||||
+ "withPublisherProperties = %s%s",
|
||||
Objects.toString(basicProperties),
|
||||
Objects.toString(
|
||||
withPublisherProperties),
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ import javax.persistence.JoinColumn;
|
|||
import javax.persistence.JoinTable;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.SciPublicationsConstants.*;
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
* Asset for storing informations about a journal.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.assets;
|
||||
|
||||
import org.librecms.contentsection.Asset;
|
||||
import org.scientificcms.publications.BasicPublicationProperties;
|
||||
import org.scientificcms.publications.PublicationWithPublisherProperties;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PROCEEDINGS", schema = DB_SCHEMA)
|
||||
public class Proceedings extends Asset {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private BasicPublicationProperties basicProperties;
|
||||
|
||||
private PublicationWithPublisherProperties withPublisherProperties;
|
||||
|
||||
@Column(name = "NAME_OF_CONFERENCE", length = 1024)
|
||||
private String nameOfConference;
|
||||
|
||||
@Column(name = "PLACE_OF_CONFERENCE", length = 1024)
|
||||
private String placeOfConference;
|
||||
|
||||
@Column(name = "START_DATE_OF_CONFERENCE")
|
||||
private LocalDate startDateOfConference;
|
||||
|
||||
@Column(name = "END_DATE_OF_CONFERENCE")
|
||||
private LocalDate endDateOfConference;
|
||||
|
||||
public Proceedings() {
|
||||
|
||||
super();
|
||||
|
||||
basicProperties = new BasicPublicationProperties();
|
||||
withPublisherProperties = new PublicationWithPublisherProperties();
|
||||
}
|
||||
|
||||
public BasicPublicationProperties getBasicProperties() {
|
||||
return basicProperties;
|
||||
}
|
||||
|
||||
protected void setBasicProperties(
|
||||
final BasicPublicationProperties basicProperties) {
|
||||
this.basicProperties = basicProperties;
|
||||
}
|
||||
|
||||
public PublicationWithPublisherProperties getWithPublisherProperties() {
|
||||
return withPublisherProperties;
|
||||
}
|
||||
|
||||
protected void setWithPublisherProperties(
|
||||
final PublicationWithPublisherProperties withPublisherProperties) {
|
||||
this.withPublisherProperties = withPublisherProperties;
|
||||
}
|
||||
|
||||
public String getNameOfConference() {
|
||||
return nameOfConference;
|
||||
}
|
||||
|
||||
public void setNameOfConference(final String nameOfConference) {
|
||||
this.nameOfConference = nameOfConference;
|
||||
}
|
||||
|
||||
public String getPlaceOfConference() {
|
||||
return placeOfConference;
|
||||
}
|
||||
|
||||
public void setPlaceOfConference(final String placeOfConference) {
|
||||
this.placeOfConference = placeOfConference;
|
||||
}
|
||||
|
||||
public LocalDate getStartDateOfConference() {
|
||||
return startDateOfConference;
|
||||
}
|
||||
|
||||
public void setStartDateOfConference(final LocalDate startDateOfConference) {
|
||||
this.startDateOfConference = startDateOfConference;
|
||||
}
|
||||
|
||||
public LocalDate getEndDateOfConference() {
|
||||
return endDateOfConference;
|
||||
}
|
||||
|
||||
public void setEndDateOfConference(final LocalDate endDateOfConference) {
|
||||
this.endDateOfConference = endDateOfConference;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 19 * hash + Objects.hashCode(basicProperties);
|
||||
hash = 19 * hash + Objects.hashCode(withPublisherProperties);
|
||||
hash = 19 * hash + Objects.hashCode(nameOfConference);
|
||||
hash = 19 * hash + Objects.hashCode(placeOfConference);
|
||||
hash = 19 * hash + Objects.hashCode(startDateOfConference);
|
||||
hash = 19 * hash + Objects.hashCode(endDateOfConference);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof Proceedings)) {
|
||||
return false;
|
||||
}
|
||||
final Proceedings other = (Proceedings) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(basicProperties, other.getBasicProperties())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(withPublisherProperties,
|
||||
other.getWithPublisherProperties())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(nameOfConference, other.getNameOfConference())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(placeOfConference, other.getPlaceOfConference())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(startDateOfConference,
|
||||
other.getStartDateOfConference())) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(endDateOfConference,
|
||||
other.getEndDateOfConference());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
|
||||
return obj instanceof Proceedings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
|
||||
return super.toString(String.format(
|
||||
"basicProperties = %s, "
|
||||
+ "withPublisherProperties = %s, "
|
||||
+ "nameOfConference = \"%s\", "
|
||||
+ "placeOfConference = \"%s\", "
|
||||
+ "startDateOfConference = \"%s\", "
|
||||
+ "endDateOfConference = \"%s\"%s",
|
||||
Objects.toString(basicProperties),
|
||||
Objects.toString(withPublisherProperties),
|
||||
nameOfConference,
|
||||
placeOfConference,
|
||||
Objects.toString(startDateOfConference),
|
||||
Objects.toString(endDateOfConference),
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@ import javax.persistence.Column;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.SciPublicationsConstants.*;
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
* An asset for storing the informations about a publisher required to create
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
import org.scientificcms.publications.assets.CollectedVolume;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "COLLECTED_VOLUME_ITEMS", schema = DB_SCHEMA)
|
||||
public class CollectedVolumeItem extends Publication {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "DATA_ID")
|
||||
private CollectedVolume publicationData;
|
||||
|
||||
public CollectedVolume getPublicationData() {
|
||||
return publicationData;
|
||||
}
|
||||
|
||||
protected void setPublicationData(final CollectedVolume publicationData) {
|
||||
this.publicationData = publicationData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 43 * hash + Objects.hashCode(publicationData);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof CollectedVolumeItem)) {
|
||||
return false;
|
||||
}
|
||||
final CollectedVolumeItem other = (CollectedVolumeItem) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(publicationData, other.getPublicationData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
|
||||
return obj instanceof CollectedVolumeItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
|
||||
return super.toString(String.format("data = %s%s",
|
||||
Objects.toString(publicationData),
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
import org.scientificcms.publications.assets.Proceedings;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PROCEEDINGS_ITEMS", schema = DB_SCHEMA)
|
||||
public class ProceedingsItem extends Publication {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "DATA_ID")
|
||||
private Proceedings publicationData;
|
||||
|
||||
public Proceedings getPublicationData() {
|
||||
return publicationData;
|
||||
}
|
||||
|
||||
protected void setPublicationData(final Proceedings publicationData) {
|
||||
this.publicationData = publicationData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 43 * hash + Objects.hashCode(publicationData);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof ProceedingsItem)) {
|
||||
return false;
|
||||
}
|
||||
final ProceedingsItem other = (ProceedingsItem) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(publicationData, other.getPublicationData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
|
||||
return obj instanceof ProceedingsItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
|
||||
return super.toString(String.format("data = %s%s",
|
||||
Objects.toString(publicationData),
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PUBLICATIONS", schema = DB_SCHEMA)
|
||||
public class Publication extends ContentItem {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
import org.librecms.contentsection.ContentItem;
|
||||
import org.scientificcms.publications.BasicPublicationProperties;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.Embedded;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import static org.scientificcms.publications.SciPublicationsConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "PUBLICATION_ITEMS", schema = DB_SCHEMA)
|
||||
public class PublicationItem extends Publication {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Embedded
|
||||
private BasicPublicationProperties basicProperties;
|
||||
|
||||
public PublicationItem() {
|
||||
|
||||
super();
|
||||
|
||||
basicProperties = new BasicPublicationProperties();
|
||||
}
|
||||
|
||||
public BasicPublicationProperties getBasicProperties() {
|
||||
return basicProperties;
|
||||
}
|
||||
|
||||
protected void setBasicProperties(
|
||||
final BasicPublicationProperties basicProperties) {
|
||||
|
||||
this.basicProperties = basicProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 59 * hash + Objects.hashCode(basicProperties);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof PublicationItem)) {
|
||||
return false;
|
||||
}
|
||||
final PublicationItem other = (PublicationItem) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(basicProperties, other.getBasicProperties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
|
||||
return obj instanceof PublicationItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
return super.toString(String.format("basicProperties = %s%s",
|
||||
Objects.toString(basicProperties),
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.scientificcms.publications.contenttypes;
|
||||
|
||||
import org.scientificcms.publications.PublicationWithPublisherProperties;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.persistence.Embedded;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
public class PublicationWithPublisher extends PublicationItem {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Embedded
|
||||
private PublicationWithPublisherProperties withPublisherProperties;
|
||||
|
||||
public PublicationWithPublisher() {
|
||||
|
||||
this.withPublisherProperties = new PublicationWithPublisherProperties();
|
||||
}
|
||||
|
||||
public PublicationWithPublisherProperties getWithPublisherProperties() {
|
||||
return withPublisherProperties;
|
||||
}
|
||||
|
||||
protected void setWithPublisherProperties(
|
||||
final PublicationWithPublisherProperties withPublisherProperties) {
|
||||
this.withPublisherProperties = withPublisherProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 79 * hash + Objects.hashCode(withPublisherProperties);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(this)) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof PublicationWithPublisher)) {
|
||||
return false;
|
||||
}
|
||||
final PublicationWithPublisher other = (PublicationWithPublisher) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(withPublisherProperties,
|
||||
other.getWithPublisherProperties());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
return obj instanceof PublicationWithPublisher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
|
||||
return super.toString(String.format("withPublisherProperties = %s%s",
|
||||
Objects.toString(
|
||||
withPublisherProperties),
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue