Class ElementDefinitions.BaseBuilder<ELEMENT_DEFS extends ElementDefinitions<ENTITY_DEF,EDGE_DEF>,ENTITY_DEF extends ElementDefinition,EDGE_DEF extends ElementDefinition,CHILD_CLASS extends ElementDefinitions.BaseBuilder<ELEMENT_DEFS,ENTITY_DEF,EDGE_DEF,?>>
- java.lang.Object
-
- uk.gov.gchq.gaffer.data.elementdefinition.ElementDefinitions.BaseBuilder<ELEMENT_DEFS,ENTITY_DEF,EDGE_DEF,CHILD_CLASS>
-
- Type Parameters:
ENTITY_DEF
- the entity definition type.EDGE_DEF
- the entity definition type.
- Direct Known Subclasses:
Schema.BaseBuilder
,View.BaseBuilder
- Enclosing class:
- ElementDefinitions<ENTITY_DEF extends ElementDefinition,EDGE_DEF extends ElementDefinition>
public abstract static class ElementDefinitions.BaseBuilder<ELEMENT_DEFS extends ElementDefinitions<ENTITY_DEF,EDGE_DEF>,ENTITY_DEF extends ElementDefinition,EDGE_DEF extends ElementDefinition,CHILD_CLASS extends ElementDefinitions.BaseBuilder<ELEMENT_DEFS,ENTITY_DEF,EDGE_DEF,?>> extends Object
Builder forElementDefinitions
.
-
-
Method Summary
-
-
-
Method Detail
-
edge
public CHILD_CLASS edge(String group, EDGE_DEF edgeDef)
Adds an edge definition for a given edge type.- Parameters:
group
- the edge typeedgeDef
- the edge definition for the given edge type.- Returns:
- this Builder
-
edges
public CHILD_CLASS edges(Map<String,EDGE_DEF> edges)
-
addEdges
public CHILD_CLASS addEdges(Map<String,EDGE_DEF> edges)
-
entity
public CHILD_CLASS entity(String group, ENTITY_DEF entityDef)
Adds an entity definition for a given entity type.- Parameters:
group
- the entity typeentityDef
- the entity definition for the given entity type.- Returns:
- this Builder
-
entities
public CHILD_CLASS entities(Map<String,ENTITY_DEF> entities)
-
addEntities
public CHILD_CLASS addEntities(Map<String,ENTITY_DEF> entities)
-
removeEdges
public CHILD_CLASS removeEdges(Predicate<Map.Entry<String,EDGE_DEF>> filter)
-
removeEntities
public CHILD_CLASS removeEntities(Predicate<Map.Entry<String,ENTITY_DEF>> filter)
-
json
public CHILD_CLASS json(Class<? extends ELEMENT_DEFS> clazz, Path... filePaths) throws SchemaException
- Throws:
SchemaException
-
json
public CHILD_CLASS json(Class<? extends ELEMENT_DEFS> clazz, InputStream... inputStreams) throws SchemaException
- Throws:
SchemaException
-
json
public CHILD_CLASS json(Class<? extends ELEMENT_DEFS> clazz, byte[]... jsonBytes) throws SchemaException
- Throws:
SchemaException
-
json
public CHILD_CLASS json(Class<? extends ELEMENT_DEFS> clazz, Object... jsonItems) throws SchemaException
- Throws:
SchemaException
-
build
public ELEMENT_DEFS build()
Builds theElementDefinitions
validates it and returns it.- Returns:
- the build
ElementDefinitions
.
-
-