-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from kbss-cvut/development
[2.16.1] Release
- Loading branch information
Showing
28 changed files
with
323 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/cz/cvut/kbss/termit/dto/listing/DocumentDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package cz.cvut.kbss.termit.dto.listing; | ||
|
||
import cz.cvut.kbss.jopa.model.annotations.OWLClass; | ||
import cz.cvut.kbss.jopa.model.annotations.util.NonEntity; | ||
import cz.cvut.kbss.jsonld.annotation.JsonLdAttributeOrder; | ||
import cz.cvut.kbss.termit.model.resource.Resource; | ||
import cz.cvut.kbss.termit.util.Vocabulary; | ||
|
||
@NonEntity | ||
@OWLClass(iri = Vocabulary.s_c_dokument) | ||
@JsonLdAttributeOrder({"uri", "label", "description", "files"}) | ||
public class DocumentDto extends Resource { | ||
} |
92 changes: 92 additions & 0 deletions
92
src/main/java/cz/cvut/kbss/termit/dto/listing/VocabularyDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package cz.cvut.kbss.termit.dto.listing; | ||
|
||
import cz.cvut.kbss.jopa.model.annotations.OWLAnnotationProperty; | ||
import cz.cvut.kbss.jopa.model.annotations.OWLClass; | ||
import cz.cvut.kbss.jopa.model.annotations.OWLObjectProperty; | ||
import cz.cvut.kbss.jopa.model.annotations.Types; | ||
import cz.cvut.kbss.jopa.model.annotations.util.NonEntity; | ||
import cz.cvut.kbss.jopa.vocabulary.DC; | ||
import cz.cvut.kbss.jsonld.annotation.JsonLdAttributeOrder; | ||
import cz.cvut.kbss.termit.model.AbstractEntity; | ||
|
||
import java.net.URI; | ||
import java.util.Objects; | ||
import java.util.Set; | ||
|
||
@NonEntity | ||
@OWLClass(iri = cz.cvut.kbss.termit.util.Vocabulary.s_c_slovnik) | ||
@JsonLdAttributeOrder({"uri", "label", "description"}) | ||
public class VocabularyDto extends AbstractEntity { | ||
|
||
@OWLAnnotationProperty(iri = DC.Terms.TITLE) | ||
private String label; | ||
|
||
@OWLAnnotationProperty(iri = DC.Terms.DESCRIPTION) | ||
private String description; | ||
|
||
@OWLObjectProperty(iri = cz.cvut.kbss.termit.util.Vocabulary.s_p_importuje_slovnik) | ||
private Set<URI> importedVocabularies; | ||
|
||
@OWLObjectProperty(iri = cz.cvut.kbss.termit.util.Vocabulary.s_p_popisuje_dokument) | ||
private DocumentDto document; | ||
|
||
@Types | ||
private Set<String> types; | ||
|
||
public String getLabel() { | ||
return label; | ||
} | ||
|
||
public void setLabel(String label) { | ||
this.label = label; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public Set<URI> getImportedVocabularies() { | ||
return importedVocabularies; | ||
} | ||
|
||
public void setImportedVocabularies(Set<URI> importedVocabularies) { | ||
this.importedVocabularies = importedVocabularies; | ||
} | ||
|
||
public DocumentDto getDocument() { | ||
return document; | ||
} | ||
|
||
public void setDocument(DocumentDto document) { | ||
this.document = document; | ||
} | ||
|
||
public Set<String> getTypes() { | ||
return types; | ||
} | ||
|
||
public void setTypes(Set<String> types) { | ||
this.types = types; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (!(o instanceof VocabularyDto)) { | ||
return false; | ||
} | ||
VocabularyDto that = (VocabularyDto) o; | ||
return Objects.equals(getUri(), that.getUri()); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(getUri()); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/cz/cvut/kbss/termit/dto/mapper/DtoMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cz.cvut.kbss.termit.dto.mapper; | ||
|
||
import cz.cvut.kbss.termit.dto.listing.DocumentDto; | ||
import cz.cvut.kbss.termit.dto.listing.VocabularyDto; | ||
import cz.cvut.kbss.termit.model.Vocabulary; | ||
import cz.cvut.kbss.termit.model.resource.Document; | ||
import org.mapstruct.Mapper; | ||
|
||
@Mapper(componentModel = "spring") | ||
public interface DtoMapper { | ||
|
||
DocumentDto documentToDocumentDto(Document document); | ||
|
||
VocabularyDto vocabularyToVocabularyDto(Vocabulary vocabulary); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.