-
Notifications
You must be signed in to change notification settings - Fork 16
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 #273 from kbss-cvut/development
[2.1.0] Release
- Loading branch information
Showing
112 changed files
with
3,951 additions
and
334 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
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
28 changes: 28 additions & 0 deletions
28
jopa-api/src/main/java/cz/cvut/kbss/jopa/model/annotations/RDFContainer.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,28 @@ | ||
package cz.cvut.kbss.jopa.model.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Specifies mapping of an <a href="https://www.w3.org/TR/rdf12-schema/#ch_containervocab">RDF container</a>. | ||
* <p> | ||
* RDF containers are resources used to represent collections. In contrast to RDF collections, they are not closed, so | ||
* it is possible to add new items to them without having to reattach the container ending element. | ||
* <p> | ||
* Three types of RDF containers are defined, each with different convention-based semantics. | ||
* | ||
* @see RDFContainerType | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Target({ElementType.FIELD, ElementType.METHOD}) | ||
public @interface RDFContainer { | ||
|
||
/** | ||
* The type of the container. | ||
* | ||
* @return Type of the container | ||
*/ | ||
RDFContainerType type(); | ||
} |
29 changes: 29 additions & 0 deletions
29
jopa-api/src/main/java/cz/cvut/kbss/jopa/model/annotations/RDFContainerType.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,29 @@ | ||
package cz.cvut.kbss.jopa.model.annotations; | ||
|
||
/** | ||
* Types of RDF containers, as defined by <a href="https://www.w3.org/TR/rdf12-schema/#ch_containervocab">Section | ||
* 5.1</a> of the RDF Schema vocabulary. | ||
*/ | ||
public enum RDFContainerType { | ||
|
||
/** | ||
* The {@literal rdf:Alt} class is the class of RDF 'Alternative' containers. | ||
* <p> | ||
* While not formalized, it is conventionally used to indicate that the container is a list of alternatives and only | ||
* one of the will be used. | ||
*/ | ||
ALT, | ||
/** | ||
* The {@literal rdf:Bag} class is the class of RDF 'Bag' containers. | ||
* <p> | ||
* While not formalized, it is conventionally used to indicate that the container is unordered. | ||
*/ | ||
BAG, | ||
/** | ||
* The {@literal rdf:Seq} class is the class of RDF 'Sequence' containers. | ||
* <p> | ||
* While not formalized, it is conventionally used to indicate that the numerical ordering of the container | ||
* membership properties is intended to be significant. | ||
*/ | ||
SEQ | ||
} |
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
34 changes: 34 additions & 0 deletions
34
jopa-api/src/main/java/cz/cvut/kbss/jopa/model/metamodel/RDFContainerAttribute.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,34 @@ | ||
package cz.cvut.kbss.jopa.model.metamodel; | ||
|
||
import cz.cvut.kbss.jopa.NonJPA; | ||
import cz.cvut.kbss.jopa.model.annotations.RDFContainerType; | ||
|
||
/** | ||
* Instances of the type {@code RDFContainerAttribute} represent attributes mapped to RDF containers. | ||
* <p> | ||
* RDF containers may be represented by different collections, depending on the type of the container. While a | ||
* {@literal rdf:Seq} is likely to be represented by a {@link java.util.List}, as it allows duplicates but is ordered, a | ||
* {@literal rdf:Alt} represents a set of alternatives and will thus probably be represented by a {@link java.util.Set}, | ||
* possibly an implementation preserving order. A {@literal rdf:Bag} allows duplicates and is unordered, but will likely | ||
* be represented also by a {@link java.util.List}. | ||
* | ||
* @param <X> The type the represented collection belongs to | ||
* @param <C> Type of the collection | ||
* @param <E> The element type of the represented collection | ||
*/ | ||
@NonJPA | ||
public interface RDFContainerAttribute<X, C, E> extends PluralAttribute<X, C, E> { | ||
|
||
/** | ||
* Type of the RDF container represented by this attribute. | ||
* | ||
* @return RDF container type | ||
*/ | ||
@NonJPA | ||
RDFContainerType getContainerType(); | ||
|
||
@Override | ||
default boolean isRdfContainer() { | ||
return true; | ||
} | ||
} |
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
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.