public interface LogicResource
extends org.eclipse.emf.ecore.resource.Resource
org.eclipse.emf.ecore.resource.Resource.Diagnostic, org.eclipse.emf.ecore.resource.Resource.Factory, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.resource.Resource.IOWrappedException
OPTION_CIPHER, OPTION_LINE_DELIMITER, OPTION_LINE_DELIMITER_UNSPECIFIED, OPTION_SAVE_ONLY_IF_CHANGED, OPTION_SAVE_ONLY_IF_CHANGED_FILE_BUFFER, OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER, OPTION_ZIP, RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__TIME_STAMP, RESOURCE__URI, RESOURCE__WARNINGS
Modifier and Type | Method and Description |
---|---|
void |
addSubunit(org.eclipse.emf.ecore.resource.Resource resource)
Add a subunit resource to this logical resource.
|
boolean |
containSubunit(org.eclipse.emf.common.util.URI uri)
Determine if this logical resource contains
a subunit with the given uri
|
org.eclipse.emf.ecore.resource.Resource |
createSubunit(org.eclipse.emf.common.util.URI uri)
Create a subunit with the given URI
|
org.eclipse.emf.common.util.EList |
getFullContents()
Get a list of resouce level object including cross-containment
reference root.
|
java.lang.Object |
getProperty(java.lang.String prop,
java.lang.Object defaultValue)
Returns user's property
Returns defaultValue if property is not defined
|
org.eclipse.emf.ecore.EObject |
getRootElement()
Get the root of this logical model.
|
org.eclipse.emf.ecore.resource.Resource |
getRootResource()
Get the root physical resource of this logical resource
|
org.eclipse.emf.ecore.resource.Resource |
getSubunit(org.eclipse.emf.common.util.URI uri,
boolean loadOnDemand)
Get the subunit associated with the given uri.
|
java.util.List |
getSubunits()
Get all the subunits belong to this logical model
|
boolean |
isRootElement(java.lang.Object object)
Returns true if object is a root element of LogicResource
NOTE: We can't use comparison getRootElement() == object because in closure mode
LogicResource has mutliple roots
|
void |
removeContentAdapter() |
void |
save(java.lang.String toPath)
Save this logical resouce into the destination path.
|
void |
setLoaded(boolean isLoaded)
Set whether this logical resource has been loaded.
|
void |
setProperty(java.lang.String prop,
java.lang.Object value)
Set user's property for resource
|
void |
setRootElement(org.eclipse.emf.ecore.EObject object)
This method should only be used with care.
|
void |
setRootResource(org.eclipse.emf.ecore.resource.Resource resource)
This method should only be used with care.
|
delete, getAllContents, getContents, getEObject, getErrors, getResourceSet, getTimeStamp, getURI, getURIFragment, getWarnings, isLoaded, isModified, isTrackingModification, load, load, save, save, setModified, setTimeStamp, setTrackingModification, setURI, unload
void save(java.lang.String toPath) throws java.io.IOException
toPath
- destination pathjava.io.IOException
org.eclipse.emf.common.util.EList getFullContents()
java.util.List getSubunits()
org.eclipse.emf.ecore.resource.Resource getSubunit(org.eclipse.emf.common.util.URI uri, boolean loadOnDemand)
uri
- given uriloadOnDemand
- whether to load on demandvoid addSubunit(org.eclipse.emf.ecore.resource.Resource resource)
resource
- given subunit resource.org.eclipse.emf.ecore.resource.Resource createSubunit(org.eclipse.emf.common.util.URI uri)
uri
- given URIboolean containSubunit(org.eclipse.emf.common.util.URI uri)
uri
- given uriorg.eclipse.emf.ecore.resource.Resource getRootResource()
org.eclipse.emf.ecore.EObject getRootElement()
boolean isRootElement(java.lang.Object object)
object
- void setRootElement(org.eclipse.emf.ecore.EObject object)
object
- new root of this logical modelvoid setRootResource(org.eclipse.emf.ecore.resource.Resource resource)
resource
- root resource.void setLoaded(boolean isLoaded)
isLoaded
- set whether this logical resoruce has been loaded or not.void setProperty(java.lang.String prop, java.lang.Object value)
prop
- value
- java.lang.Object getProperty(java.lang.String prop, java.lang.Object defaultValue)
void removeContentAdapter()