├── .github
├── dependabot.yml
└── workflows
│ ├── cd-config.yml
│ └── ci-config.yml
├── .gitignore
├── .mvn
└── wrapper
│ ├── maven-wrapper.jar
│ └── maven-wrapper.properties
├── LICENSE
├── README.md
├── apps
├── openliberty
│ ├── README.md
│ ├── pom.xml
│ └── src
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── trellisldp
│ │ │ │ └── openliberty
│ │ │ │ ├── TrellisServiceSupplier.java
│ │ │ │ ├── WebApplication.java
│ │ │ │ └── package-info.java
│ │ ├── liberty
│ │ │ └── config
│ │ │ │ └── server.xml
│ │ └── webapp
│ │ │ └── WEB-INF
│ │ │ └── beans.xml
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── trellisldp
│ │ └── openliberty
│ │ └── TrellisApplicationIT.java
├── pom.xml
└── quarkus
│ ├── pom.xml
│ └── src
│ ├── main
│ ├── docker
│ │ └── Dockerfile.jvm
│ ├── java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── quarkus
│ │ │ ├── AuthorizationCache.java
│ │ │ ├── ProfileCache.java
│ │ │ ├── ServiceProviders.java
│ │ │ ├── TrellisApplication.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ └── beans.xml
│ │ └── application.properties
│ └── test
│ └── java
│ └── org
│ └── trellisldp
│ └── quarkus
│ ├── ApplicationTest.java
│ └── LdpTest.java
├── buildtools
└── src
│ └── main
│ └── resources
│ ├── checkstyle
│ ├── checkstyle.xml
│ └── suppressions.xml
│ ├── docker
│ ├── publishToDockerHub.sh
│ └── publishToGitHub.sh
│ ├── license
│ └── HEADER.txt
│ └── pmd
│ └── pmd.xml
├── doap.ttl
├── docs
├── CODE_OF_CONDUCT.md
└── CONTRIBUTING.md
├── mvnw
├── mvnw.cmd
├── pom.xml
├── report
└── pom.xml
├── trellis-api
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── api
│ │ │ ├── AuditService.java
│ │ │ ├── Binary.java
│ │ │ ├── BinaryMetadata.java
│ │ │ ├── BinaryService.java
│ │ │ ├── CacheService.java
│ │ │ ├── ConstraintService.java
│ │ │ ├── ConstraintViolation.java
│ │ │ ├── DefaultIdentifierService.java
│ │ │ ├── IOService.java
│ │ │ ├── IdentifierService.java
│ │ │ ├── MementoService.java
│ │ │ ├── Metadata.java
│ │ │ ├── NamespaceService.java
│ │ │ ├── NoopAuditService.java
│ │ │ ├── NoopCacheService.java
│ │ │ ├── NoopImplementation.java
│ │ │ ├── NoopMementoService.java
│ │ │ ├── NoopNamespaceService.java
│ │ │ ├── NoopNotificationSerializationService.java
│ │ │ ├── NoopNotificationService.java
│ │ │ ├── NoopResourceService.java
│ │ │ ├── Notification.java
│ │ │ ├── NotificationSerializationService.java
│ │ │ ├── NotificationService.java
│ │ │ ├── RDFFactory.java
│ │ │ ├── RDFaWriterService.java
│ │ │ ├── Resource.java
│ │ │ ├── ResourceService.java
│ │ │ ├── RetrievalService.java
│ │ │ ├── Session.java
│ │ │ ├── StorageConflictException.java
│ │ │ ├── Syntax.java
│ │ │ ├── TrellisRuntimeException.java
│ │ │ ├── TrellisUtils.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ └── beans.xml
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── api
│ │ ├── AuditServiceTest.java
│ │ ├── BinaryMetadataTest.java
│ │ ├── BinaryServiceTest.java
│ │ ├── ConstraintServiceTest.java
│ │ ├── ConstraintViolationTest.java
│ │ ├── DefaultIdentifierServiceTest.java
│ │ ├── MetadataTest.java
│ │ ├── NoopCacheServiceTest.java
│ │ ├── NoopMementoServiceTest.java
│ │ ├── NoopNamespaceServiceTest.java
│ │ ├── NoopNotificationSerializationServiceTest.java
│ │ ├── NoopNotificationServiceTest.java
│ │ ├── NoopResourceServiceTest.java
│ │ ├── RDFFactoryTest.java
│ │ ├── ResourceServiceTest.java
│ │ ├── ResourceTest.java
│ │ ├── SessionTest.java
│ │ ├── StorageConflictExceptionTest.java
│ │ ├── SyntaxTest.java
│ │ ├── TrellisRuntimeExceptionTest.java
│ │ └── TrellisUtilsTest.java
│ └── resources
│ └── simplelogger.properties
├── trellis-app
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── app
│ │ │ ├── AppUtils.java
│ │ │ ├── BaseServiceBundler.java
│ │ │ ├── ConstraintServices.java
│ │ │ ├── DefaultConstraintServices.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ └── beans.xml
│ │ └── org
│ │ └── trellisldp
│ │ └── app
│ │ └── banner.txt
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── app
│ │ ├── AppUtilsTest.java
│ │ ├── CDIConstraintServices.java
│ │ ├── CDIServiceBundlerTest.java
│ │ ├── DefaultConstraintServicesTest.java
│ │ └── TestServices.java
│ └── resources
│ ├── META-INF
│ └── microprofile-config.properties
│ └── simplelogger.properties
├── trellis-audit
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── audit
│ │ │ ├── DefaultAuditService.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ └── org.trellisldp.api.AuditService
│ └── test
│ └── java
│ └── org
│ └── trellisldp
│ └── audit
│ └── DefaultAuditServiceTest.java
├── trellis-bom
└── pom.xml
├── trellis-cache
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── module-info.java
│ │ └── org
│ │ └── trellisldp
│ │ └── cache
│ │ ├── TrellisCache.java
│ │ └── package-info.java
│ └── test
│ └── java
│ └── org
│ └── trellisldp
│ └── cache
│ └── TrellisCacheTest.java
├── trellis-cdi
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── cdi
│ │ │ ├── CDIConstraintServices.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ └── beans.xml
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── cdi
│ │ └── CDIConstraintServicesTest.java
│ └── resources
│ └── simplelogger.properties
├── trellis-common
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── common
│ │ │ ├── AcceptDatetime.java
│ │ │ ├── DefaultTimemapGenerator.java
│ │ │ ├── Forwarded.java
│ │ │ ├── HttpConstants.java
│ │ │ ├── HttpSession.java
│ │ │ ├── LdpResource.java
│ │ │ ├── Prefer.java
│ │ │ ├── Range.java
│ │ │ ├── RdfMediaType.java
│ │ │ ├── ServiceBundler.java
│ │ │ ├── SimpleNotification.java
│ │ │ ├── Slug.java
│ │ │ ├── TimemapGenerator.java
│ │ │ ├── TrellisExtensions.java
│ │ │ ├── TrellisRequest.java
│ │ │ ├── TrellisRoles.java
│ │ │ ├── Version.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ └── beans.xml
│ └── test
│ └── java
│ └── org
│ └── trellisldp
│ └── common
│ ├── AcceptDatetimeTest.java
│ ├── DefaultTimemapGeneratorTest.java
│ ├── ForwardedTest.java
│ ├── HttpSessionTest.java
│ ├── PreferTest.java
│ ├── RangeTest.java
│ ├── SimpleNotificationTest.java
│ ├── SlugTest.java
│ ├── TrellisExtensionsTest.java
│ ├── TrellisRequestTest.java
│ └── VersionTest.java
├── trellis-constraint
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── constraint
│ │ │ ├── LdpConstraintService.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ └── org.trellisldp.api.ConstraintService
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── constraint
│ │ └── LdpConstraintServiceTest.java
│ └── resources
│ ├── basicContainer.ttl
│ ├── hasAccessControlTriples.ttl
│ ├── hasInsertedContent.ttl
│ ├── hasLdpContainsTriples.ttl
│ ├── invalidCardinality.ttl
│ ├── invalidContainer1.ttl
│ ├── invalidContainer2.ttl
│ ├── invalidContainer3.ttl
│ ├── invalidDomain.ttl
│ ├── invalidInbox.ttl
│ ├── invalidMembershipTriple.ttl
│ ├── invalidMembershipTriple2.ttl
│ ├── invalidType.ttl
│ ├── noMemberRelationTriple.ttl
│ ├── simplelogger.properties
│ ├── tooManyMembershipTriples.ttl
│ └── withLdpType.ttl
├── trellis-file
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── file
│ │ │ ├── FileBinary.java
│ │ │ ├── FileBinaryService.java
│ │ │ ├── FileMementoService.java
│ │ │ ├── FileNamespaceService.java
│ │ │ ├── FileResource.java
│ │ │ ├── FileUtils.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ │ ├── org.trellisldp.api.BinaryService
│ │ │ ├── org.trellisldp.api.MementoService
│ │ │ └── org.trellisldp.api.NamespaceService
│ │ └── org
│ │ └── trellisldp
│ │ └── file
│ │ └── defaultNamespaces.json
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── file
│ │ ├── FileBinaryServiceTest.java
│ │ ├── FileMementoServiceTest.java
│ │ ├── FileNamespaceServiceTest.java
│ │ ├── FileResourceTest.java
│ │ └── FileUtilsTest.java
│ └── resources
│ ├── META-INF
│ └── microprofile-config.properties
│ ├── binary.nq
│ ├── invalidNamespaces.json
│ ├── ldpdc.nq
│ ├── ldpic.nq
│ ├── resource.nq
│ ├── simplelogger.properties
│ ├── test.txt
│ ├── testNamespaces.json
│ ├── thisIsNot.json
│ └── versions
│ ├── 29
│ └── 0f
│ │ └── 74
│ │ └── 22793c90657ff0d6897d0bfed824d573a9150d0ddc99ef6cd09c44352d44fede
│ │ └── .gitkeep
│ └── 35
│ └── 97
│ └── 1a
│ └── fe517414a7826a0b8551f5c9da8fa644a43a5b12caef407356f6a431192b5816
│ ├── 1487243701.nq
│ └── 1487243711.nq
├── trellis-http
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── http
│ │ │ ├── CacheControlFilter.java
│ │ │ ├── TrellisHttpFilter.java
│ │ │ ├── TrellisHttpResource.java
│ │ │ ├── WebApplicationExceptionMapper.java
│ │ │ ├── WebSubHeaderFilter.java
│ │ │ ├── impl
│ │ │ ├── BaseLdpHandler.java
│ │ │ ├── DeleteHandler.java
│ │ │ ├── GetConfiguration.java
│ │ │ ├── GetHandler.java
│ │ │ ├── HttpUtils.java
│ │ │ ├── MementoResource.java
│ │ │ ├── MutatingLdpHandler.java
│ │ │ ├── OptionsHandler.java
│ │ │ ├── PatchHandler.java
│ │ │ ├── PostHandler.java
│ │ │ ├── PutHandler.java
│ │ │ └── package-info.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ └── beans.xml
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── http
│ │ ├── AbstractTrellisHttpResourceTest.java
│ │ ├── BaseTrellisHttpResourceTest.java
│ │ ├── CacheControlFilterTest.java
│ │ ├── TestAuthenticationFilter.java
│ │ ├── TrellisHttpFilterTest.java
│ │ ├── TrellisHttpResourceAdminTest.java
│ │ ├── TrellisHttpResourceBaseUrlTest.java
│ │ ├── TrellisHttpResourceNoAgentTest.java
│ │ ├── TrellisHttpResourceTest.java
│ │ ├── TrellisHttpResourceUserTest.java
│ │ ├── WebSubHeaderFilterTest.java
│ │ └── impl
│ │ ├── BaseTestHandler.java
│ │ ├── DeleteHandlerTest.java
│ │ ├── GetHandlerTest.java
│ │ ├── HttpUtilsTest.java
│ │ ├── MementoResourceTest.java
│ │ ├── OptionsHandlerTest.java
│ │ ├── PatchHandlerTest.java
│ │ ├── PostHandlerTest.java
│ │ └── PutHandlerTest.java
│ └── resources
│ ├── META-INF
│ ├── microprofile-config.properties
│ └── services
│ │ └── org.trellisldp.api.AuditService
│ ├── emptyData.txt
│ ├── simpleData.txt
│ ├── simpleLiteral.ttl
│ ├── simpleTriple.ttl
│ └── simplelogger.properties
├── trellis-jdbc
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── jdbc
│ │ │ ├── DBHealthCheck.java
│ │ │ ├── DBNamespaceService.java
│ │ │ ├── DBResource.java
│ │ │ ├── DBResourceService.java
│ │ │ ├── DBUtils.java
│ │ │ ├── DBWrappedMementoService.java
│ │ │ ├── ResourceData.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ └── beans.xml
│ │ ├── db
│ │ └── migration
│ │ │ ├── V0.3__Trellis.sql
│ │ │ ├── V0.4__Trellis.sql
│ │ │ ├── V0.5__Trellis.sql
│ │ │ └── V0.6__Trellis.sql
│ │ └── org
│ │ └── trellisldp
│ │ └── jdbc
│ │ ├── initial_namespaces.csv
│ │ ├── initial_resource.csv
│ │ ├── initial_resource_mysql.csv
│ │ └── migrations.yml
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── jdbc
│ │ ├── DBHealthCheckTest.java
│ │ ├── DBNamespaceServiceTest.java
│ │ ├── DBResourceTest.java
│ │ ├── DBTestUtils.java
│ │ ├── DBUtilsTest.java
│ │ ├── DBWrappedMementoServiceTest.java
│ │ ├── ResourceDataTest.java
│ │ └── ResourceServiceTest.java
│ └── resources
│ ├── META-INF
│ └── microprofile-config.properties
│ ├── mementos
│ └── .gitkeep
│ └── simplelogger.properties
├── trellis-jena
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── jena
│ │ │ ├── JenaIOService.java
│ │ │ ├── NoopProfileCache.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ └── org.trellisldp.api.IOService
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── jena
│ │ ├── JenaIOServiceTest.java
│ │ └── NoopProfileCacheTest.java
│ └── resources
│ ├── simplelogger.properties
│ └── testRdf.ttl
├── trellis-jwt
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── jwt
│ │ │ ├── JwtAuthFilter.java
│ │ │ ├── WebIdPrincipal.java
│ │ │ ├── WebIdSecurityContext.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ └── beans.xml
│ └── test
│ └── java
│ └── org
│ └── trellisldp
│ └── jwt
│ ├── JwtAuthFilterTest.java
│ ├── WebIdPrincipalTest.java
│ └── WebIdSecurityContextTest.java
├── trellis-namespace
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── namespace
│ │ │ ├── SimpleNamespaceService.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ └── org.trellisldp.api.NamespaceService
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── namespace
│ │ └── SimpleNamespaceServiceTest.java
│ └── resources
│ └── simplelogger.properties
├── trellis-notification-jackson
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── notification
│ │ │ └── jackson
│ │ │ ├── ActivityStreamMessage.java
│ │ │ ├── DefaultNotificationSerializationService.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ └── org.trellisldp.api.NotificationSerializationService
│ └── test
│ └── java
│ └── org
│ └── trellisldp
│ └── notification
│ └── jackson
│ └── DefaultNotificationSerializationServiceTest.java
├── trellis-notification-jsonb
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── notification
│ │ │ └── jsonb
│ │ │ ├── ActivityStreamMessage.java
│ │ │ ├── DefaultNotificationSerializationService.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ └── org.trellisldp.api.NotificationSerializationService
│ └── test
│ └── java
│ └── org
│ └── trellisldp
│ └── notification
│ └── jsonb
│ └── DefaultNotificationSerializationServiceTest.java
├── trellis-parent
└── pom.xml
├── trellis-rdfa
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── rdfa
│ │ │ ├── DefaultRdfaWriterService.java
│ │ │ ├── HtmlData.java
│ │ │ ├── LabelledTriple.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ └── beans.xml
│ │ └── org
│ │ └── trellisldp
│ │ └── rdfa
│ │ ├── resource-table.mustache
│ │ └── resource.mustache
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── rdfa
│ │ ├── DefaultRdfaWriterServiceTest.java
│ │ └── LabelledTripleTest.java
│ └── resources
│ ├── META-INF
│ └── microprofile-config.properties
│ ├── resource-test.mustache
│ └── simplelogger.properties
├── trellis-reactive
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── reactive
│ │ │ ├── ReactiveNotificationService.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ └── beans.xml
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── reactive
│ │ ├── NotificationCollector.java
│ │ ├── ReactiveNotificationServiceTest.java
│ │ └── TestCollector.java
│ └── resources
│ └── simplelogger.properties
├── trellis-test
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── test
│ │ │ ├── AbstractApplicationAuditTests.java
│ │ │ ├── AbstractApplicationAuthTests.java
│ │ │ ├── AbstractApplicationEventTests.java
│ │ │ ├── AbstractApplicationLdpTests.java
│ │ │ ├── AbstractApplicationMementoTests.java
│ │ │ ├── AbstractResourceServiceTests.java
│ │ │ ├── AuditTests.java
│ │ │ ├── AuthAdministratorTests.java
│ │ │ ├── AuthAnonymousTests.java
│ │ │ ├── AuthCommonTests.java
│ │ │ ├── AuthOtherUserTests.java
│ │ │ ├── AuthUserTests.java
│ │ │ ├── CommonTests.java
│ │ │ ├── EventTests.java
│ │ │ ├── InMemoryBinaryService.java
│ │ │ ├── InMemoryResourceService.java
│ │ │ ├── LdpBasicContainerTests.java
│ │ │ ├── LdpBinaryTests.java
│ │ │ ├── LdpDirectContainerTests.java
│ │ │ ├── LdpIndirectContainerTests.java
│ │ │ ├── LdpRdfTests.java
│ │ │ ├── MementoBinaryTests.java
│ │ │ ├── MementoCommonTests.java
│ │ │ ├── MementoResourceTests.java
│ │ │ ├── MementoTimeGateTests.java
│ │ │ ├── MementoTimeMapTests.java
│ │ │ ├── ResourceServiceTests.java
│ │ │ ├── TestUtils.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── org
│ │ └── trellisldp
│ │ └── test
│ │ ├── annotation.ttl
│ │ ├── basicContainer.ttl
│ │ ├── childResource.ttl
│ │ ├── directContainer.ttl
│ │ ├── directContainerInverse.ttl
│ │ ├── directContainerIsPartOf.ttl
│ │ ├── indirectContainer.ttl
│ │ ├── indirectContainerInverse.ttl
│ │ ├── indirectContainerMemberSubject.ttl
│ │ ├── shex.jsonld
│ │ └── simpleResource.ttl
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── test
│ │ ├── InMemoryBinaryServiceTest.java
│ │ ├── InMemoryResourceServiceTest.java
│ │ └── TestUtilsTest.java
│ └── resources
│ └── simplelogger.properties
├── trellis-triplestore
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── triplestore
│ │ │ ├── RDFConnectionProvider.java
│ │ │ ├── TriplestoreHealthCheck.java
│ │ │ ├── TriplestoreResource.java
│ │ │ ├── TriplestoreResourceService.java
│ │ │ ├── TriplestoreUtils.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── beans.xml
│ │ └── services
│ │ └── org.trellisldp.api.ResourceService
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── triplestore
│ │ ├── RDFConnectionProviderTest.java
│ │ ├── ResourceServiceTest.java
│ │ ├── TriplestoreHealthCheckTest.java
│ │ ├── TriplestoreResourceServiceTest.java
│ │ ├── TriplestoreResourceTest.java
│ │ └── TriplestoreUtilsTest.java
│ └── resources
│ └── simplelogger.properties
├── trellis-vocabulary
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── module-info.java
│ │ └── org
│ │ └── trellisldp
│ │ └── vocabulary
│ │ ├── ACL.java
│ │ ├── AS.java
│ │ ├── DC.java
│ │ ├── FOAF.java
│ │ ├── JSONLD.java
│ │ ├── LDP.java
│ │ ├── Memento.java
│ │ ├── OA.java
│ │ ├── PROV.java
│ │ ├── RDF.java
│ │ ├── RDFS.java
│ │ ├── SKOS.java
│ │ ├── Time.java
│ │ ├── Trellis.java
│ │ ├── VCARD.java
│ │ ├── VocabUtils.java
│ │ ├── XSD.java
│ │ └── package-info.java
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── vocabulary
│ │ ├── ACLTest.java
│ │ ├── ASTest.java
│ │ ├── AbstractVocabularyTest.java
│ │ ├── DCTest.java
│ │ ├── FOAFTest.java
│ │ ├── JSONLDTest.java
│ │ ├── LDPTest.java
│ │ ├── MementoTest.java
│ │ ├── OATest.java
│ │ ├── PROVTest.java
│ │ ├── RDFSTest.java
│ │ ├── RDFTest.java
│ │ ├── SKOSTest.java
│ │ ├── TimeTest.java
│ │ ├── TrellisTest.java
│ │ ├── VCARDTest.java
│ │ └── XSDTest.java
│ └── resources
│ └── simplelogger.properties
├── trellis-webac
├── README.md
├── bnd.bnd
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ ├── module-info.java
│ │ └── org
│ │ │ └── trellisldp
│ │ │ └── webac
│ │ │ ├── Authorization.java
│ │ │ ├── AuthorizedModes.java
│ │ │ ├── WebAcFilter.java
│ │ │ ├── WebAcService.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ └── beans.xml
│ │ └── org
│ │ └── trellisldp
│ │ └── webac
│ │ └── defaultAcl.ttl
│ └── test
│ ├── java
│ └── org
│ │ └── trellisldp
│ │ └── webac
│ │ ├── AuthorizationTest.java
│ │ ├── WebAcFilterTest.java
│ │ └── WebAcServiceTest.java
│ └── resources
│ ├── META-INF
│ └── microprofile-config.properties
│ ├── badTurtle.ttl
│ ├── customAcl.ttl
│ └── simplelogger.properties
└── trellis-webdav
├── README.md
├── bnd.bnd
├── pom.xml
└── src
├── main
└── java
│ ├── module-info.java
│ └── org
│ └── trellisldp
│ └── webdav
│ ├── COPY.java
│ ├── Depth.java
│ ├── MOVE.java
│ ├── PROPFIND.java
│ ├── PROPPATCH.java
│ ├── TrellisWebDAV.java
│ ├── TrellisWebDAVRequestFilter.java
│ ├── TrellisWebDAVResponseFilter.java
│ ├── impl
│ ├── WebDAVUtils.java
│ └── package-info.java
│ ├── package-info.java
│ └── xml
│ ├── DavAllProp.java
│ ├── DavMultiStatus.java
│ ├── DavProp.java
│ ├── DavPropFind.java
│ ├── DavPropName.java
│ ├── DavPropStat.java
│ ├── DavPropertyUpdate.java
│ ├── DavRemove.java
│ ├── DavResponse.java
│ ├── DavSet.java
│ ├── DavUtils.java
│ └── package-info.java
└── test
├── java
└── org
│ └── trellisldp
│ └── webdav
│ ├── AbstractWebDAVTest.java
│ ├── DepthTest.java
│ ├── TrellisWebDAVRequestFilterTest.java
│ ├── WebDAVNoBaseUrlTest.java
│ ├── WebDAVTest.java
│ └── impl
│ └── WebDAVUtilsTest.java
└── resources
└── simplelogger.properties
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "maven"
4 | directory: "/"
5 | schedule:
6 | interval: "weekly"
7 | - package-ecosystem: "github-actions"
8 | directory: "/"
9 | schedule:
10 | interval: "monthly"
11 |
--------------------------------------------------------------------------------
/.github/workflows/ci-config.yml:
--------------------------------------------------------------------------------
1 | name: GitHub CI
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - main
7 |
8 |
9 | jobs:
10 | build:
11 | name: Java ${{ matrix.java }} environment
12 | runs-on: ubuntu-latest
13 | strategy:
14 | matrix:
15 | java: [11, 17]
16 |
17 | steps:
18 | - uses: actions/checkout@v4
19 | - name: Set up JDK ${{ matrix.java }}
20 | uses: actions/setup-java@v4
21 | with:
22 | distribution: 'temurin'
23 | java-version: ${{ matrix.java }}
24 | cache: 'maven'
25 |
26 | - name: Build with Maven
27 | run: ./mvnw -B -ntp verify javadoc:javadoc
28 | env:
29 | QUARKUS_DATASOURCE_USERNAME: postgres
30 | QUARKUS_DATASOURCE_PASSWORD: postgres
31 | QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://localhost/trellis
32 |
33 | windows:
34 | name: Windows environment
35 | runs-on: windows-latest
36 | steps:
37 | - uses: actions/checkout@v4
38 | - name: Set up JDK 17
39 | uses: actions/setup-java@v4
40 | with:
41 | distribution: 'temurin'
42 | java-version: 17
43 | cache: 'maven'
44 |
45 | - name: Build with Maven
46 | shell: bash
47 | run: ./mvnw.cmd -B -ntp verify
48 |
49 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | */*/docs/
3 | .classpath
4 | .project
5 | .settings/
6 | .DS_Store
7 | **/bin/
8 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trellis-ldp/trellis/ffa17e400a4f9d5a5dc116a3fcf87c52575d8939/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
19 |
--------------------------------------------------------------------------------
/apps/openliberty/README.md:
--------------------------------------------------------------------------------
1 | # Trellis Triplestore-based Application
2 |
3 | This project generates a deployable Trellis application, using a triplestore for persistence.
4 |
5 | The application produced here builds upon [Eclipse MicroProfile](https://microprofile.io/),
6 | specifically the [Open Liberty](https://openliberty.io/) platform.
7 |
8 |
--------------------------------------------------------------------------------
/apps/openliberty/src/main/java/org/trellisldp/openliberty/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * A MicroProfile-based Trellis application.
18 | */
19 | package org.trellisldp.openliberty;
20 |
--------------------------------------------------------------------------------
/apps/openliberty/src/main/liberty/config/server.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | microProfile-6.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/apps/openliberty/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/apps/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 |
6 | org.trellisldp
7 | trellis-parent
8 | 0.20.0-SNAPSHOT
9 | ../trellis-parent
10 |
11 |
12 | org.trellisldp
13 | trellis-apps-parent
14 | 0.20.0-SNAPSHOT
15 | Trellis Apps parent
16 | https://www.trellisldp.org
17 |
18 |
19 | Trellis LDP server: apps parent
20 |
21 | pom
22 |
23 |
24 | quarkus
25 | openliberty
26 |
27 |
28 |
29 |
30 |
31 | org.apache.maven.plugins
32 | maven-deploy-plugin
33 |
34 | true
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/apps/quarkus/src/main/docker/Dockerfile.jvm:
--------------------------------------------------------------------------------
1 | ####
2 | # This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
3 | #
4 | # Before building the docker image run:
5 | #
6 | # ./mvnw package
7 | #
8 | # Then, build the image with:
9 | #
10 | # docker build -f src/main/docker/Dockerfile.jvm -t trellisldp/trellis- .
11 | #
12 | # Then run the container using:
13 | #
14 | # docker run -i --rm -p 8080:8080 trellisldp/trellis-
15 | #
16 | ###
17 | FROM eclipse-temurin:17-jre-alpine
18 | LABEL maintainer="Aaron Coburn "
19 |
20 | ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -XX:+ExitOnOutOfMemoryError -Dcom.github.jsonldjava.disallowRemoteContextLoading=true"
21 |
22 | COPY target/quarkus-app/lib/ /trellis/lib/
23 | COPY target/quarkus-app/app/ /trellis/app/
24 | COPY target/quarkus-app/quarkus/ /trellis/quarkus/
25 | COPY target/quarkus-app/quarkus-run.jar /trellis/app.jar
26 |
27 | WORKDIR /trellis/
28 |
29 | ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]
30 |
31 |
--------------------------------------------------------------------------------
/apps/quarkus/src/main/java/org/trellisldp/quarkus/TrellisApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.quarkus;
17 |
18 | import static org.trellisldp.app.AppUtils.printBanner;
19 |
20 | import jakarta.annotation.PostConstruct;
21 | import jakarta.enterprise.context.ApplicationScoped;
22 | import jakarta.ws.rs.ApplicationPath;
23 | import jakarta.ws.rs.core.Application;
24 |
25 | /**
26 | * Web Application wrapper.
27 | */
28 | @ApplicationPath("/")
29 | @ApplicationScoped
30 | public class TrellisApplication extends Application {
31 |
32 | @PostConstruct
33 | void init() {
34 | printBanner("Trellis Application", "org/trellisldp/app/banner.txt");
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/apps/quarkus/src/main/java/org/trellisldp/quarkus/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * A MicroProfile-based Trellis application.
18 | */
19 | package org.trellisldp.quarkus;
20 |
--------------------------------------------------------------------------------
/apps/quarkus/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/apps/quarkus/src/test/java/org/trellisldp/quarkus/LdpTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.quarkus;
17 |
18 | import static jakarta.ws.rs.client.ClientBuilder.newBuilder;
19 |
20 | import io.quarkus.test.common.http.TestHTTPResource;
21 | import io.quarkus.test.junit.QuarkusTest;
22 |
23 | import jakarta.ws.rs.client.Client;
24 |
25 | import java.net.URL;
26 |
27 | import org.trellisldp.test.AbstractApplicationLdpTests;
28 |
29 | @QuarkusTest
30 | class LdpTest extends AbstractApplicationLdpTests {
31 |
32 | private static final Client client = newBuilder().build();
33 |
34 | @TestHTTPResource
35 | URL url;
36 |
37 | @Override
38 | public Client getClient() {
39 | return client;
40 | }
41 |
42 | @Override
43 | public String getBaseURL() {
44 | return url.toString();
45 | }
46 | }
47 |
48 |
49 |
--------------------------------------------------------------------------------
/buildtools/src/main/resources/checkstyle/suppressions.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/buildtools/src/main/resources/docker/publishToDockerHub.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION=$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)
4 | BRANCH=$(git branch 2>/dev/null | sed -n -e 's/^\* \(.*\)/\1/p')
5 |
6 | ##################################
7 | # Quarkus-based triplestore image
8 | ##################################
9 | IMAGE=trellisldp/trellis-triplestore
10 |
11 | ./mvnw package -pl apps/quarkus -am -Ppublish
12 |
13 | TAG=latest
14 | # Use the develop tag for snapshots
15 | if [[ $VERSION == *SNAPSHOT* ]]; then
16 | TAG=develop
17 | fi
18 |
19 | cd apps/quarkus
20 | # Don't use latest/develop tags for maintenance branches
21 | if [[ $BRANCH == *.x ]]; then
22 | docker build -f src/main/docker/Dockerfile.jvm -t "$IMAGE:$VERSION" .
23 | docker push "$IMAGE:$VERSION"
24 | else
25 | docker build -f src/main/docker/Dockerfile.jvm -t "$IMAGE:$TAG" -t "$IMAGE:$VERSION" .
26 | docker push "$IMAGE:$TAG"
27 | docker push "$IMAGE:$VERSION"
28 | fi
29 |
30 |
--------------------------------------------------------------------------------
/buildtools/src/main/resources/docker/publishToGitHub.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | VERSION=$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)
4 |
5 | # Publish releases only
6 | if [[ $VERSION != *SNAPSHOT* ]]; then
7 |
8 | ./mvnw package -pl apps/quarkus -am -Ppublish
9 |
10 | cd apps/quarkus
11 | ##################################
12 | # Quarkus-based triplestore image
13 | ##################################
14 | IMAGE=docker.pkg.github.com/trellis-ldp/trellis/trellis-triplestore
15 |
16 | docker build -f src/main/docker/Dockerfile.jvm -t "$IMAGE:$VERSION" .
17 | docker push "$IMAGE:$VERSION"
18 | fi
19 |
20 |
--------------------------------------------------------------------------------
/buildtools/src/main/resources/license/HEADER.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) Aaron Coburn and individual contributors
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/buildtools/src/main/resources/pmd/pmd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 | Trellis PMD rules
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/trellis-api/README.md:
--------------------------------------------------------------------------------
1 | # trellis-api
2 |
3 | The core APIs for a Trellis-based linked data server. This module provides the core abstractions and interfaces for a Trellis server.
4 |
--------------------------------------------------------------------------------
/trellis-api/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)", \
15 | osgi.serviceloader; \
16 | filter:="(osgi.serviceloader=org.apache.commons.rdf.api.RDF)"; \
17 | resolution:=mandatory
18 |
19 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.api {
17 | exports org.trellisldp.api;
18 |
19 | requires jakarta.cdi;
20 | requires jakarta.inject;
21 | requires org.apache.commons.rdf.api;
22 |
23 | uses org.apache.commons.rdf.api.RDF;
24 | }
25 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/Binary.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import java.io.InputStream;
19 |
20 | /**
21 | * The non-RDF content of an LDP NonRDFSource.
22 | *
23 | */
24 | public interface Binary {
25 |
26 | /**
27 | * @return the content of this {@link Binary}
28 | */
29 | InputStream getContent();
30 |
31 | /**
32 | * @param from the point in bytes from which to begin content
33 | * @param to the point in bytes at which to end content
34 | * @return content from {@code from} to {@code to} inclusive
35 | */
36 | InputStream getContent(int from, int to);
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NamespaceService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import java.util.Map;
19 |
20 | /**
21 | * Namespaces may be stored globally across the server, and the NamespaceService
22 | * provides a mechanism for retrieving and setting namespace values.
23 | *
24 | * @author acoburn
25 | */
26 | public interface NamespaceService {
27 |
28 | /**
29 | * Fetch the entire namespace mapping.
30 | *
31 | * @return the namespace mapping as prefix, namespace pairs
32 | */
33 | Map getNamespaces();
34 |
35 | /**
36 | * Set the namespace for a given prefix.
37 | *
38 | * @param prefix the prefix
39 | * @param namespace the namespace
40 | * @return whether the new prefix was set
41 | */
42 | boolean setPrefix(String prefix, String namespace);
43 | }
44 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NoopAuditService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | /**
19 | * For use when audit functionality is not desired.
20 | *
21 | * @author ajs6f
22 | *
23 | */
24 | @NoopImplementation
25 | public class NoopAuditService implements AuditService {
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NoopCacheService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import java.util.function.Function;
19 |
20 | /**
21 | * A no-op (pass-through) cache service for Trellis.
22 | * @param the type of key to use
23 | * @param the type of value to cache
24 | */
25 | public class NoopCacheService implements CacheService {
26 |
27 | @Override
28 | public V get(final K key, final Function mappingFunction) {
29 | return mappingFunction.apply(key);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NoopImplementation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import static java.lang.annotation.ElementType.FIELD;
19 | import static java.lang.annotation.ElementType.METHOD;
20 | import static java.lang.annotation.ElementType.PARAMETER;
21 | import static java.lang.annotation.ElementType.TYPE;
22 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
23 |
24 | import jakarta.enterprise.context.ApplicationScoped;
25 | import jakarta.inject.Qualifier;
26 |
27 | import java.lang.annotation.Retention;
28 | import java.lang.annotation.Target;
29 |
30 | /**
31 | * Marks a no-op implementation of a Trellis component.
32 | *
33 | *
Such implementations are expected to avoid persisting any data beyond the lifetime of the running application.
34 | */
35 | @Qualifier
36 | @Retention(RUNTIME)
37 | @Target({TYPE, METHOD, FIELD, PARAMETER})
38 | @ApplicationScoped
39 | public @interface NoopImplementation {}
40 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NoopNamespaceService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import java.util.Collections;
19 | import java.util.Map;
20 |
21 | /**
22 | * A {@link NamespaceService} that stores nothing and offers nothing.
23 | *
24 | * @author ajs6f
25 | *
26 | */
27 | @NoopImplementation
28 | public class NoopNamespaceService implements NamespaceService {
29 |
30 | @Override
31 | public Map getNamespaces() {
32 | return Collections.emptyMap();
33 | }
34 |
35 | @Override
36 | public boolean setPrefix(final String prefix, final String namespace) {
37 | return true;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NoopNotificationService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | /**
19 | * For use when a notification service is not desired.
20 | */
21 | @NoopImplementation
22 | public class NoopNotificationService implements NotificationService {
23 |
24 | @Override
25 | public void emit(final Notification notification) {
26 | // no-op.
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NotificationSerializationService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | /**
19 | * A service interface for serializing an {@link Notification} object into a
20 | * {@link String} suitable for an external notification processor.
21 | *
22 | * @author acoburn
23 | */
24 | public interface NotificationSerializationService {
25 |
26 | /**
27 | * Serialize a notification object into some concrete syntax.
28 | *
29 | * @param notification the notification
30 | * @return a serialization
31 | */
32 | String serialize(Notification notification);
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/NotificationService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | /**
19 | * The NotificationService provides a mechanism by which notifications can be emitted
20 | * to a message broker.
21 | *
22 | * @author acoburn
23 | */
24 | public interface NotificationService {
25 |
26 | /**
27 | * Emit a notification to the notification service.
28 | *
29 | * @param notification the notification
30 | */
31 | void emit(Notification notification);
32 | }
33 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/RDFFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import static java.util.ServiceLoader.load;
19 |
20 | import org.apache.commons.rdf.api.RDF;
21 |
22 | /**
23 | * A factory method for loading and providing the RDF Commons implementation object.
24 | */
25 | public final class RDFFactory {
26 |
27 | private static final RDF rdf = load(RDF.class).findFirst()
28 | .orElseThrow(() -> new TrellisRuntimeException("No RDF Commons implementation available!"));
29 |
30 | /**
31 | * Get the Commons RDF instance in use.
32 | *
33 | * @return the RDF instance
34 | */
35 | public static RDF getInstance() {
36 | return rdf;
37 | }
38 |
39 | private RDFFactory() {
40 | // Prevent instantiation.
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/RDFaWriterService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import java.io.OutputStream;
19 | import java.util.stream.Stream;
20 |
21 | import org.apache.commons.rdf.api.Triple;
22 |
23 | /**
24 | * A service for generating HTML output from a stream of triples.
25 | */
26 | public interface RDFaWriterService {
27 |
28 | /**
29 | * Produce RDFa (HTML) output from a given stream of triples.
30 | * @param triples the triples
31 | * @param output the output stream
32 | * @param subject the subject of the resource, may be {@code null}
33 | */
34 | void write(Stream triples, OutputStream output, String subject);
35 | }
36 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/RetrievalService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import java.util.concurrent.CompletionStage;
19 |
20 | import org.apache.commons.rdf.api.IRI;
21 |
22 | /**
23 | * A service that can retrieve resources of some type, featuring optional
24 | * retrieval by time.
25 | *
26 | * @author ajs6f
27 | * @param the type of resource available from this service
28 | */
29 | public interface RetrievalService {
30 |
31 | /**
32 | * Get a resource by the given identifier.
33 | *
34 | * @param identifier the resource identifier
35 | * @return the resource
36 | */
37 | CompletionStage extends T> get(IRI identifier);
38 | }
39 |
--------------------------------------------------------------------------------
/trellis-api/src/main/java/org/trellisldp/api/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis Application Programming Interfaces
18 | *
19 | *
This package provides the core resource abstractions used to describe
20 | * Trellis resources.
21 | *
22 | * @author acoburn
23 | */
24 | package org.trellisldp.api;
25 |
--------------------------------------------------------------------------------
/trellis-api/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-api/src/test/java/org/trellisldp/api/AuditServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import static org.junit.jupiter.api.Assertions.assertTrue;
19 |
20 | import org.junit.jupiter.api.Test;
21 |
22 | class AuditServiceTest {
23 |
24 | @Test
25 | void testNullAuditService() {
26 | final AuditService svc = new NoopAuditService();
27 | assertTrue(svc.creation(null, null).isEmpty(), "Audit triples were generated for a create event");
28 | assertTrue(svc.deletion(null, null).isEmpty(), "Audit triples were generated for a delete event");
29 | assertTrue(svc.update(null, null).isEmpty(), "Audit triples were generated for an update event");
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/trellis-api/src/test/java/org/trellisldp/api/NoopNamespaceServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import static org.junit.jupiter.api.Assertions.assertTrue;
19 |
20 | import org.junit.jupiter.api.Test;
21 |
22 | class NoopNamespaceServiceTest {
23 |
24 | @Test
25 | void noAction() {
26 | final NamespaceService testService = new NoopNamespaceService();
27 | testService.setPrefix("foo", "http://bar/");
28 | assertTrue(testService.getNamespaces().isEmpty(), "Namespace list not empty in no-op service!");
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/trellis-api/src/test/java/org/trellisldp/api/NoopNotificationServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import static org.junit.jupiter.api.Assertions.fail;
19 |
20 | import org.junit.jupiter.api.Test;
21 | import org.junit.jupiter.api.extension.ExtendWith;
22 | import org.mockito.Mock;
23 | import org.mockito.junit.jupiter.MockitoExtension;
24 |
25 | /**
26 | * Test the no-op notification service.
27 | */
28 | @ExtendWith(MockitoExtension.class)
29 | class NoopNotificationServiceTest {
30 |
31 | @Mock
32 | private Notification mockNotification;
33 |
34 | @Test
35 | void testNoopNotificationSvc() {
36 | try {
37 | final NotificationService svc = new NoopNotificationService();
38 | svc.emit(mockNotification);
39 | } catch (final Exception ex) {
40 | fail("Notification serialization failed! " + ex.getMessage());
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/trellis-api/src/test/java/org/trellisldp/api/RDFFactoryTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import static org.junit.jupiter.api.Assertions.*;
19 |
20 | import org.apache.commons.rdf.api.RDF;
21 | import org.junit.jupiter.api.Test;
22 |
23 | class RDFFactoryTest {
24 |
25 | private static final RDF rdf = RDFFactory.getInstance();
26 |
27 | @Test
28 | void testGetInstance() {
29 | assertNotNull(rdf, "RDF instance is null!");
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/trellis-api/src/test/java/org/trellisldp/api/SessionTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.api;
17 |
18 | import static org.junit.jupiter.api.Assertions.*;
19 | import static org.mockito.Mockito.*;
20 |
21 | import org.junit.jupiter.api.Test;
22 | import org.junit.jupiter.api.extension.ExtendWith;
23 | import org.mockito.Mock;
24 | import org.mockito.junit.jupiter.MockitoExtension;
25 |
26 | @ExtendWith(MockitoExtension.class)
27 | class SessionTest {
28 |
29 | @Mock
30 | private Session mockSession;
31 |
32 | @Test
33 | void testSession() {
34 | doCallRealMethod().when(mockSession).getDelegatedBy();
35 | doCallRealMethod().when(mockSession).getClientIdentifier();
36 |
37 | assertFalse(mockSession.getDelegatedBy().isPresent());
38 | assertFalse(mockSession.getClientIdentifier().isPresent());
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/trellis-api/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-app/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 |
--------------------------------------------------------------------------------
/trellis-app/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.app {
17 | exports org.trellisldp.app;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.common;
21 | requires org.trellisldp.vocabulary;
22 |
23 | requires jakarta.inject;
24 | requires jakarta.cdi;
25 |
26 | requires org.slf4j;
27 |
28 | opens org.trellisldp.app;
29 | }
30 |
--------------------------------------------------------------------------------
/trellis-app/src/main/java/org/trellisldp/app/ConstraintServices.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.app;
17 |
18 | import org.trellisldp.api.ConstraintService;
19 |
20 | /**
21 | * A grouping of {@link ConstraintService}s that can be iterated over.
22 | */
23 | public interface ConstraintServices extends Iterable {
24 | }
25 |
--------------------------------------------------------------------------------
/trellis-app/src/main/java/org/trellisldp/app/DefaultConstraintServices.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.app;
17 |
18 | import java.util.Collection;
19 | import java.util.Iterator;
20 |
21 | import org.trellisldp.api.ConstraintService;
22 |
23 | /**
24 | * A default ConstraintServices implementation, using a backing {@link Collection}.
25 | */
26 | public class DefaultConstraintServices implements ConstraintServices {
27 |
28 | private final Collection services;
29 |
30 | /**
31 | * Create a ConstraintServices object.
32 | * @param services the constraint services.
33 | */
34 | public DefaultConstraintServices(final Collection services) {
35 | this.services = services;
36 | }
37 |
38 | @Override
39 | public Iterator iterator() {
40 | return services.iterator();
41 | }
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/trellis-app/src/main/java/org/trellisldp/app/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Shared Trellis components for building a deployable application.
18 | */
19 | package org.trellisldp.app;
20 |
--------------------------------------------------------------------------------
/trellis-app/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-app/src/test/java/org/trellisldp/app/CDIConstraintServices.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.app;
17 |
18 | import jakarta.enterprise.context.ApplicationScoped;
19 | import jakarta.enterprise.inject.Instance;
20 | import jakarta.inject.Inject;
21 |
22 | import java.util.Iterator;
23 |
24 | import org.trellisldp.api.ConstraintService;
25 |
26 | @ApplicationScoped
27 | public class CDIConstraintServices implements ConstraintServices {
28 |
29 | @Inject
30 | protected Instance constraintServices;
31 |
32 | @Override
33 | public Iterator iterator() {
34 | return constraintServices.iterator();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/trellis-app/src/test/java/org/trellisldp/app/DefaultConstraintServicesTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.app;
17 |
18 | import static java.util.Collections.emptyList;
19 | import static java.util.Collections.singletonList;
20 | import static org.junit.jupiter.api.Assertions.*;
21 |
22 | import org.junit.jupiter.api.Test;
23 | import org.trellisldp.constraint.LdpConstraintService;
24 |
25 | class DefaultConstraintServicesTest {
26 |
27 | @Test
28 | void testEmptyServices() {
29 | final ConstraintServices svcs = new DefaultConstraintServices(emptyList());
30 | assertFalse(svcs.iterator().hasNext());
31 | }
32 |
33 | @Test
34 | void testSingleServices() {
35 | final ConstraintServices svcs = new DefaultConstraintServices(singletonList(new LdpConstraintService()));
36 | assertTrue(svcs.iterator().hasNext());
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/trellis-app/src/test/java/org/trellisldp/app/TestServices.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.app;
17 |
18 | import jakarta.enterprise.context.ApplicationScoped;
19 | import jakarta.enterprise.inject.Produces;
20 |
21 | import org.trellisldp.api.*;
22 |
23 | @ApplicationScoped
24 | class TestServices {
25 |
26 | @Produces
27 | NamespaceService namespaces = new NoopNamespaceService();
28 |
29 | @Produces
30 | ResourceService resources = new NoopResourceService();
31 |
32 | @Produces
33 | AuditService audit = new NoopAuditService();
34 |
35 | @Produces
36 | NotificationService notifications = new NoopNotificationService();
37 | }
38 |
--------------------------------------------------------------------------------
/trellis-app/src/test/resources/META-INF/microprofile-config.properties:
--------------------------------------------------------------------------------
1 | trellis.triplestore.ldp-type=true
2 | trellis.triplestore.rdf-location=resources
3 | trellis.file.memento-path=mementos
4 | trellis.file.binary-path=binary
5 |
--------------------------------------------------------------------------------
/trellis-app/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-audit/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional
17 | Provide-Capability: osgi.serviceloader; \
18 | osgi.serviceloader=org.trellisldp.api.AuditService
19 |
20 |
--------------------------------------------------------------------------------
/trellis-audit/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.audit {
17 | exports org.trellisldp.audit;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.vocabulary;
21 |
22 | requires jakarta.cdi;
23 | requires org.apache.commons.rdf.api;
24 |
25 | provides org.trellisldp.api.AuditService
26 | with org.trellisldp.audit.DefaultAuditService;
27 | }
28 |
--------------------------------------------------------------------------------
/trellis-audit/src/main/java/org/trellisldp/audit/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis Audit data writer
18 | *
19 | *
A package used for generating audit-related triples based on server events.
20 | *
21 | * @author acoburn
22 | */
23 | package org.trellisldp.audit;
24 |
--------------------------------------------------------------------------------
/trellis-audit/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-audit/src/main/resources/META-INF/services/org.trellisldp.api.AuditService:
--------------------------------------------------------------------------------
1 | org.trellisldp.audit.DefaultAuditService
2 |
--------------------------------------------------------------------------------
/trellis-cache/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 |
--------------------------------------------------------------------------------
/trellis-cache/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.cache {
17 | exports org.trellisldp.cache;
18 |
19 | requires org.trellisldp.api;
20 |
21 | requires com.google.common;
22 | }
23 |
--------------------------------------------------------------------------------
/trellis-cache/src/main/java/org/trellisldp/cache/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Guava-based in-memory cache component.
18 | */
19 | package org.trellisldp.cache;
20 |
--------------------------------------------------------------------------------
/trellis-cdi/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 |
--------------------------------------------------------------------------------
/trellis-cdi/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.cdi {
17 | exports org.trellisldp.cdi;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.app;
21 |
22 | requires jakarta.inject;
23 | requires jakarta.cdi;
24 |
25 | opens org.trellisldp.cdi;
26 | }
27 |
--------------------------------------------------------------------------------
/trellis-cdi/src/main/java/org/trellisldp/cdi/CDIConstraintServices.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.cdi;
17 |
18 | import jakarta.enterprise.context.ApplicationScoped;
19 | import jakarta.enterprise.inject.Instance;
20 | import jakarta.inject.Inject;
21 |
22 | import java.util.Iterator;
23 |
24 | import org.trellisldp.api.ConstraintService;
25 | import org.trellisldp.app.ConstraintServices;
26 |
27 | /**
28 | * A CDI-based implementation of the {@link ConstraintServices} interface, suitable
29 | * for any CDI or MicroProfile-based application.
30 | */
31 | @ApplicationScoped
32 | public class CDIConstraintServices implements ConstraintServices {
33 |
34 | @Inject
35 | protected Instance constraintServices;
36 |
37 | @Override
38 | public Iterator iterator() {
39 | return constraintServices.iterator();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/trellis-cdi/src/main/java/org/trellisldp/cdi/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Shared Trellis components for building a CDI-based deployable application.
18 | */
19 | package org.trellisldp.cdi;
20 |
--------------------------------------------------------------------------------
/trellis-cdi/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-cdi/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-common/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 |
--------------------------------------------------------------------------------
/trellis-common/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.common {
17 | exports org.trellisldp.common;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.vocabulary;
21 |
22 | requires org.apache.commons.codec;
23 | requires org.apache.commons.rdf.api;
24 | requires org.apache.commons.lang3;
25 | requires org.slf4j;
26 |
27 | requires microprofile.config.api;
28 | requires jakarta.cdi;
29 | requires jakarta.ws.rs;
30 | requires jakarta.xml.bind;
31 | }
32 |
--------------------------------------------------------------------------------
/trellis-common/src/main/java/org/trellisldp/common/LdpResource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.common;
17 |
18 | import static java.lang.annotation.ElementType.METHOD;
19 | import static java.lang.annotation.ElementType.TYPE;
20 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
21 |
22 | import jakarta.ws.rs.NameBinding;
23 |
24 | import java.lang.annotation.Retention;
25 | import java.lang.annotation.Target;
26 |
27 | /**
28 | * A name binding for Trellis LDP resources.
29 | */
30 | @Target({ TYPE, METHOD })
31 | @Retention(value = RUNTIME)
32 | @NameBinding
33 | public @interface LdpResource { }
34 |
--------------------------------------------------------------------------------
/trellis-common/src/main/java/org/trellisldp/common/TimemapGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.common;
17 |
18 | import jakarta.ws.rs.core.Link;
19 |
20 | import java.util.List;
21 | import java.util.stream.Stream;
22 |
23 | import org.apache.commons.rdf.api.Triple;
24 |
25 | /**
26 | * A service to generate a stream of Triples from a list of mementos.
27 | */
28 | public interface TimemapGenerator {
29 |
30 | /**
31 | * Generate RDF triples from mementos.
32 | * @param identifier the identifier
33 | * @param mementos the mementos
34 | * @return a stream of triples
35 | */
36 | Stream asRdf(String identifier, List mementos);
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/trellis-common/src/main/java/org/trellisldp/common/TrellisRoles.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.common;
17 |
18 | /**
19 | * A collection of security roles for use with Trellis.
20 | */
21 | public final class TrellisRoles {
22 |
23 | /** A user role for Trellis. */
24 | public static final String USER = "USER";
25 |
26 | /** An admin role for Trellis. */
27 | public static final String ADMIN = "ADMIN";
28 |
29 | /** An owner role for Trellis. */
30 | public static final String OWNER = "OWNER";
31 |
32 | private TrellisRoles() {
33 | // Prevent instantiation.
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/trellis-common/src/main/java/org/trellisldp/common/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis domain-specific HTTP classes
18 | *
19 | *
This package provides the domain-specific classes for use with the HTTP layer of Trellis.
20 | *
21 | * @author acoburn
22 | */
23 | package org.trellisldp.common;
24 |
--------------------------------------------------------------------------------
/trellis-common/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-constraint/README.md:
--------------------------------------------------------------------------------
1 | # trellis-constraint-rules
2 |
3 | A set of constraints on a Trellis server defining the rules that govern valid RDF.
4 |
5 | These rules consist of:
6 |
7 | * No inappropriate LDP properties -- certain LDP properties can only be modified if the interaction model permits it
8 | * LDP Resource types cannot be set or changed by changing RDF triples
9 | * Certain properties (`acl:accessControl`, `ldp:membershipResource`) must be used with "in-domain" resources
10 | * Certain properties must have a range of a IRI and have a max-cardinality of 1 (`ldp:membershipResource`, `ldp:hasMemberRelation`, `ldp:isMemberOfRelation`, `ldp:insertedContentRelation`, `ldp:inbox`, `acl:accessControl`, `oa:annotationService`)
11 |
12 | This service is optional in the HTTP layer, but if present, user-supplied RDF will be validated against the rules defined in the service.
13 |
14 |
--------------------------------------------------------------------------------
/trellis-constraint/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional
17 | Provide-Capability: osgi.serviceloader; \
18 | osgi.serviceloader=org.trellisldp.api.ConstraintService
19 |
20 |
--------------------------------------------------------------------------------
/trellis-constraint/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.constraint {
17 | exports org.trellisldp.constraint;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.vocabulary;
21 |
22 | requires jakarta.cdi;
23 | requires org.apache.commons.rdf.api;
24 |
25 | provides org.trellisldp.api.ConstraintService
26 | with org.trellisldp.constraint.LdpConstraintService;
27 | }
28 |
--------------------------------------------------------------------------------
/trellis-constraint/src/main/java/org/trellisldp/constraint/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis RDF Constraints
18 | *
19 | *
This package defines a set of constraints on RDF supplied
20 | * to the core Trellis implementation.
This package provides simple file-base implementation of various
20 | * Trellis interfaces.
21 | */
22 | package org.trellisldp.file;
23 |
--------------------------------------------------------------------------------
/trellis-file/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-file/src/main/resources/META-INF/services/org.trellisldp.api.BinaryService:
--------------------------------------------------------------------------------
1 | org.trellisldp.file.FileBinaryService
2 |
--------------------------------------------------------------------------------
/trellis-file/src/main/resources/META-INF/services/org.trellisldp.api.MementoService:
--------------------------------------------------------------------------------
1 | org.trellisldp.file.FileMementoService
2 |
--------------------------------------------------------------------------------
/trellis-file/src/main/resources/META-INF/services/org.trellisldp.api.NamespaceService:
--------------------------------------------------------------------------------
1 | org.trellisldp.file.FileNamespaceService
2 |
--------------------------------------------------------------------------------
/trellis-file/src/main/resources/org/trellisldp/file/defaultNamespaces.json:
--------------------------------------------------------------------------------
1 | {
2 | "acl" : "http://www.w3.org/ns/auth/acl#",
3 | "as" : "https://www.w3.org/ns/activitystreams#",
4 | "dc" : "http://purl.org/dc/terms/",
5 | "dc11" : "http://purl.org/dc/elements/1.1/",
6 | "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
7 | "ldp" : "http://www.w3.org/ns/ldp#",
8 | "memento" : "http://mementoweb.org/ns#",
9 | "owl" : "http://www.w3.org/2002/07/owl#",
10 | "prov" : "http://www.w3.org/ns/prov#",
11 | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
12 | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#",
13 | "schema" : "http://schema.org/",
14 | "skos" : "http://www.w3.org/2004/02/skos/core#",
15 | "time" : "http://www.w3.org/2006/time#" ,
16 | "xsd" : "http://www.w3.org/2001/XMLSchema#"
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/META-INF/microprofile-config.properties:
--------------------------------------------------------------------------------
1 | trellis.file.memento-path=mementos
2 | trellis.file.binary-path=binaries
3 | trellis.file.digest-algorithm=sha-256
4 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/binary.nq:
--------------------------------------------------------------------------------
1 | .
2 | "2017-02-16T11:17:00Z"^^ .
3 | "2017-02-16T11:17:00Z"^^ .
4 | .
5 | "10"^^ .
6 | "text/plain" .
7 | "A label"@eng .
8 | .
9 |
10 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/invalidNamespaces.json:
--------------------------------------------------------------------------------
1 | ["..."]
2 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/resource.nq:
--------------------------------------------------------------------------------
1 | .
2 | "2017-02-16T11:15:01Z"^^ .
3 | .
4 | "A label"@eng .
5 | .
6 | .
7 | .
8 | .
9 | .
10 |
11 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/test.txt:
--------------------------------------------------------------------------------
1 | A test document.
2 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/testNamespaces.json:
--------------------------------------------------------------------------------
1 | {
2 | "dcterms" : "http://purl.org/dc/terms/" ,
3 | "ldp" : "http://www.w3.org/ns/ldp#" ,
4 | "foo" : [ "bar" , "baz" ]
5 | }
6 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/thisIsNot.json:
--------------------------------------------------------------------------------
1 | this is not json.
2 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/versions/29/0f/74/22793c90657ff0d6897d0bfed824d573a9150d0ddc99ef6cd09c44352d44fede/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trellis-ldp/trellis/ffa17e400a4f9d5a5dc116a3fcf87c52575d8939/trellis-file/src/test/resources/versions/29/0f/74/22793c90657ff0d6897d0bfed824d573a9150d0ddc99ef6cd09c44352d44fede/.gitkeep
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/versions/35/97/1a/fe517414a7826a0b8551f5c9da8fa644a43a5b12caef407356f6a431192b5816/1487243701.nq:
--------------------------------------------------------------------------------
1 | .
2 | "2017-02-16T11:15:01Z"^^ .
3 | .
4 | "A label"@eng .
5 | .
6 | .
7 | .
8 | .
9 |
10 |
--------------------------------------------------------------------------------
/trellis-file/src/test/resources/versions/35/97/1a/fe517414a7826a0b8551f5c9da8fa644a43a5b12caef407356f6a431192b5816/1487243711.nq:
--------------------------------------------------------------------------------
1 | .
2 | "2017-02-16T11:15:11Z"^^ .
3 | .
4 | "A label"@eng .
5 | .
6 | .
7 | .
8 | .
9 |
10 |
--------------------------------------------------------------------------------
/trellis-http/README.md:
--------------------------------------------------------------------------------
1 | # trellis-http
2 |
3 | This module defines all of the HTTP interactions for a Trellis server. This module is independent of any particular service implementations.
4 |
5 | The interaction patterns defined here conform to the [W3C LDP](https://www.w3.org/TR/ldp/), [Memento](https://tools.ietf.org/html/rfc7089)
6 | and other specifications.
7 |
--------------------------------------------------------------------------------
/trellis-http/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: org.trellisldp.http,org.trellisldp.http.core
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)", \
15 | osgi.serviceloader; \
16 | filter:="(osgi.serviceloader=org.trellisldp.api.AuditService)"; \
17 | resolution:=optional, \
18 | osgi.serviceloader; \
19 | filter:="(osgi.serviceloader=org.trellisldp.api.ConstraintService)"; \
20 | resolution:=optional; cardinality:=multiple
21 |
22 |
--------------------------------------------------------------------------------
/trellis-http/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.http {
17 | exports org.trellisldp.http;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.common;
21 | requires org.trellisldp.vocabulary;
22 |
23 | requires org.apache.commons.codec;
24 | requires org.apache.commons.rdf.api;
25 | requires org.slf4j;
26 |
27 | requires jakarta.cdi;
28 | requires jakarta.inject;
29 | requires jakarta.annotation;
30 | requires jakarta.ws.rs;
31 | requires jakarta.xml.bind;
32 | requires microprofile.config.api;
33 | requires microprofile.metrics.api;
34 | requires microprofile.openapi.api;
35 | }
36 |
--------------------------------------------------------------------------------
/trellis-http/src/main/java/org/trellisldp/http/WebApplicationExceptionMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.http;
17 |
18 | import jakarta.ws.rs.WebApplicationException;
19 | import jakarta.ws.rs.core.Response;
20 | import jakarta.ws.rs.ext.ExceptionMapper;
21 | import jakarta.ws.rs.ext.Provider;
22 |
23 | import org.slf4j.Logger;
24 | import org.slf4j.LoggerFactory;
25 |
26 | @Provider
27 | public class WebApplicationExceptionMapper implements ExceptionMapper {
28 |
29 | private static final Logger LOGGER = LoggerFactory.getLogger(WebApplicationExceptionMapper.class);
30 |
31 | @Override
32 | public Response toResponse(final WebApplicationException err) {
33 | LOGGER.debug("Unhandled web application exception", err);
34 |
35 | return err.getResponse();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/trellis-http/src/main/java/org/trellisldp/http/impl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis internal HTTP classes
18 | *
19 | *
Internal classes used by the Trellis HTTP types.
20 | *
21 | * @author acoburn
22 | */
23 | package org.trellisldp.http.impl;
24 |
--------------------------------------------------------------------------------
/trellis-http/src/main/java/org/trellisldp/http/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis HTTP Interfaces
18 | *
19 | *
This package provides the core HTTP interfaces for accessing and manipulating Trellis resoures.
20 | *
21 | * @author acoburn
22 | */
23 | package org.trellisldp.http;
24 |
--------------------------------------------------------------------------------
/trellis-http/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-http/src/test/resources/META-INF/microprofile-config.properties:
--------------------------------------------------------------------------------
1 | trellis.http.base-url=http://example.org/
2 |
3 |
--------------------------------------------------------------------------------
/trellis-http/src/test/resources/META-INF/services/org.trellisldp.api.AuditService:
--------------------------------------------------------------------------------
1 | org.trellisldp.api.NoopAuditService
--------------------------------------------------------------------------------
/trellis-http/src/test/resources/emptyData.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trellis-ldp/trellis/ffa17e400a4f9d5a5dc116a3fcf87c52575d8939/trellis-http/src/test/resources/emptyData.txt
--------------------------------------------------------------------------------
/trellis-http/src/test/resources/simpleData.txt:
--------------------------------------------------------------------------------
1 | Some data
2 |
--------------------------------------------------------------------------------
/trellis-http/src/test/resources/simpleLiteral.ttl:
--------------------------------------------------------------------------------
1 | <> "literal" .
2 |
--------------------------------------------------------------------------------
/trellis-http/src/test/resources/simpleTriple.ttl:
--------------------------------------------------------------------------------
1 | <> "A title" .
2 |
--------------------------------------------------------------------------------
/trellis-http/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-jdbc/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Description: ${project.description}
9 | Bundle-Name: ${project.name}
10 | Bundle-SymbolicName: ${project.group}.${project.name}
11 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
12 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
13 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
14 |
15 | Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)", \
16 | osgi.serviceloader; \
17 | filter:="(osgi.serviceloader=org.apache.commons.rdf.api.RDF)"; \
18 | resolution:=mandatory
19 |
20 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/java/org/trellisldp/jdbc/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis ResourceService implementation using a database connection.
18 | *
19 | *
This package provides a simple implementation of the
20 | * ResourceService interface.
21 | */
22 | package org.trellisldp.jdbc;
23 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/resources/db/migration/V0.4__Trellis.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- extension TABLE
3 | --
4 |
5 | CREATE TABLE public.extension (
6 | resource_id bigint NOT NULL,
7 | key character varying(255) NOT NULL,
8 | data text NOT NULL,
9 | FOREIGN KEY (resource_id) REFERENCES public.resource(id) ON UPDATE RESTRICT ON DELETE CASCADE
10 | );
11 |
12 |
13 | COMMENT ON TABLE public.extension IS 'This table stores any extension metadata for each relevant resource.';
14 |
15 | COMMENT ON COLUMN public.extension.resource_id IS 'This value points to the relevant item in the resource table.';
16 | COMMENT ON COLUMN public.extension.key IS 'The extension key for the metadata.';
17 | COMMENT ON COLUMN public.extension.data IS 'The contents of the metadata resource.';
18 |
19 | CREATE UNIQUE INDEX idx_extension ON public.extension (resource_id, key);
20 |
21 |
22 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/resources/db/migration/V0.5__Trellis.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE public.extension RENAME COLUMN key TO ext;
2 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/resources/db/migration/V0.6__Trellis.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- binary TABLE
3 | --
4 |
5 | CREATE TABLE public.nonrdf (
6 | id character varying(1024) PRIMARY KEY,
7 | data bytea NOT NULL
8 | );
9 |
10 | COMMENT ON TABLE public.nonrdf IS 'This table can be used to store non-RDF data for a resource.';
11 |
12 | COMMENT ON COLUMN public.nonrdf.id IS 'This value is the unique identifier for the non-RDF resource.';
13 | COMMENT ON COLUMN public.nonrdf.data IS 'This holds the non-RDF data itself, limited to 1GB in size';
14 |
15 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/resources/org/trellisldp/jdbc/initial_namespaces.csv:
--------------------------------------------------------------------------------
1 | prefix,namespace
2 | acl,http://www.w3.org/ns/auth/acl#
3 | as,https://www.w3.org/ns/activitystreams#
4 | dc,http://purl.org/dc/terms/
5 | dc11,http://purl.org/dc/elements/1.1/
6 | geo,http://www.w3.org/2003/01/geo/wgs84_pos#
7 | ldp,http://www.w3.org/ns/ldp#
8 | memento,http://mementoweb.org/ns#
9 | owl,http://www.w3.org/2002/07/owl#
10 | prov,http://www.w3.org/ns/prov#
11 | rdf,http://www.w3.org/1999/02/22-rdf-syntax-ns#
12 | rdfs,http://www.w3.org/2000/01/rdf-schema#
13 | schema,http://schema.org/
14 | skos,http://www.w3.org/2004/02/skos/core#
15 | time,http://www.w3.org/2006/time#
16 | xsd,http://www.w3.org/2001/XMLSchema#
17 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/resources/org/trellisldp/jdbc/initial_resource.csv:
--------------------------------------------------------------------------------
1 | id,subject,interaction_model,modified,acl
2 | 0,trellis:data/,http://www.w3.org/ns/ldp#BasicContainer,0,FALSE
3 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/main/resources/org/trellisldp/jdbc/initial_resource_mysql.csv:
--------------------------------------------------------------------------------
1 | id,subject,interaction_model,modified,acl
2 | 1,trellis:data/,http://www.w3.org/ns/ldp#BasicContainer,0,FALSE
3 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/test/resources/META-INF/microprofile-config.properties:
--------------------------------------------------------------------------------
1 | trellis.jdbc.batch-size = 5
2 |
3 |
--------------------------------------------------------------------------------
/trellis-jdbc/src/test/resources/mementos/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/trellis-ldp/trellis/ffa17e400a4f9d5a5dc116a3fcf87c52575d8939/trellis-jdbc/src/test/resources/mementos/.gitkeep
--------------------------------------------------------------------------------
/trellis-jdbc/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-jena/README.md:
--------------------------------------------------------------------------------
1 | # trellis-io-jena
2 |
3 | This module implements the Trellis IOService using [Apache Jena](https://jena.apache.org).
4 | This service handles all read (deserialization), write (serialization) and update (sparql-update)
5 | operations, converting InputStreams into RDF-based structures.
6 |
7 |
--------------------------------------------------------------------------------
/trellis-jena/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional
17 | Provide-Capability: osgi.serviceloader; \
18 | osgi.serviceloader=org.trellisldp.api.IOService
19 |
20 |
--------------------------------------------------------------------------------
/trellis-jena/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.jena {
17 | exports org.trellisldp.jena;
18 |
19 | requires transitive org.trellisldp.api;
20 | requires transitive org.trellisldp.vocabulary;
21 |
22 | requires org.apache.commons.io;
23 | requires org.apache.commons.rdf.api;
24 | requires org.apache.jena.arq;
25 | requires org.apache.jena.base;
26 | requires org.apache.jena.commonsrdf;
27 | requires org.apache.jena.core;
28 | requires jakarta.cdi;
29 | requires jakarta.inject;
30 | requires jakarta.annotation;
31 | requires jakarta.json;
32 | requires microprofile.config.api;
33 | requires org.slf4j;
34 |
35 | opens org.trellisldp.jena to org.apache.jena.arq;
36 |
37 | provides org.trellisldp.api.IOService
38 | with org.trellisldp.jena.JenaIOService;
39 | }
40 |
--------------------------------------------------------------------------------
/trellis-jena/src/main/java/org/trellisldp/jena/NoopProfileCache.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.jena;
17 |
18 | import org.trellisldp.api.CacheService.TrellisProfileCache;
19 | import org.trellisldp.api.NoopCacheService;
20 |
21 | /**
22 | * A specialized no-op cache.
23 | */
24 | @TrellisProfileCache
25 | public class NoopProfileCache extends NoopCacheService {
26 | }
27 |
--------------------------------------------------------------------------------
/trellis-jena/src/main/java/org/trellisldp/jena/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis resource input/output service (Jena)
18 | *
19 | *
This package implements the {@link org.trellisldp.api.IOService}
20 | * using a Jena backend.
21 | *
22 | * @author acoburn
23 | */
24 | package org.trellisldp.jena;
25 |
--------------------------------------------------------------------------------
/trellis-jena/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-jena/src/main/resources/META-INF/services/org.trellisldp.api.IOService:
--------------------------------------------------------------------------------
1 | org.trellisldp.jena.JenaIOService
2 |
--------------------------------------------------------------------------------
/trellis-jena/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-jena/src/test/resources/testRdf.ttl:
--------------------------------------------------------------------------------
1 | @prefix dc:
2 | @prefix dctype:
3 |
4 | <> a dctype:Text ;
5 | dc:title "A title" ;
6 | dc:spatial .
7 |
--------------------------------------------------------------------------------
/trellis-jwt/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 |
--------------------------------------------------------------------------------
/trellis-jwt/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.jwt {
17 | exports org.trellisldp.jwt;
18 |
19 | requires jakarta.cdi;
20 | requires jakarta.inject;
21 | requires jakarta.ws.rs;
22 | requires jakarta.annotation;
23 | requires microprofile.config.api;
24 | requires microprofile.jwt.auth.api;
25 | requires org.slf4j;
26 | requires org.trellisldp.common;
27 | }
28 |
--------------------------------------------------------------------------------
/trellis-jwt/src/main/java/org/trellisldp/jwt/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis MicroProfile Auth filter
18 | *
19 | *
This package implements a MicroProfile-based OAuth filter for Trellis.
20 | */
21 | package org.trellisldp.jwt;
22 |
--------------------------------------------------------------------------------
/trellis-jwt/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-namespace/README.md:
--------------------------------------------------------------------------------
1 | # trellis-namespace
2 |
3 | This module implements a simple namespace prefixing service, which reads from (and stores changes to) a simple JSON-based document.
4 |
5 | A number of namespace prefixes are defined by default as:
6 |
7 | ```javascript
8 | {
9 | "acl" : "http://www.w3.org/ns/auth/acl#",
10 | "as" : "https://www.w3.org/ns/activitystreams#",
11 | "dc" : "http://purl.org/dc/terms/",
12 | "dc11" : "http://purl.org/dc/elements/1.1/",
13 | "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
14 | "ldp" : "http://www.w3.org/ns/ldp#",
15 | "memento" : "http://mementoweb.org/ns#",
16 | "owl" : "http://www.w3.org/2002/07/owl#",
17 | "prov" : "http://www.w3.org/ns/prov#",
18 | "rdf" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
19 | "rdfs" : "http://www.w3.org/2000/01/rdf-schema#",
20 | "schema" : "http://schema.org/",
21 | "skos" : "http://www.w3.org/2004/02/skos/core#",
22 | "time" : "http://www.w3.org/2006/time#" ,
23 | "xsd" : "http://www.w3.org/2001/XMLSchema#"
24 | }
25 | ```
26 |
27 |
--------------------------------------------------------------------------------
/trellis-namespace/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional
17 | Provide-Capability: osgi.serviceloader; \
18 | osgi.serviceloader=org.trellisldp.api.NamespaceService
19 |
20 |
--------------------------------------------------------------------------------
/trellis-namespace/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.namespace {
17 | exports org.trellisldp.namespace;
18 |
19 | requires transitive org.trellisldp.api;
20 | requires transitive org.trellisldp.vocabulary;
21 |
22 | requires org.apache.commons.rdf.api;
23 | requires jakarta.cdi;
24 | requires jakarta.inject;
25 | requires jakarta.annotation;
26 | requires microprofile.config.api;
27 | requires org.slf4j;
28 |
29 | provides org.trellisldp.api.NamespaceService
30 | with org.trellisldp.namespace.SimpleNamespaceService;
31 | }
32 |
--------------------------------------------------------------------------------
/trellis-namespace/src/main/java/org/trellisldp/namespace/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis Namespace Service using an in-memory map of namespaces
18 | *
19 | *
This package provides a mechanism for associating prefixes to namespaces.
20 | *
21 | * @author acoburn
22 | */
23 | package org.trellisldp.namespace;
24 |
--------------------------------------------------------------------------------
/trellis-namespace/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-namespace/src/main/resources/META-INF/services/org.trellisldp.api.NamespaceService:
--------------------------------------------------------------------------------
1 | org.trellisldp.namespace.SimpleNamespaceService
2 |
--------------------------------------------------------------------------------
/trellis-namespace/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-notification-jackson/README.md:
--------------------------------------------------------------------------------
1 | # trellis-event-serialization
2 |
3 | A serialization service for a Trellis event stream. Specifically, this converts a Trellis Event into
4 | a serialized JSON-LD String.
5 |
6 | For example, this implementation will serialize an update event into structures such as:
7 |
8 | ```javascript
9 | {
10 | "@context": "https://www.w3.org/ns/activitystreams",
11 | "id": "urn:uuid:031b0857-b1bd-4f19-989d-1ab0e22ca57c",
12 | "type": ["Update" , "http://www.w3.org/ns/prov#Activity"],
13 | "actor": ["https://people.apache.org/~acoburn/#i"],
14 | "object": {
15 | "id": "http://localhost:8080/resource",
16 | "type": ["http://www.w3.org/ns/ldp#Container"]
17 | }
18 | }
19 | ```
20 |
21 | These notifications conform to the [W3C Activity Streams](https://www.w3.org/TR/activitystreams-core/) specification.
22 |
--------------------------------------------------------------------------------
/trellis-notification-jackson/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional
17 | Provide-Capability: osgi.serviceloader; \
18 | osgi.serviceloader=org.trellisldp.api.EventSerializationService
19 |
20 |
--------------------------------------------------------------------------------
/trellis-notification-jackson/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.notification.jackson {
17 | exports org.trellisldp.notification.jackson;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.vocabulary;
21 |
22 | requires com.fasterxml.jackson.core;
23 | requires com.fasterxml.jackson.databind;
24 | requires com.fasterxml.jackson.datatype.jsr310;
25 | requires com.fasterxml.jackson.annotation;
26 | requires jakarta.cdi;
27 | requires org.apache.commons.rdf.api;
28 |
29 | opens org.trellisldp.notification.jackson to com.fasterxml.jackson.databind;
30 |
31 | provides org.trellisldp.api.NotificationSerializationService
32 | with org.trellisldp.notification.jackson.DefaultNotificationSerializationService;
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-notification-jackson/src/main/java/org/trellisldp/notification/jackson/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis Notification Serialization Implementation, based on Jackson
18 | *
19 | *
A package used for serializing Notifications into an Activity Stream JSON-LD representation.
20 | *
21 | * @see Activity Streams 2.0
22 | *
23 | * @author acoburn
24 | */
25 | package org.trellisldp.notification.jackson;
26 |
--------------------------------------------------------------------------------
/trellis-notification-jackson/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-notification-jackson/src/main/resources/META-INF/services/org.trellisldp.api.NotificationSerializationService:
--------------------------------------------------------------------------------
1 | org.trellisldp.notification.jackson.DefaultNotificationSerializationService
2 |
--------------------------------------------------------------------------------
/trellis-notification-jsonb/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional
17 | Provide-Capability: osgi.serviceloader; \
18 | osgi.serviceloader=org.trellisldp.api.EventSerializationService
19 |
20 |
--------------------------------------------------------------------------------
/trellis-notification-jsonb/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.notification.jsonb {
17 | exports org.trellisldp.notification.jsonb;
18 |
19 | requires org.trellisldp.api;
20 | requires org.trellisldp.vocabulary;
21 |
22 | requires jakarta.cdi;
23 | requires jakarta.json.bind;
24 | requires org.apache.commons.rdf.api;
25 |
26 | provides org.trellisldp.api.NotificationSerializationService
27 | with org.trellisldp.notification.jsonb.DefaultNotificationSerializationService;
28 | }
29 |
--------------------------------------------------------------------------------
/trellis-notification-jsonb/src/main/java/org/trellisldp/notification/jsonb/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis Notification Serialization Implementation
18 | *
19 | *
A package used for serializing Notifications into an Activity Stream JSON-LD representation.
20 | *
21 | * @see Activity Streams 2.0
22 | *
23 | * @author acoburn
24 | */
25 | package org.trellisldp.notification.jsonb;
26 |
--------------------------------------------------------------------------------
/trellis-notification-jsonb/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-notification-jsonb/src/main/resources/META-INF/services/org.trellisldp.api.NotificationSerializationService:
--------------------------------------------------------------------------------
1 | org.trellisldp.notification.jsonb.DefaultNotificationSerializationService
2 |
--------------------------------------------------------------------------------
/trellis-rdfa/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional, \
17 | osgi.extender; \
18 | filter:="(osgi.extender=osgi.serviceloader.processor)", \
19 | osgi.serviceloader; \
20 | filter:="(osgi.serviceloader=org.trellisldp.api.NamespaceService)"; \
21 | resolution:=optional
22 | Provide-Capability: osgi.serviceloader; \
23 | osgi.serviceloader=org.trellisldp.api.RDFaWriterService
24 |
25 |
--------------------------------------------------------------------------------
/trellis-rdfa/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.rdfa {
17 | exports org.trellisldp.rdfa;
18 |
19 | requires transitive org.trellisldp.api;
20 | requires transitive org.trellisldp.vocabulary;
21 |
22 | requires com.github.mustachejava;
23 | requires jakarta.cdi;
24 | requires jakarta.inject;
25 | requires jakarta.annotation;
26 | requires microprofile.config.api;
27 | requires org.apache.commons.rdf.api;
28 | requires org.apache.jena.arq;
29 | requires org.apache.jena.core;
30 | requires org.slf4j;
31 |
32 | uses org.trellisldp.api.NamespaceService;
33 |
34 | opens org.trellisldp.rdfa;
35 |
36 | provides org.trellisldp.api.RDFaWriterService
37 | with org.trellisldp.rdfa.DefaultRdfaWriterService;
38 | }
39 |
--------------------------------------------------------------------------------
/trellis-rdfa/src/main/java/org/trellisldp/rdfa/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * HTML serialization classes.
18 | *
19 | * @author acoburn
20 | */
21 | package org.trellisldp.rdfa;
22 |
--------------------------------------------------------------------------------
/trellis-rdfa/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-rdfa/src/main/resources/org/trellisldp/rdfa/resource.mustache:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{title}}
5 |
6 | {{#icon}}
7 |
8 | {{/icon}}
9 | {{#css}}
10 |
11 | {{/css}}
12 |
13 |
14 |
26 | {{/triples}}
27 |
28 |
29 | {{#js}}
30 |
31 | {{/js}}
32 |
33 |
34 |
--------------------------------------------------------------------------------
/trellis-rdfa/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-reactive/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 |
--------------------------------------------------------------------------------
/trellis-reactive/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.reactive {
17 | exports org.trellisldp.reactive;
18 |
19 | requires io.reactivex.rxjava2;
20 | requires jakarta.cdi;
21 | requires jakarta.inject;
22 | requires smallrye.reactive.messaging.api;
23 | requires org.slf4j;
24 | requires org.apache.commons.rdf.api;
25 | requires org.trellisldp.api;
26 | }
27 |
--------------------------------------------------------------------------------
/trellis-reactive/src/main/java/org/trellisldp/reactive/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis Reactive Messaging Producer
18 | *
19 | *
This package implements a MicroProfile-based notification connector.
20 | *
21 | * @author acoburn
22 | */
23 | package org.trellisldp.reactive;
24 |
--------------------------------------------------------------------------------
/trellis-reactive/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-reactive/src/test/java/org/trellisldp/reactive/NotificationCollector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.reactive;
17 |
18 | import jakarta.enterprise.context.ApplicationScoped;
19 | import jakarta.enterprise.event.ObservesAsync;
20 |
21 | import java.util.List;
22 | import java.util.concurrent.CopyOnWriteArrayList;
23 |
24 | import org.trellisldp.api.Notification;
25 |
26 | @ApplicationScoped
27 | public class NotificationCollector {
28 |
29 | private final List notifications = new CopyOnWriteArrayList<>();
30 |
31 | public void sink(@ObservesAsync final Notification notification) {
32 | notifications.add(notification);
33 | }
34 |
35 | public List getResults() {
36 | return notifications;
37 | }
38 |
39 | public void clear() {
40 | notifications.clear();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/trellis-reactive/src/test/java/org/trellisldp/reactive/TestCollector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.reactive;
17 |
18 | import jakarta.enterprise.context.ApplicationScoped;
19 |
20 | import java.util.List;
21 | import java.util.concurrent.CopyOnWriteArrayList;
22 |
23 | import org.eclipse.microprofile.reactive.messaging.Incoming;
24 |
25 | @ApplicationScoped
26 | public class TestCollector {
27 |
28 | private final List list = new CopyOnWriteArrayList<>();
29 |
30 | @Incoming(ReactiveNotificationService.REACTIVE_DESTINATION)
31 | public void sink(final String message) {
32 | list.add(message);
33 | }
34 |
35 | public List getResults() {
36 | return list;
37 | }
38 |
39 | public void clear() {
40 | list.clear();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/trellis-reactive/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-test/src/main/java/org/trellisldp/test/AbstractApplicationAuditTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.test;
17 |
18 | import static org.junit.jupiter.api.Assertions.assertAll;
19 |
20 | import org.junit.jupiter.api.DisplayName;
21 | import org.junit.jupiter.api.Test;
22 |
23 | /**
24 | * A convenience class for running the Audit tests.
25 | */
26 | public abstract class AbstractApplicationAuditTests implements AuditTests {
27 |
28 | private String resource;
29 |
30 | @Override
31 | public String getResourceLocation() {
32 | return resource;
33 | }
34 |
35 | @Override
36 | public void setResourceLocation(final String location) {
37 | resource = location;
38 | }
39 |
40 | @Test
41 | @DisplayName("Audit tests")
42 | public void testAuditFeatures() throws Exception {
43 | assertAll("Test audit features", runTests());
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/trellis-test/src/main/java/org/trellisldp/test/AbstractResourceServiceTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.test;
17 |
18 | import static org.junit.jupiter.api.Assertions.assertAll;
19 |
20 | import org.junit.jupiter.api.DisplayName;
21 | import org.junit.jupiter.api.Test;
22 | import org.trellisldp.api.ResourceService;
23 |
24 | /**
25 | * A convenience class for running the ResourceService tests.
26 | */
27 | public abstract class AbstractResourceServiceTests implements ResourceServiceTests {
28 |
29 | /**
30 | * Get the ResourceService.
31 | * @return the resource service
32 | */
33 | @Override
34 | public abstract ResourceService getResourceService();
35 |
36 | @Test
37 | @DisplayName("Resource service tests")
38 | public void testResourceServiceFeatures() throws Exception {
39 | assertAll("Test resource service features", runTests());
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/trellis-test/src/main/java/org/trellisldp/test/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis Testing Framework
18 | *
19 | *
This package provides a framework for testing a Trellis-based application.
20 | *
21 | * @author acoburn
22 | */
23 | package org.trellisldp.test;
24 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/annotation.ttl:
--------------------------------------------------------------------------------
1 | PREFIX oa:
2 |
3 | <> a oa:Annotation ;
4 | oa:hasBody ;
5 | oa:hasTarget .
6 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/basicContainer.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX dc:
3 | PREFIX ldp:
4 |
5 | <> a ldp:BasicContainer ;
6 | skos:prefLabel "Basic Container"@eng ;
7 | dc:description "This is a simple Basic Container for testing."@eng .
8 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/childResource.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX foaf:
3 | PREFIX dc:
4 |
5 | <> skos:prefLabel "Child Resource"@eng ;
6 | foaf:primaryTopic <#it> ;
7 | dc:description "This is a simple child resource for testing."@eng .
8 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/directContainer.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX ldp:
3 | PREFIX foaf:
4 | PREFIX dc:
5 |
6 | <> a ldp:DirectContainer ;
7 | skos:prefLabel "Direct Container"@eng ;
8 | ldp:hasMemberRelation ldp:member ;
9 | dc:description "This is a Direct Container for testing."@eng .
10 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/directContainerInverse.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX ldp:
3 | PREFIX dc:
4 |
5 | <> skos:prefLabel "Direct Container"@eng ;
6 | ldp:isMemberOfRelation dc:isPartOf ;
7 | dc:description "This is an Indirect Container for testing."@eng .
8 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/directContainerIsPartOf.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX ldp:
3 | PREFIX foaf:
4 | PREFIX dc:
5 |
6 | <> skos:prefLabel "Direct Container"@eng ;
7 | ldp:hasMemberRelation dc:isPartOf ;
8 | dc:description "This is a Direct Container for testing."@eng .
9 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/indirectContainer.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX ldp:
3 | PREFIX foaf:
4 | PREFIX dc:
5 |
6 | <> a ldp:IndirectContainer ;
7 | skos:prefLabel "Indirect Container"@eng ;
8 | ldp:hasMemberRelation ldp:member ;
9 | ldp:insertedContentRelation foaf:primaryTopic ;
10 | dc:description "This is an Indirect Container for testing."@eng .
11 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/indirectContainerInverse.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX ldp:
3 | PREFIX foaf:
4 | PREFIX dc:
5 |
6 | <> skos:prefLabel "Indirect Container"@eng ;
7 | ldp:isMemberOfRelation dc:isPartOf ;
8 | ldp:insertedContentRelation foaf:primaryTopic ;
9 | dc:description "This is an Indirect Container for testing."@eng .
10 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/indirectContainerMemberSubject.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX ldp:
3 | PREFIX foaf:
4 | PREFIX dc:
5 |
6 | <> skos:prefLabel "Indirect Container"@eng ;
7 | ldp:hasMemberRelation ldp:member ;
8 | ldp:insertedContentRelation ldp:MemberSubject ;
9 | dc:description "This is an Indirect Container for testing."@eng .
10 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/shex.jsonld:
--------------------------------------------------------------------------------
1 | { "@context": "http://www.w3.org/ns/shex.jsonld",
2 | "type": "Schema",
3 | "shapes": [
4 | { "id": "http://school.example/#enrolleeAge",
5 | "type": "NodeConstraint",
6 | "datatype": "http://www.w3.org/2001/XMLSchema#integer",
7 | "mininclusive": 13, "maxinclusive": 20 },
8 | { "id": "http://school.example/#Enrollee",
9 | "type": "Shape",
10 | "expression": {
11 | "type": "TripleConstraint", "min": 1, "max": 2,
12 | "predicate": "http://ex.example/#hasGuardian",
13 | "valueExpr": {
14 | "type": "NodeConstraint",
15 | "nodeKind": "iri" } } }
16 | ] }
17 |
--------------------------------------------------------------------------------
/trellis-test/src/main/resources/org/trellisldp/test/simpleResource.ttl:
--------------------------------------------------------------------------------
1 | PREFIX skos:
2 | PREFIX foaf:
3 | PREFIX dc:
4 |
5 | <> a skos:Concept ;
6 | skos:prefLabel "Resource Name"@eng ;
7 | dc:subject .
8 |
--------------------------------------------------------------------------------
/trellis-test/src/test/java/org/trellisldp/test/InMemoryResourceServiceTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.test;
17 | import org.trellisldp.api.ResourceService;
18 |
19 | class InMemoryResourceServiceTest implements ResourceServiceTests {
20 |
21 | private final InMemoryResourceService testService = new InMemoryResourceService();
22 |
23 | @Override
24 | public ResourceService getResourceService() {
25 | return testService;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/trellis-test/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-triplestore/README.md:
--------------------------------------------------------------------------------
1 | # trellis-triplestore
2 |
3 | This module implements the core persistence layer of Trellis using a triplestore.
4 |
--------------------------------------------------------------------------------
/trellis-triplestore/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; \
15 | filter:="(osgi.extender=osgi.serviceloader.registrar)"; \
16 | resolution:=optional
17 | Provide-Capability: osgi.serviceloader; \
18 | osgi.serviceloader=org.trellisldp.api.ResourceService
19 |
20 |
--------------------------------------------------------------------------------
/trellis-triplestore/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.triplestore {
17 | exports org.trellisldp.triplestore;
18 |
19 | requires transitive org.trellisldp.api;
20 | requires transitive org.trellisldp.vocabulary;
21 |
22 | requires org.apache.commons.io;
23 | requires org.apache.commons.rdf.api;
24 | requires org.apache.jena.arq;
25 | requires org.apache.jena.commonsrdf;
26 | requires org.slf4j;
27 |
28 | requires jakarta.cdi;
29 | requires jakarta.inject;
30 | requires jakarta.annotation;
31 | requires microprofile.config.api;
32 | requires microprofile.health.api;
33 | requires org.apache.jena.rdfconnection;
34 | requires org.apache.jena.core;
35 | requires org.apache.jena.tdb2;
36 |
37 | provides org.trellisldp.api.ResourceService
38 | with org.trellisldp.triplestore.TriplestoreResourceService;
39 |
40 | uses org.trellisldp.api.IdentifierService;
41 | }
42 |
--------------------------------------------------------------------------------
/trellis-triplestore/src/main/java/org/trellisldp/triplestore/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis ResourceService implementation using a Triplestore.
18 | *
19 | *
This package provides a simple implementation of the
20 | * ResourceService interface.
21 | */
22 | package org.trellisldp.triplestore;
23 |
--------------------------------------------------------------------------------
/trellis-triplestore/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/trellis-triplestore/src/main/resources/META-INF/services/org.trellisldp.api.ResourceService:
--------------------------------------------------------------------------------
1 | org.trellisldp.triplestore.TriplestoreResourceService
2 |
--------------------------------------------------------------------------------
/trellis-triplestore/src/test/resources/simplelogger.properties:
--------------------------------------------------------------------------------
1 | org.slf4j.simpleLogger.defaultLogLevel=WARN
2 |
--------------------------------------------------------------------------------
/trellis-vocabulary/README.md:
--------------------------------------------------------------------------------
1 | # trellis-vocabulary
2 |
3 | RDF vocabularies used by a Trellis server.
4 |
5 | ## Vocabularies
6 |
7 | The following vocabularies are defined in this package:
8 |
9 | * `ACL`: [Web Access Control](https://www.w3.org/wiki/WebAccessControl) (W3C)
10 | * `AS`: [Activity Streams](https://www.w3.org/TR/activitystreams-vocabulary/) (W3C)
11 | * `DC`: [DCMI Metadata Terms](http://dublincore.org/documents/dcmi-terms/) (DCMI)
12 | * `FOAF`: [Friend of a Friend](http://xmlns.com/foaf/spec/)
13 | * `JSONLD`: [The JSON-LD Vocabulary](https://www.w3.org/ns/json-ld) (W3C)
14 | * `LDP`: [Linked Data Platform](https://www.w3.org/ns/ldp) (W3C)
15 | * `Memento`: [Time-Based Access to Resources](https://tools.ietf.org/html/rfc7089)
16 | * `OA`: [Web Annotation](https://www.w3.org/ns/oa) (W3C)
17 | * `PROV`: [Provenance Vocabulary](http://www.w3.org/TR/prov-o/) (W3C)
18 | * `RDF` and `RDFS`: [RDF Schema 1.1](https://www.w3.org/TR/rdf-schema/) (W3C)
19 | * `SKOS`: [Simple Knowledge Organization System](https://www.w3.org/2009/08/skos-reference/skos.html) (W3C)
20 | * `Time`: [OWL-Time](https://www.w3.org/TR/owl-time/) (W3C)
21 | * `Trellis`: [Trellis Vocabulary](https://www.trellisldp.org/ns/trellis.html)
22 | * `VCARD`: [vCard Ontology](https://www.w3.org/TR/vcard-rdf) (W3C)
23 | * `XSD`: [XML Schema](https://www.w3.org/TR/xmlschema-2/) (W3C)
24 |
--------------------------------------------------------------------------------
/trellis-vocabulary/bnd.bnd:
--------------------------------------------------------------------------------
1 | Automatic-Module-Name: ${project.ext.moduleName}
2 | Export-Package: ${project.ext.moduleName}
3 |
4 | Bundle-Vendor: ${project.vendor}
5 | Bundle-Version: ${project.version}
6 | Bundle-License: ${project.license}
7 | Bundle-DocURL: ${project.docURL}
8 | Bundle-Name: ${project.description}
9 | Bundle-SymbolicName: ${project.group}.${project.name}
10 | Bundle-SCM: url=https://github.com/trellis-ldp/trellis, \
11 | connection=scm:git:https://github.com/trellis-ldp/trellis.git, \
12 | developerConnection=scm:git:git@github.com:trellis-ldp/trellis.git
13 |
14 | Require-Capability: osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)", \
15 | osgi.serviceloader; \
16 | filter:="(osgi.serviceloader=org.apache.commons.rdf.api.RDF)"; \
17 | resolution:=mandatory
18 |
19 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/main/java/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | module org.trellisldp.vocabulary {
17 | exports org.trellisldp.vocabulary;
18 |
19 | requires org.apache.commons.rdf.api;
20 |
21 | uses org.apache.commons.rdf.api.RDF;
22 | }
23 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/main/java/org/trellisldp/vocabulary/VocabUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | import java.util.ServiceLoader;
19 |
20 | import org.apache.commons.rdf.api.IRI;
21 | import org.apache.commons.rdf.api.RDF;
22 |
23 | /**
24 | * @author acoburn
25 | */
26 | final class VocabUtils {
27 |
28 | private static final RDF rdf = ServiceLoader.load(RDF.class).iterator().next();
29 |
30 | public static IRI createIRI(final String uri) {
31 | return rdf.createIRI(uri);
32 | }
33 |
34 | private VocabUtils() {
35 | // prevent instantiation
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/main/java/org/trellisldp/vocabulary/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | /**
17 | * Trellis RDF Vocabularies
18 | *
19 | *
This package provides JAVA representations of many of the
20 | * common RDF vocabularies used throughout the codebase.
21 | *
22 | * @author acoburn
23 | */
24 | package org.trellisldp.vocabulary;
25 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/ACLTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the ACL Vocabulary Class
20 | * @author acoburn
21 | */
22 | class ACLTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/ns/auth/acl#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return ACL.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/DCTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the DC Vocabulary Class
20 | * @author acoburn
21 | */
22 | class DCTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://purl.org/dc/terms/";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return DC.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/FOAFTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the FOAF Vocabulary Class
20 | * @author acoburn
21 | */
22 | class FOAFTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://xmlns.com/foaf/0.1/";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return FOAF.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/JSONLDTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the JSONLD Vocabulary Class
20 | * @author acoburn
21 | */
22 | class JSONLDTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/ns/json-ld#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return JSONLD.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/LDPTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | import static org.junit.jupiter.api.Assertions.*;
19 |
20 | import org.junit.jupiter.api.Test;
21 |
22 | /**
23 | * Test the LDP Vocabulary Class
24 | * @author acoburn
25 | */
26 | class LDPTest extends AbstractVocabularyTest {
27 |
28 | @Override
29 | String namespace() {
30 | return "http://www.w3.org/ns/ldp#";
31 | }
32 |
33 | @Override
34 | Class vocabulary() {
35 | return LDP.class;
36 | }
37 |
38 | @Test
39 | void testSuperclass() {
40 | assertEquals(LDP.Resource, LDP.getSuperclassOf(LDP.NonRDFSource), "LDP-R isn't a superclass of LDP-NR!");
41 | assertEquals(LDP.Container, LDP.getSuperclassOf(LDP.BasicContainer), "LDP-C isn't a superclass of LDP-BC!");
42 | assertNull(LDP.getSuperclassOf(LDP.Resource), "Astonishingly, LDP-R has a superclass!");
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/MementoTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the Memento Vocabulary Class
20 | * @author acoburn
21 | */
22 | class MementoTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://mementoweb.org/ns#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return Memento.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/OATest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the OA Vocabulary Class
20 | * @author acoburn
21 | */
22 | class OATest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/ns/oa#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return OA.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/PROVTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the PROV Ontology Class
20 | * @author acoburn
21 | */
22 | class PROVTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/ns/prov#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return PROV.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/RDFSTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the RDFS Vocabulary Class
20 | * @author acoburn
21 | */
22 | class RDFSTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/2000/01/rdf-schema#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return RDFS.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/RDFTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the RDF Vocabulary Class
20 | * @author acoburn
21 | */
22 | class RDFTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return RDF.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/SKOSTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the SKOS Vocabulary Class
20 | * @author acoburn
21 | */
22 | class SKOSTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/2004/02/skos/core#";
27 | }
28 |
29 | @Override
30 | Class vocabulary() {
31 | return SKOS.class;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/trellis-vocabulary/src/test/java/org/trellisldp/vocabulary/TimeTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Aaron Coburn and individual contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.trellisldp.vocabulary;
17 |
18 | /**
19 | * Test the Time Vocabulary Class
20 | * @author acoburn
21 | */
22 | class TimeTest extends AbstractVocabularyTest {
23 |
24 | @Override
25 | String namespace() {
26 | return "http://www.w3.org/2006/time#";
27 | }
28 |
29 | @Override
30 | Class