-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…atedStore-RemoveGraphAndDeleteAccumuloTable
- Loading branch information
Showing
42 changed files
with
1,555 additions
and
802 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
core/data/src/main/java/uk/gov/gchq/gaffer/data/generator/CsvFormat.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,40 @@ | ||
/* | ||
* Copyright 2022 Crown Copyright | ||
* | ||
* 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 uk.gov.gchq.gaffer.data.generator; | ||
|
||
import uk.gov.gchq.gaffer.data.element.IdentifierType; | ||
|
||
import java.util.LinkedHashMap; | ||
|
||
public abstract class CsvFormat { | ||
public static final String ENTITY_GROUP = "ENTITY_GROUP"; | ||
public static final String EDGE_GROUP = "EDGE_GROUP"; | ||
private static LinkedHashMap<String, String> identifiers = new LinkedHashMap<String, String>(); | ||
public abstract String getVertex(); | ||
public abstract String getEntityGroup(); | ||
public abstract String getEdgeGroup(); | ||
public abstract String getSource(); | ||
public abstract String getDestination(); | ||
public static LinkedHashMap<String, String> getIdentifiers(final CsvFormat csvFormat) { | ||
identifiers.put(String.valueOf(IdentifierType.VERTEX), csvFormat.getVertex()); | ||
identifiers.put(ENTITY_GROUP, csvFormat.getEntityGroup()); | ||
identifiers.put(EDGE_GROUP, csvFormat.getEdgeGroup()); | ||
identifiers.put(String.valueOf(IdentifierType.SOURCE), csvFormat.getSource()); | ||
identifiers.put(String.valueOf(IdentifierType.DESTINATION), csvFormat.getDestination()); | ||
return identifiers; | ||
} | ||
} |
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
48 changes: 48 additions & 0 deletions
48
core/data/src/main/java/uk/gov/gchq/gaffer/data/generator/Neo4jFormat.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,48 @@ | ||
/* | ||
* Copyright 2022 Crown Copyright | ||
* | ||
* 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 uk.gov.gchq.gaffer.data.generator; | ||
|
||
import org.codehaus.jackson.annotate.JsonIgnore; | ||
|
||
public class Neo4jFormat extends CsvFormat { | ||
|
||
@JsonIgnore | ||
@Override | ||
public String getVertex() { | ||
return "_id"; | ||
} | ||
@JsonIgnore | ||
@Override | ||
public String getEntityGroup() { | ||
return "_labels"; | ||
} | ||
@JsonIgnore | ||
@Override | ||
public String getEdgeGroup() { | ||
return "_type"; | ||
} | ||
@JsonIgnore | ||
@Override | ||
public String getSource() { | ||
return "_start"; | ||
} | ||
@JsonIgnore | ||
@Override | ||
public String getDestination() { | ||
return "_end"; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
core/data/src/main/java/uk/gov/gchq/gaffer/data/generator/NeptuneFormat.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,53 @@ | ||
/* | ||
* Copyright 2022 Crown Copyright | ||
* | ||
* 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 uk.gov.gchq.gaffer.data.generator; | ||
|
||
import org.codehaus.jackson.annotate.JsonIgnore; | ||
|
||
public class NeptuneFormat extends CsvFormat { | ||
|
||
@Override | ||
@JsonIgnore | ||
public String getVertex() { | ||
return ":ID"; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
public String getEntityGroup() { | ||
return ":LABEL"; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
public String getEdgeGroup() { | ||
return ":TYPE"; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
public String getSource() { | ||
return ":START_ID"; | ||
} | ||
|
||
@Override | ||
@JsonIgnore | ||
public String getDestination() { | ||
return ":END_ID"; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.