Package edu.uiuc.ncsa.security.util.json
Class Ingester
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.json.Ingester
-
public class Ingester extends Object
This will ingest a file into the store. The format for a file is either a single JSONObject or an array of them. Each object may have an id set with theSTORE_ID_TAG. If no store id is found then a random id is generated.Created by Jeff Gaynor
on 6/6/19 at 2:14 PM
-
-
Field Summary
Fields Modifier and Type Field Description static StringSTORE_ID_TAG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Identifier>ingest(File file, boolean safeModeOff)List<Identifier>ingest(Reader reader)List<Identifier>ingest(Reader reader, boolean safeModeOff)Ingest the reader.static voidmain(String[] args)protected IdentifiernewID()
-
-
-
Field Detail
-
STORE_ID_TAG
public static String STORE_ID_TAG
-
-
Method Detail
-
ingest
public List<Identifier> ingest(File file, boolean safeModeOff) throws IOException
- Throws:
IOException
-
ingest
public List<Identifier> ingest(Reader reader) throws IOException
- Throws:
IOException
-
ingest
public List<Identifier> ingest(Reader reader, boolean safeModeOff) throws IOException
Ingest the reader. The safe mode switch means that if an existing object with the same identifier is found, it will not be over-written. Note that this returns a list of identifiers for objects added to the store. Note that this closes the reader.- Parameters:
reader-safeModeOff-- Throws:
IOException
-
newID
protected Identifier newID()
-
main
public static void main(String[] args)
-
-