-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to import schema defined in JSON format via file path or sirectly via JSON string. This implementation doesn't migrate or update alreadfined schema elements. Neither it removes existing defined elements. SchemaInitStrategy is defined in mind to be able to implement migration and more advance schema manage ev current JSON schema importer implementation isimple. This work is made in hopes to simplify schema definition for beginers, speed-up prototypes development based on JanusGraph, and simplify testing. Signed-off-by: Oleksandr Porunov <alexandr.porunov@gmail.com>
- Loading branch information
Showing
43 changed files
with
2,479 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
janusgraph-core/src/main/java/org/janusgraph/core/schema/IndicesActivationType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2024 JanusGraph Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package org.janusgraph.core.schema; | ||
|
||
import org.janusgraph.graphdb.configuration.ConfigName; | ||
|
||
public enum IndicesActivationType implements ConfigName { | ||
SKIP_ACTIVATION("skip_activation"), | ||
REINDEX_AND_ENABLE_UPDATED_ONLY("reindex_and_enable_updated_only"), | ||
REINDEX_AND_ENABLE_NON_ENABLED("reindex_and_enable_non_enabled"), | ||
FORCE_ENABLE_UPDATED_ONLY("force_enable_updated_only"), | ||
FORCE_ENABLE_NON_ENABLED("force_enable_non_enabled"); | ||
|
||
private final String configurationOptionName; | ||
|
||
IndicesActivationType(String configurationOptionName){ | ||
this.configurationOptionName = configurationOptionName; | ||
} | ||
|
||
@Override | ||
public String getConfigName() { | ||
return configurationOptionName; | ||
} | ||
} |
Oops, something went wrong.