public class ImportEntry
extends info.textgrid._import.ImportObject
implements info.textgrid.utils.export.aggregations.IAggregationEntry, info.textgrid.utils.export.aggregations.IAggregation
ImportObject
, it is a child /
entry in an ImportModel
. Clients should use getObjectRef()
to access the TextGridObject
imported by this entry and
getLocalFile()
to get access to the file.Constructor and Description |
---|
ImportEntry() |
Modifier and Type | Method and Description |
---|---|
void |
addChild(ImportEntry importEntry) |
ImportEntry |
addFile(File child,
IProgressMonitor monitor) |
ImportEntry |
addFile(File file,
IProgressMonitor monitor,
ISpecialImportEntrySupplier supplier) |
ImportEntry |
addObject(TGObjectReference textGridObject,
File parent,
IProgressMonitor monitor) |
protected void |
adjustFile(com.google.common.base.Optional<IPath> oldRoot)
Adjusts the internal file object for an updated root folder.
|
List<ImportEntry> |
getChildEntries() |
com.google.common.collect.ImmutableList<? extends info.textgrid.utils.export.aggregations.IAggregationEntry> |
getChildren() |
TextGridObject |
getExistingObject()
If this is a reimport, return the existing object, else
null
. |
String |
getLocalData()
Returns the file name for the local data file as it will be represented
in the specification file.
|
File |
getLocalFile() |
File |
getLocalMetadataFile() |
info.textgrid.namespaces.metadata.core._2010.ObjectType |
getMetadata() |
ImportModel |
getModel() |
TextGridObject |
getObject() |
TGObjectReference |
getObjectRef() |
com.google.common.base.Optional<? extends info.textgrid.utils.export.aggregations.IAggregation> |
getParent() |
RewriteSetup |
getRewriteSetup() |
ISpecialImportEntrySupplier |
getSupplier() |
String |
getTextgridUri()
Returns the URI for the import object.
|
URI |
getTextGridURI() |
com.google.common.base.Optional<? extends info.textgrid.utils.export.aggregations.IAggregationEntry> |
getWork() |
protected void |
initializeLoadedEntryForImport(IProgressMonitor monitor) |
boolean |
isNewRevisionImport()
Returns
true if this object will be re-imported as a new
revision, i.e. |
boolean |
isReimport()
Returns
true if this file has previously been exported from
the repository. |
boolean |
mayHaveChildren() |
protected void |
sanitize()
This method sanitizes those values of the
ImportEntry for which
ImportEntry supplies special handling and which are
serialized using JAXB . |
void |
setLocalData(String value) |
void |
setLocalMetadata(String value) |
void |
setObjectRef(TGObjectReference object) |
void |
setOriginalURI(URI uri) |
void |
setRewriteSetup(RewriteSetup setup) |
void |
setSupplier(ISpecialImportEntrySupplier supplier) |
void |
setTextgridUri(String value) |
String |
toString() |
public String getTextgridUri()
getTextgridUri
in class info.textgrid._import.ImportObject
ImportObject.getTextgridUri()
public TextGridObject getObject()
public void setTextgridUri(String value)
setTextgridUri
in class info.textgrid._import.ImportObject
public String getLocalData()
Returns the file name for the local data file as it will be represented
in the specification file. This file name is typically relative to the
path returned by ImportModel.getRoot()
.
Clients that wish to access the actual file should use
getLocalFile()
instead to avoid messing with relative path
resolution.
getLocalData
in class info.textgrid._import.ImportObject
ImportObject.getLocalData()
public void setLocalData(String value)
setLocalData
in class info.textgrid._import.ImportObject
protected void adjustFile(com.google.common.base.Optional<IPath> oldRoot)
oldRoot
- the previous root.public void setObjectRef(TGObjectReference object)
public TGObjectReference getObjectRef()
public void addChild(ImportEntry importEntry)
public boolean mayHaveChildren()
public List<ImportEntry> getChildEntries()
public ImportModel getModel()
public ImportEntry addFile(File file, IProgressMonitor monitor, ISpecialImportEntrySupplier supplier)
public ImportEntry addObject(TGObjectReference textGridObject, File parent, IProgressMonitor monitor)
public RewriteSetup getRewriteSetup()
public void setRewriteSetup(RewriteSetup setup)
public File getLocalFile()
public File getLocalMetadataFile()
public void setLocalMetadata(String value)
setLocalMetadata
in class info.textgrid._import.ImportObject
public void setOriginalURI(URI uri)
public void setSupplier(ISpecialImportEntrySupplier supplier)
public ImportEntry addFile(File child, IProgressMonitor monitor)
public ISpecialImportEntrySupplier getSupplier()
protected void sanitize()
ImportEntry
for which
ImportEntry
supplies special handling and which are
serialized using JAXB
. It is called internally before saving and
after loading from JAXB just to make sure everything is up-to-date.public TextGridObject getExistingObject()
null
. The existing object may not yet have been initialized.public boolean isReimport()
true
if this file has previously been exported from
the repository.public boolean isNewRevisionImport()
true
if this object will be re-imported as a new
revision, i.e. it's a reimport,
we should try to import
as new revisions and the original object has been exported from the
current target project.protected void initializeLoadedEntryForImport(IProgressMonitor monitor)
public com.google.common.collect.ImmutableList<? extends info.textgrid.utils.export.aggregations.IAggregationEntry> getChildren()
getChildren
in interface info.textgrid.utils.export.aggregations.IAggregation
public info.textgrid.namespaces.metadata.core._2010.ObjectType getMetadata()
getMetadata
in interface info.textgrid.utils.export.aggregations.IAggregationEntry
public com.google.common.base.Optional<? extends info.textgrid.utils.export.aggregations.IAggregation> getParent()
getParent
in interface info.textgrid.utils.export.aggregations.IAggregationEntry
public URI getTextGridURI()
getTextGridURI
in interface info.textgrid.utils.export.aggregations.IAggregationEntry
public com.google.common.base.Optional<? extends info.textgrid.utils.export.aggregations.IAggregationEntry> getWork()
getWork
in interface info.textgrid.utils.export.aggregations.IAggregation