Skip to content

Commit

Permalink
Change group ID to org.qubitpi.athena
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Jan 12, 2024
1 parent 5c1d2fe commit 16041f1
Show file tree
Hide file tree
Showing 193 changed files with 1,556 additions and 1,522 deletions.
4 changes: 2 additions & 2 deletions Athena-Project-intellij-code-style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<emptyLine />
<package name="" withSubpackages="true" static="true" />
<emptyLine />
<package name="com.qubitpi" withSubpackages="true" static="false" />
<package name="org.qubitpi" withSubpackages="true" static="false" />
<emptyLine />
<package name="com" withSubpackages="true" static="false" />
<emptyLine />
Expand Down Expand Up @@ -38,7 +38,7 @@
<emptyLine />
<package name="" withSubpackages="true" static="true" />
<emptyLine />
<package name="com.qubitpi" withSubpackages="true" static="false" />
<package name="org.qubitpi" withSubpackages="true" static="false" />
<emptyLine />
<package name="com" withSubpackages="true" static="false" />
<emptyLine />
Expand Down
4 changes: 2 additions & 2 deletions athena-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.qubitpi.athena</groupId>
<groupId>org.qubitpi.athena</groupId>
<artifactId>athena-parent-pom</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Expand All @@ -26,7 +26,7 @@
<dependencies>
<!-- Local module dependencies -->
<dependency>
<groupId>com.qubitpi.athena</groupId>
<groupId>org.qubitpi.athena</groupId>
<artifactId>athena-system-config</artifactId>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.application;

import com.qubitpi.athena.config.SystemConfig;
import com.qubitpi.athena.config.SystemConfigFactory;
import com.qubitpi.athena.file.identifier.FileIdGenerator;
import com.qubitpi.athena.file.identifier.FileNameAndUploadedTimeBasedIdGenerator;
import com.qubitpi.athena.filestore.FileStore;
import com.qubitpi.athena.metadata.MetaData;
import com.qubitpi.athena.metastore.MetaStore;
import com.qubitpi.athena.web.graphql.JacksonParser;
import com.qubitpi.athena.web.graphql.JsonDocumentParser;
package org.qubitpi.athena.application;

import org.qubitpi.athena.config.SystemConfig;
import org.qubitpi.athena.config.SystemConfigFactory;
import org.qubitpi.athena.file.identifier.FileIdGenerator;
import org.qubitpi.athena.file.identifier.FileNameAndUploadedTimeBasedIdGenerator;
import org.qubitpi.athena.filestore.FileStore;
import org.qubitpi.athena.metadata.MetaData;
import org.qubitpi.athena.metastore.MetaStore;
import org.qubitpi.athena.web.graphql.JacksonParser;
import org.qubitpi.athena.web.graphql.JsonDocumentParser;

import org.glassfish.hk2.api.TypeLiteral;
import org.glassfish.hk2.utilities.Binder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.application;
package org.qubitpi.athena.application;

import org.glassfish.hk2.utilities.Binder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.application;
package org.qubitpi.athena.application;

import com.qubitpi.athena.config.ErrorMessageFormat;
import com.qubitpi.athena.config.SystemConfig;
import com.qubitpi.athena.config.SystemConfigFactory;
import org.qubitpi.athena.config.ErrorMessageFormat;
import org.qubitpi.athena.config.SystemConfig;
import org.qubitpi.athena.config.SystemConfigFactory;

