edu.cmu.sei.aadl.model.core.util
Class CoreResourceImpl

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended by org.eclipse.emf.common.notify.impl.NotifierImpl
          extended by org.eclipse.emf.ecore.resource.impl.ResourceImpl
              extended by org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl
                  extended by org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
                      extended by edu.cmu.sei.aadl.model.core.util.CoreResourceImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.resource.Resource, org.eclipse.emf.ecore.resource.Resource.Internal, org.eclipse.emf.ecore.xmi.XMIResource, org.eclipse.emf.ecore.xmi.XMLResource

public class CoreResourceImpl
extends org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl

The Resource associated with the package.

See Also:
CoreResourceFactoryImpl

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
org.eclipse.emf.ecore.resource.impl.ResourceImpl.ContentsEList<E extends java.lang.Object & org.eclipse.emf.ecore.EObject>, org.eclipse.emf.ecore.resource.impl.ResourceImpl.ModificationTrackingAdapter
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends java.lang.Object & org.eclipse.emf.common.notify.Adapter>
 
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.xmi.XMLResource
org.eclipse.emf.ecore.xmi.XMLResource.ResourceEntityHandler, org.eclipse.emf.ecore.xmi.XMLResource.ResourceHandler, org.eclipse.emf.ecore.xmi.XMLResource.URIHandler, org.eclipse.emf.ecore.xmi.XMLResource.XMLInfo, org.eclipse.emf.ecore.xmi.XMLResource.XMLMap
 
Nested classes/interfaces inherited from interface 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
 
Field Summary
static java.lang.String copyright
           
static boolean doSaveAsEMF
          flag to indicate that the XML files should use EMF default references
static boolean expandDefault
          flag to indicate that XML should save with defaults filled in
 
Fields inherited from class org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl
DETACHED_EOBJECT_TO_ID_MAP, domHandler, encoding, eObjectToExtensionMap, eObjectToIDMap, idToEObjectMap, publicId, systemId, useZip, xmlVersion
 
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
contents, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, unloadingContents, uri, warnings
 
Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG
 
Fields inherited from interface org.eclipse.emf.ecore.xmi.XMIResource
OPTION_USE_XMI_TYPE, VERSION_NAME, VERSION_VALUE, XMI_ID, XMI_NAMESPACE_PREFIX, XMI_NS, XMI_TAG_NAME, XMI_URI
 
Fields inherited from interface org.eclipse.emf.ecore.xmi.XMLResource
HREF, NIL, NO_NAMESPACE_SCHEMA_LOCATION, OPTION_ANY_SIMPLE_TYPE, OPTION_ANY_TYPE, OPTION_CONFIGURATION_CACHE, OPTION_DECLARE_XML, OPTION_DEFER_ATTACHMENT, OPTION_DEFER_IDREF_RESOLUTION, OPTION_DISABLE_NOTIFY, OPTION_DOM_USE_NAMESPACES_IN_SCOPE, OPTION_ENCODING, OPTION_EXTENDED_META_DATA, OPTION_FLUSH_THRESHOLD, OPTION_FORMATTED, OPTION_KEEP_DEFAULT_CONTENT, OPTION_LAX_FEATURE_PROCESSING, OPTION_LINE_WIDTH, OPTION_PARSER_FEATURES, OPTION_PARSER_PROPERTIES, OPTION_PROCESS_DANGLING_HREF, OPTION_PROCESS_DANGLING_HREF_DISCARD, OPTION_PROCESS_DANGLING_HREF_RECORD, OPTION_PROCESS_DANGLING_HREF_THROW, OPTION_RECORD_ANY_TYPE_NAMESPACE_DECLARATIONS, OPTION_RECORD_UNKNOWN_FEATURE, OPTION_RESOURCE_ENTITY_HANDLER, OPTION_RESOURCE_HANDLER, OPTION_ROOT_OBJECTS, OPTION_SAVE_DOCTYPE, OPTION_SAVE_TYPE_INFORMATION, OPTION_SCHEMA_LOCATION, OPTION_SCHEMA_LOCATION_IMPLEMENTATION, OPTION_SKIP_ESCAPE, OPTION_SKIP_ESCAPE_URI, OPTION_URI_HANDLER, OPTION_USE_CACHED_LOOKUP_TABLE, OPTION_USE_DEPRECATED_METHODS, OPTION_USE_ENCODED_ATTRIBUTE_STYLE, OPTION_USE_FILE_BUFFER, OPTION_USE_LEXICAL_HANDLER, OPTION_USE_PARSER_POOL, OPTION_USE_XML_NAME_TO_FEATURE_MAP, OPTION_XML_MAP, OPTION_XML_OPTIONS, OPTION_XML_VERSION, SCHEMA_LOCATION, TYPE, XML_NS, XML_SCHEMA_URI, XSI_NS, XSI_URI
 
Fields inherited from interface org.eclipse.emf.ecore.resource.Resource
OPTION_CIPHER, 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__URI, RESOURCE__WARNINGS
 
Constructor Summary
CoreResourceImpl(org.eclipse.emf.common.util.URI uri)
          Creates an instance of the resource.
 
Method Summary
protected  org.eclipse.emf.ecore.xmi.XMLHelper createXMLHelper()
           
protected  org.eclipse.emf.ecore.xmi.XMLLoad createXMLLoad()
           
protected  org.eclipse.emf.ecore.xmi.XMLSave createXMLSave()
           
