public class SaifReader extends AbstractReader<Record> implements RecordIterator, RecordDefinitionFactory, RecordReader
The SaifReader.
SaifWriter| Constructor and Description |
|---|
SaifReader() |
SaifReader(File file)
Create a new SaifReader to read the SAIF archive from the specified file .
|
SaifReader(org.springframework.core.io.Resource resource) |
SaifReader(String fileName)
Create a new SaifReader to read the SAIF archive from the specified file
name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the SAIF archive.
|
RecordDefinitionFactory |
getDeclaredRecordDefinitionFactory()
Get the schema definition declared in the SAIF archive.
|
Record |
getExportedObjects()
Get the list of exported objects for the SAIF archive.
|
RecordFactory |
getFactory() |
File |
getFile() |
Record |
getGlobalMetadata()
Get the global metatdata for the SAIF archive.
|
Record |
getImportedObjects()
Get the list of imported objects for the SAIF archive.
|
Record |
getInternallyReferencedObjects()
Get the list of internally referenced objects for the SAIF archive.
|
OsnReader |
getOsnReader(String className) |
<D extends Record> |
getOsnReader(String className,
RecordFactory factory) |
RecordDefinition |
getRecordDefinition() |
RecordDefinition |
getRecordDefinition(String typePath) |
RecordDefinitionFactory |
getRecordDefinitionFactory()
Get the schema definition that will be set on each data object.
|
int |
getSrid() |
Map<String,String> |
getTypeNameFileNameMap() |
List<String> |
getTypeNames() |
boolean |
hasNext()
Check to see if the reader has more data objects to be read.
|
Iterator<Record> |
iterator()
Return a new iterator for type T at the first item to read.
|
Record |
next()
Get the next data object read by this reader.
|
void |
open()
Open a SAIF archive, extracting compressed archives to a temporary
directory.
|
protected Record |
readObject(String className,
RecordFactory factory) |
void |
remove()
Removing SAIF objects is not supported.
|
void |
setDeclaredRecordDefinitionFactory(RecordDefinitionFactory declaredRecordDefinitionFactory)
Set the schema definition declared in the SAIF archive.
|
void |
setExcludeTypeNames(Collection<String> excludeTypeNames) |
void |
setFactory(RecordFactory factory) |
void |
setFile(File file) |
void |
setIncludeTypeNames(Collection<String> includeTypeNames) |
void |
setRecordDefinitionFactory(RecordDefinitionFactory recordDefinitionFactory)
Set the schema definition that will be set on each data object.
|
void |
setSrid(int srid) |
void |
setTypeNameFileNameMap(Map<String,String> typePathObjectSetMap) |
String |
toString() |
read, visitclearProperties, getProperties, getProperty, getProperty, removeProperty, setProperties, setProperty, setPropertySoft, setPropertyWeakclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearProperties, getProperties, getProperty, getProperty, removeProperty, setProperties, setProperty, setPropertySoft, setPropertyWeakpublic SaifReader()
public SaifReader(File file)
file - The SAIF archive file to read.public SaifReader(org.springframework.core.io.Resource resource)
public SaifReader(String fileName)
fileName - The name of the SAIF archive file to read.public void close()
close in interface RecordIteratorclose in interface Reader<Record>close in interface AutoCloseableclose in class AbstractObjectWithPropertiespublic RecordDefinitionFactory getDeclaredRecordDefinitionFactory()
public Record getExportedObjects()
public RecordFactory getFactory()
public File getFile()
public Record getGlobalMetadata()
public Record getImportedObjects()
public Record getInternallyReferencedObjects()
public OsnReader getOsnReader(String className) throws IOException
IOExceptionpublic <D extends Record> OsnReader getOsnReader(String className, RecordFactory factory) throws IOException
IOExceptionpublic RecordDefinition getRecordDefinition()
getRecordDefinition in interface RecordReaderpublic RecordDefinition getRecordDefinition(String typePath)
getRecordDefinition in interface RecordDefinitionFactorypublic RecordDefinitionFactory getRecordDefinitionFactory()
public int getSrid()
public Map<String,String> getTypeNameFileNameMap()
public boolean hasNext()
public Iterator<Record> iterator()
Readerpublic Record next()
next in interface RecordIteratornext in interface Iterator<Record>NoSuchElementException - If the reader has no more data objects.public void open()
open in interface RecordIteratoropen in interface Reader<Record>protected Record readObject(String className, RecordFactory factory) throws IOException
IOExceptionpublic void remove()
remove in interface Iterator<Record>UnsupportedOperationExceptionpublic void setDeclaredRecordDefinitionFactory(RecordDefinitionFactory declaredRecordDefinitionFactory)
declaredSchema - The schema definition.public void setExcludeTypeNames(Collection<String> excludeTypeNames)
excludeTypeNames - the excludeTypeNames to setpublic void setFactory(RecordFactory factory)
factory - the factory to setpublic void setFile(File file)
public void setIncludeTypeNames(Collection<String> includeTypeNames)
includeTypeNames - the includeTypeNames to setpublic void setRecordDefinitionFactory(RecordDefinitionFactory recordDefinitionFactory)
schema - The schema definition.public void setSrid(int srid)
public void setTypeNameFileNameMap(Map<String,String> typePathObjectSetMap)
typePathObjectSetMap - the typePathObjectSetMap to setpublic String toString()
toString in interface RecordIteratortoString in class ObjectCopyright © 2015 Revolution Systems Inc.. All rights reserved.