import org.glassfish.hk2.utilities.Binder;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
Expand All @@ -37,7 +37,7 @@ public class ResourceConfig extends org.glassfish.jersey.server.ResourceConfig {

private static final Logger LOG = LoggerFactory.getLogger(ResourceConfig.class);

private static final String ATHENA_ENDPOINT_PACKAGE = "com.qubitpi.athena.web.endpoints";
private static final String ATHENA_ENDPOINT_PACKAGE = "org.qubitpi.athena.web.endpoints";

private static final String RESOURCE_BINDER_KEY = "resource_binder";
private static final SystemConfig SYSTEM_CONFIG = SystemConfigFactory.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.file;
package org.qubitpi.athena.file;

import com.qubitpi.athena.metadata.MetaData;
import org.qubitpi.athena.metadata.MetaData;

import jakarta.validation.constraints.NotNull;
import net.jcip.annotations.Immutable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.file.identifier;
package org.qubitpi.athena.file.identifier;

import com.qubitpi.athena.file.File;
import org.qubitpi.athena.file.File;

import java.util.function.Function;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.file.identifier;
package org.qubitpi.athena.file.identifier;

import com.qubitpi.athena.file.File;
import org.qubitpi.athena.file.File;

import jakarta.validation.constraints.NotNull;
import net.jcip.annotations.Immutable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.filestore;
package org.qubitpi.athena.filestore;

import com.qubitpi.athena.file.File;
import com.qubitpi.athena.metadata.MetaData;
import org.qubitpi.athena.file.File;
import org.qubitpi.athena.metadata.MetaData;

import org.qubitpi.athena.metastore.MetaStore;

import jakarta.validation.constraints.NotNull;
import net.jcip.annotations.NotThreadSafe;
Expand All @@ -34,8 +36,8 @@ public interface FileStore {
* Persists a file into object storage database.
* <p>
* Note that calling this method does NOT automatically update the managed metadata of this file in
* {@link com.qubitpi.athena.metastore.MetaStore}. The metadata must be saved separately using
* {@link com.qubitpi.athena.metastore.MetaStore#saveMetaData(String, MetaData)}.
* {@link MetaStore}. The metadata must be saved separately using
* {@link MetaStore#saveMetaData(String, MetaData)}.
* <p>
* The implementation does NOT have to be thread-safe. {@link FileStore} assumes that it is the callers'
* responsibilities to implement the thread safety themselves.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.metadata;
package org.qubitpi.athena.metadata;

/**
* The athena representations of the file extension.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.metadata;

import static com.qubitpi.athena.config.ErrorMessageFormat.MISSING_MAP_KEY;
package org.qubitpi.athena.metadata;

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.qubitpi.athena.config.ErrorMessageFormat;
import org.qubitpi.athena.file.File;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -31,7 +31,7 @@
import java.util.Objects;

/**
* {@link MetaData} is provides information about {@link com.qubitpi.athena.file.File}, but not the content of the file.
* {@link MetaData} is provides information about {@link File}, but not the content of the file.
* <p>
* {@link MetaData} offers the ability to make uploaded metadata and metadata from GraphQL {@link ExecutionResult}
* type-safe.
Expand Down Expand Up @@ -127,13 +127,13 @@ public static MetaData of(final @NotNull ExecutionResult executionResult) {
@NotNull
public static MetaData of(final @NotNull Map<String, Object> fieldMap) {
if (!fieldMap.containsKey(MetaData.FILE_NAME)) {
LOG.error(MISSING_MAP_KEY.logFormat(MetaData.FILE_NAME, fieldMap));
throw new IllegalArgumentException(MISSING_MAP_KEY.format());
LOG.error(ErrorMessageFormat.MISSING_MAP_KEY.logFormat(MetaData.FILE_NAME, fieldMap));
throw new IllegalArgumentException(ErrorMessageFormat.MISSING_MAP_KEY.format());
}

if (!fieldMap.containsKey(MetaData.FILE_TYPE)) {
LOG.error(MISSING_MAP_KEY.logFormat(MetaData.FILE_TYPE, fieldMap));
throw new IllegalArgumentException(MISSING_MAP_KEY.format());
LOG.error(ErrorMessageFormat.MISSING_MAP_KEY.logFormat(MetaData.FILE_TYPE, fieldMap));
throw new IllegalArgumentException(ErrorMessageFormat.MISSING_MAP_KEY.format());
}

return new MetaData(fieldMap.get(FILE_NAME).toString(), FileType.valueOf(fieldMap.get(FILE_TYPE).toString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.metastore;
package org.qubitpi.athena.metastore;

import com.qubitpi.athena.file.File;
import com.qubitpi.athena.metadata.MetaData;
import org.qubitpi.athena.file.File;
import org.qubitpi.athena.metadata.MetaData;

import org.qubitpi.athena.filestore.FileStore;

import graphql.ExecutionResult;
import jakarta.validation.constraints.NotNull;
Expand Down Expand Up @@ -64,7 +66,7 @@ public interface MetaStore {
* responsibilities to implement the thread safety themselves.
*
* @param fileId The ID of the file that has already been uploaded to object storage. The value of the ID must be
* the return value of {@link com.qubitpi.athena.filestore.FileStore#upload(File)} so that the corresponding
* the return value of {@link FileStore#upload(File)} so that the corresponding
* metadata can be retrieved later by calling {@link #getMetaData(String, List)}
* @param metaData The metadata object that is going to be saved into database
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.web.endpoints;
package org.qubitpi.athena.web.endpoints;

import com.qubitpi.athena.file.File;
import com.qubitpi.athena.filestore.FileStore;
import com.qubitpi.athena.metadata.MetaData;
import com.qubitpi.athena.metastore.MetaStore;
import org.qubitpi.athena.file.File;
import org.qubitpi.athena.filestore.FileStore;
import org.qubitpi.athena.metadata.MetaData;
import org.qubitpi.athena.metastore.MetaStore;

import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.web.endpoints;
package org.qubitpi.athena.web.endpoints;

import static com.qubitpi.athena.config.ErrorMessageFormat.INVALID_GRAPHQL_REQUEST;
import static org.qubitpi.athena.config.ErrorMessageFormat.INVALID_GRAPHQL_REQUEST;

import com.qubitpi.athena.metastore.MetaStore;
import com.qubitpi.athena.web.graphql.JsonDocumentParser;
import org.qubitpi.athena.metastore.MetaStore;
import org.qubitpi.athena.web.graphql.JsonDocumentParser;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.web.graphql;
package org.qubitpi.athena.web.graphql;

import static com.qubitpi.athena.config.ErrorMessageFormat.INVALID_GRAPHQL_REQUEST;
import static com.qubitpi.athena.config.ErrorMessageFormat.JSON_DESERIALIZATION_ERROR;
import static org.qubitpi.athena.config.ErrorMessageFormat.INVALID_GRAPHQL_REQUEST;
import static org.qubitpi.athena.config.ErrorMessageFormat.JSON_DESERIALIZATION_ERROR;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.qubitpi.athena.metadata.MetaData;
import org.qubitpi.athena.metadata.MetaData;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.web.graphql;
package org.qubitpi.athena.web.graphql;

import org.qubitpi.athena.web.endpoints.MetaServlet;

import jakarta.validation.constraints.NotNull;

import java.util.Collections;
import java.util.List;

/**
* {@link JsonDocumentParser} is used exclusively by {@link com.qubitpi.athena.web.endpoints.MetaServlet} and is
* {@link JsonDocumentParser} is used exclusively by {@link MetaServlet} and is
* responsible for extracting metadata request info from POST request body, such as file ID and metadata fields that
* client is asking for.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.application
package org.qubitpi.athena.application

import com.qubitpi.athena.file.identifier.FileIdGenerator
import com.qubitpi.athena.file.identifier.FileNameAndUploadedTimeBasedIdGenerator
import com.qubitpi.athena.filestore.FileStore
import com.qubitpi.athena.filestore.TestFileStore
import com.qubitpi.athena.metastore.MetaStore
import com.qubitpi.athena.metastore.TestMetaStore
import com.qubitpi.athena.web.graphql.JacksonParser
import com.qubitpi.athena.web.graphql.JsonDocumentParser

import org.glassfish.hk2.api.DynamicConfiguration
import org.glassfish.hk2.utilities.Binder
import org.qubitpi.athena.file.identifier.FileIdGenerator
import org.qubitpi.athena.file.identifier.FileNameAndUploadedTimeBasedIdGenerator
import org.qubitpi.athena.filestore.FileStore
import org.qubitpi.athena.filestore.TestFileStore
import org.qubitpi.athena.metastore.MetaStore
import org.qubitpi.athena.metastore.TestMetaStore
import org.qubitpi.athena.web.graphql.JacksonParser
import org.qubitpi.athena.web.graphql.JsonDocumentParser

import graphql.schema.DataFetcher
import spock.lang.Shared
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.application
package org.qubitpi.athena.application

import static com.qubitpi.athena.application.ResourceConfigSpec.getBinder
import static com.qubitpi.athena.application.ResourceConfigSpec.getClicker
import static ResourceConfigSpec.getBinder
import static ResourceConfigSpec.getClicker

import org.glassfish.hk2.utilities.Binder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.application
package org.qubitpi.athena.application

import com.qubitpi.athena.config.SystemConfig
import com.qubitpi.athena.config.SystemConfigFactory
import org.qubitpi.athena.config.SystemConfig
import org.qubitpi.athena.config.SystemConfigFactory

import org.glassfish.hk2.utilities.Binder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.file.identifier
package org.qubitpi.athena.file.identifier

import com.qubitpi.athena.file.File
import com.qubitpi.athena.metadata.MetaData

import org.qubitpi.athena.metadata.MetaData

import org.qubitpi.athena.file.File

import spock.lang.Specification

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.qubitpi.athena.metadata
package org.qubitpi.athena.metadata

import spock.lang.Specification
import spock.lang.Unroll
Expand Down
Loading

0 comments on commit 16041f1

Please sign in to comment.