-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
613ec3d
commit 4df3738
Showing
43 changed files
with
8,722 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
src/main/java/org/geonetwork/index/model/record/AttributeTable.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,27 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@RequiredArgsConstructor | ||
public class AttributeTable { | ||
String name; | ||
String definition; | ||
String code; | ||
String link; | ||
String type; | ||
String cardinality; | ||
@Singular | ||
List<CodeListValue> values; | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/org/geonetwork/index/model/record/CodeListValue.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,23 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@RequiredArgsConstructor | ||
public class CodeListValue { | ||
String label; | ||
String definition; | ||
String code; | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/org/geonetwork/index/model/record/Codelist.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import com.fasterxml.jackson.annotation.JsonAnyGetter; | ||
import com.fasterxml.jackson.annotation.JsonAnySetter; | ||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import lombok.*; | ||
|
||
import java.util.Map; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@RequiredArgsConstructor | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class Codelist { | ||
@JsonAnySetter | ||
@JsonAnyGetter | ||
@JsonIgnore | ||
@Singular | ||
Map<String, String> properties; | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/org/geonetwork/index/model/record/Contact.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,37 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import static org.geonetwork.index.model.record.IndexRecordFieldNames.ORGANISATION_NAME; | ||
|
||
|
||
@Data | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class Contact { | ||
|
||
private String role; | ||
private String individual; | ||
|
||
@JsonProperty(ORGANISATION_NAME) | ||
private Map<String, String> organisation = new HashMap<>(); | ||
private String email; | ||
private String logo; | ||
private String phone; | ||
private String address; | ||
private String website; | ||
private String position; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/org/geonetwork/index/model/record/CrsDetails.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,18 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class CrsDetails { | ||
private String code; | ||
private String codeSpace; | ||
private String name; | ||
private String url; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/org/geonetwork/index/model/record/DateRange.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,17 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class DateRange { | ||
|
||
private String gte; | ||
private String lte; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/org/geonetwork/index/model/record/DateRangeDetails.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,17 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class DateRangeDetails { | ||
|
||
private DateRangeDetailsInfo start; | ||
private DateRangeDetailsInfo end; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/org/geonetwork/index/model/record/DateRangeDetailsInfo.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,18 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class DateRangeDetailsInfo { | ||
String date; | ||
String frame; | ||
String calendarEraName; | ||
String indeterminatePosition; | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/org/geonetwork/index/model/record/FeatureType.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,26 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@RequiredArgsConstructor | ||
public class FeatureType { | ||
String typeName; | ||
String definition; | ||
String code; | ||
String isAbstract; | ||
String aliases; | ||
@Singular("attributeTable") | ||
List<AttributeTable> attributeTable; | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/org/geonetwork/index/model/record/HashMapSerializer.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 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
package org.geonetwork.index.model.record; | ||
|
||
import com.fasterxml.jackson.core.JsonGenerator; | ||
import com.fasterxml.jackson.databind.JsonSerializer; | ||
import com.fasterxml.jackson.databind.SerializerProvider; | ||
|
||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.Map; | ||
|
||
public class HashMapSerializer extends JsonSerializer<Map<String, ArrayList<Object>>> { | ||
@Override | ||
public void serialize(Map<String, ArrayList<Object>> map, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { | ||
map.keySet().forEach(key -> { | ||
try { | ||
jsonGenerator.writeFieldName(key); | ||
jsonGenerator.writeStartArray(); | ||
map.get(key).forEach(value -> { | ||
try { | ||
jsonGenerator.writeObject(value); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
}); | ||
jsonGenerator.writeEndArray(); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
}); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/org/geonetwork/index/model/record/Index.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,27 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.nio.file.Path; | ||
|
||
@Getter | ||
@Setter | ||
@ToString | ||
public class Index { | ||
|
||
private String name; | ||
private IndexType type; | ||
|
||
Path getConfigFile() { | ||
return null; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/main/java/org/geonetwork/index/model/record/IndexDocumentType.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,12 @@ | ||
/* | ||
* (c) 2003 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, | ||
* available at the root application directory. | ||
*/ | ||
|
||
|
||
package org.geonetwork.index.model.record; | ||
|
||
public enum IndexDocumentType { | ||
metadata, features | ||
} |
Oops, something went wrong.