protected  org.eclipse.emf.ecore.EObject getEObject(java.util.List uriFragmentPath)
          Returns the object based on the fragment path as a list of Strings.
 boolean getJustParsed()
          Get the just parsed flag value
 boolean getJustSaved()
          Get the just saved flag value
 long getTimeStamp()
           
 boolean isContributed()
           
 boolean isNewerThan(org.eclipse.core.resources.IResource compFile)
          compare modification date of this resource to the parameter based on LocalTimeStamp
 boolean isNewerThan(org.eclipse.emf.ecore.resource.Resource res)
          compare modification date of this resource to the parameter based on LocalTimeStamp
 boolean isShadowed()
           
 void load()
           
 void load(java.util.Map options)
           
 void save()
          save the resource
 void save(java.util.Map options)
          save the resource
 void saveAsEMF(org.eclipse.emf.common.util.URI uri)
          save the resource
 void setContributed()
           
 void setJustParsed(boolean b)
          Set the just parsed flag value
 void setJustSaved(boolean b)
          Set the just saved flag value
 void setShadowed(boolean s)
           
 void setShouldSave(boolean b)
           
 boolean shouldSave()
           
protected  boolean useUUIDs()
           
 
Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
getXMINamespace, getXMIVersion, setXMINamespace, setXMIVersion, useIDs
 
Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl
assignIDsWhileLoading, attachedHelper, detachedHelper, doLoad, doLoad, doLoad, doSave, doSave, doUnload, getDefaultLoadOptions, getDefaultSaveOptions, getDOMHelper, getEncoding, getEObjectByID, getEObjectToExtensionMap, getEObjectToIDMap, getID, getIDToEObjectMap, getPublicId, getSystemId, getURIFragment, getXMLVersion, init, isAttachedDetachedHelperRequired, isPath, load, load, save, save, setDoctypeInfo, setEncoding, setID, setUseZip, setXMLVersion, toKeyString, useIDAttributes, useZip
 
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
addModificationTrackingAdapters, attached, basicSetResourceSet, createModificationTrackingAdapter, detached, getAllContents, getAllProperContents, getAllProperContents, getContents, getDefaultURIConverter, getEObject, getEObjectForURIFragmentRootSegment, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getURI, getURIConverter, getURIFragmentRootSegment, getWarnings, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTrackingModification, setURI, toString, unload, unloaded
 
Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
eAdapters, eBasicAdapters, eDeliver, eSetDeliver
 
Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
eNotificationRequired, eNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.ecore.xmi.XMLResource
getDefaultLoadOptions, getDefaultSaveOptions, getDOMHelper, getEncoding, getEObjectToExtensionMap, getEObjectToIDMap, getID, getIDToEObjectMap, getPublicId, getSystemId, getXMLVersion, load, load, save, save, setDoctypeInfo, setEncoding, setID, setUseZip, setXMLVersion, useZip
 
Methods inherited from interface org.eclipse.emf.ecore.resource.Resource
getAllContents, getContents, getEObject, getErrors, getResourceSet, getURI, getURIFragment, getWarnings, isLoaded, isModified, isTrackingModification, load, save, setModified, setTrackingModification, setURI, unload
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values

doSaveAsEMF

public static boolean doSaveAsEMF
flag to indicate that the XML files should use EMF default references


expandDefault

public static boolean expandDefault
flag to indicate that XML should save with defaults filled in

Constructor Detail

CoreResourceImpl

public CoreResourceImpl(org.eclipse.emf.common.util.URI uri)
Creates an instance of the resource.

Parameters:
uri - the URI of the new resource.
Method Detail

createXMLHelper

protected org.eclipse.emf.ecore.xmi.XMLHelper createXMLHelper()
Overrides:
createXMLHelper in class org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl

createXMLLoad

protected org.eclipse.emf.ecore.xmi.XMLLoad createXMLLoad()
Overrides:
createXMLLoad in class org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl

createXMLSave

protected org.eclipse.emf.ecore.xmi.XMLSave createXMLSave()
Overrides:
createXMLSave in class org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl

save

public void save()
save the resource


saveAsEMF

public void saveAsEMF(org.eclipse.emf.common.util.URI uri)
save the resource


save

public void save(java.util.Map options)
save the resource

Specified by:
save in interface org.eclipse.emf.ecore.resource.Resource
Overrides:
save in class org.eclipse.emf.ecore.resource.impl.ResourceImpl

load

public void load()
          throws java.io.IOException
Throws:
java.io.IOException

load

public void load(java.util.Map options)
          throws java.io.IOException
Specified by:
load in interface org.eclipse.emf.ecore.resource.Resource
Overrides:
load in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
Throws:
java.io.IOException

getJustSaved

public boolean getJustSaved()
Get the just saved flag value

Returns:
true if just saved.

setJustSaved

public void setJustSaved(boolean b)
Set the just saved flag value


getJustParsed

public boolean getJustParsed()
Get the just parsed flag value

Returns:
true if just parsed.

setJustParsed

public void setJustParsed(boolean b)
Set the just parsed flag value


setShouldSave

public void setShouldSave(boolean b)

shouldSave

public boolean shouldSave()

getTimeStamp

public long getTimeStamp()

isNewerThan

public boolean isNewerThan(org.eclipse.emf.ecore.resource.Resource res)
compare modification date of this resource to the parameter based on LocalTimeStamp

Parameters:
res - Resource to be compared against

isNewerThan

public boolean isNewerThan(org.eclipse.core.resources.IResource compFile)
compare modification date of this resource to the parameter based on LocalTimeStamp

Parameters:
compFile - IResource to be compared against

getEObject

protected org.eclipse.emf.ecore.EObject getEObject(java.util.List uriFragmentPath)
Returns the object based on the fragment path as a list of Strings.

Overrides:
getEObject in class org.eclipse.emf.ecore.resource.impl.ResourceImpl

setContributed

public void setContributed()

isContributed

public boolean isContributed()

isShadowed

public boolean isShadowed()

setShadowed

public void setShadowed(boolean s)

useUUIDs

protected boolean useUUIDs()
Overrides:
useUUIDs in class org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl