Package org.eclipse.epsilon.flexmi
Class FlexmiResource
- java.lang.Object
-
- org.eclipse.emf.common.notify.impl.BasicNotifierImpl
-
- org.eclipse.emf.common.notify.impl.NotifierImpl
-
- org.eclipse.emf.ecore.resource.impl.ResourceImpl
-
- org.eclipse.epsilon.flexmi.FlexmiResource
-
- All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier
,org.eclipse.emf.ecore.resource.Resource
,org.eclipse.emf.ecore.resource.Resource.Internal
,PseudoSAXParser.Handler
public class FlexmiResource extends org.eclipse.emf.ecore.resource.impl.ResourceImpl implements PseudoSAXParser.Handler
-
-
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>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterList
-
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
Fields Modifier and Type Field Description protected ActionMap
actionMap
protected java.util.Map<org.eclipse.emf.ecore.EClass,java.util.List<org.eclipse.emf.ecore.EClass>>
allSubtypesCache
protected org.w3c.dom.Node
currentNode
protected java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClass>
eClassCache
protected EObjectTraceManager
eObjectTraceManager
protected FrameStack
frameStack
protected com.google.common.collect.BiMap<java.lang.String,org.eclipse.emf.ecore.EObject>
fullyQualifiedIDs
protected java.util.Collection<java.lang.String>
importedEolModules
protected FlexmiResource
importedFrom
protected java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String>
localIDs
protected java.util.Stack<java.lang.Object>
objectStack
protected java.util.Collection<Operation>
operations
protected java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>>
orderedChildren
protected java.util.Set<org.eclipse.emf.common.util.URI>
parsedFragmentURIs
protected java.util.Stack<org.eclipse.emf.common.util.URI>
parsedFragmentURIStack
protected java.util.List<org.w3c.dom.ProcessingInstruction>
processingInstructions
static java.lang.String
ROOT_NODE_NAME
protected StringSimilarityProvider
stringSimilarityProvider
protected java.util.List<Template>
templates
protected java.util.List<UnresolvedReference>
unresolvedReferences
-
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
contents, defaultDeleteOptions, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, timeStamp, 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.resource.Resource
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
-
-
Constructor Summary
Constructors Constructor Description FlexmiResource(org.eclipse.emf.common.util.URI uri)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrderedChild(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EObject child)
protected void
addParseWarning(java.lang.String message)
protected void
addParseWarning(java.lang.String message, int line)
protected void
addParseWarning(java.lang.String message, org.eclipse.emf.common.util.URI uri, int line)
protected void
doLoad(java.io.InputStream inputStream, java.util.Map<?,?> options)
void
doLoadImpl(java.io.InputStream inputStream, java.util.Map<?,?> options)
protected org.eclipse.emf.ecore.EClass
eClassForName(java.lang.String name)
protected org.eclipse.emf.ecore.ENamedElement
eNamedElementForName(java.lang.String name, java.util.Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates)
protected org.eclipse.emf.ecore.ENamedElement
eNamedElementForName(java.lang.String name, java.util.Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates, boolean fuzzy)
void
endDocument(org.w3c.dom.Document document)
void
endElement(org.w3c.dom.Element element)
void
endProcessingFragment()
protected java.util.List<org.eclipse.emf.ecore.EClass>
getAllConcreteEClasses()
protected java.util.List<org.eclipse.emf.ecore.EClass>
getAllSubtypes(org.eclipse.emf.ecore.EClass eClass)
protected java.util.List<org.eclipse.emf.ecore.EStructuralFeature>
getCandidateStructuralFeaturesForAttribute(org.eclipse.emf.ecore.EClass eClass)
org.eclipse.emf.common.util.URI
getCurrentURI()
org.eclipse.emf.ecore.EObject
getEObject(java.lang.String uriFragment)
EObjectTraceManager
getEObjectTraceManager()
protected java.lang.Object
getEValue(org.eclipse.emf.ecore.EAttribute eAttribute, java.lang.String attributeName, java.lang.String value)
FrameStack
getFrameStack()
FlexmiResource
getImportedFrom()
int
getLineNumber(org.w3c.dom.Node node)
java.lang.String
getLocalId(org.eclipse.emf.ecore.EObject eObject)
java.util.Collection<Operation>
getOperations()
java.util.List<org.eclipse.emf.ecore.EObject>
getOrderedChildren(org.eclipse.emf.ecore.EObject parent)
java.util.Set<org.eclipse.emf.common.util.URI>
getParsedFragmentURIs()
java.util.List<org.w3c.dom.ProcessingInstruction>
getProcessingInstructions()
FlexmiResource
getRootResource()
Template
getTemplate(java.lang.String name)
java.util.List<Template>
getTemplates()
java.util.List<UnresolvedReference>
getUnresolvedReferences()
void
handleVarAttribute(java.lang.String attribute, VariableDeclaration.VariableDeclarationType type, org.w3c.dom.NamedNodeMap attributes, org.eclipse.emf.ecore.EObject eObject)
static void
main(java.lang.String[] args)
void
parseEol(java.lang.String uri)
protected void
performActions(org.eclipse.emf.ecore.EObject eObject)
void
processingInstruction(org.w3c.dom.ProcessingInstruction processingInstruction)
protected boolean
resolveReference(UnresolvedReference unresolvedReference)
protected void
resolveReferences()
void
save(java.util.Map<?,?> options)
protected void
setAttributes(org.eclipse.emf.ecore.EObject eObject, org.w3c.dom.Element element)
protected void
setEAttributeValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EAttribute eAttribute, java.lang.String attributeName, java.lang.String value)
protected void
setEObjectId(org.eclipse.emf.ecore.EObject eObject, java.lang.String id)
void
setImportedFrom(FlexmiResource importedFrom)
void
startDocument(org.w3c.dom.Document document)
void
startElement(org.w3c.dom.Element element)
void
startProcessingFragment(org.eclipse.emf.common.util.URI uri)
-
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
addModificationTrackingAdapters, attached, attachedHelper, basicSetResourceSet, createModificationTrackingAdapter, delete, detached, detachedHelper, doSave, doUnload, getAllContents, getAllProperContents, getAllProperContents, getContents, getDefaultURIConverter, getEObject, getEObjectByID, getEObjectForURIFragmentRootSegment, getErrors, getIDForEObject, getIntrinsicIDToEObjectMap, getResourceSet, getTimeStamp, getUnloadingContents, getURI, getURIConverter, getURIFragment, getURIFragmentRootSegment, getWarnings, handleLoadResponse, handleSaveResponse, isAttachedDetachedHelperRequired, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, saveOnlyIfChangedWithFileBuffer, saveOnlyIfChangedWithMemoryBuffer, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTimeStamp, setTrackingModification, setURI, supportIDRelativeURIFragmentPaths, toKeyString, toString, unload, unloaded, useZip
-
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
eBasicAdapterArray, eBasicHasAdapters, eNotificationRequired, eNotify
-
-
-
-
Field Detail
-
ROOT_NODE_NAME
public static final java.lang.String ROOT_NODE_NAME
- See Also:
- Constant Field Values
-
processingInstructions
protected java.util.List<org.w3c.dom.ProcessingInstruction> processingInstructions
-
eObjectTraceManager
protected EObjectTraceManager eObjectTraceManager
-
unresolvedReferences
protected java.util.List<UnresolvedReference> unresolvedReferences
-
objectStack
protected java.util.Stack<java.lang.Object> objectStack
-
currentNode
protected org.w3c.dom.Node currentNode
-
importedEolModules
protected java.util.Collection<java.lang.String> importedEolModules
-
eClassCache
protected java.util.Map<java.lang.String,org.eclipse.emf.ecore.EClass> eClassCache
-
allSubtypesCache
protected java.util.Map<org.eclipse.emf.ecore.EClass,java.util.List<org.eclipse.emf.ecore.EClass>> allSubtypesCache
-
stringSimilarityProvider
protected StringSimilarityProvider stringSimilarityProvider
-
parsedFragmentURIStack
protected java.util.Stack<org.eclipse.emf.common.util.URI> parsedFragmentURIStack
-
parsedFragmentURIs
protected java.util.Set<org.eclipse.emf.common.util.URI> parsedFragmentURIs
-
templates
protected java.util.List<Template> templates
-
fullyQualifiedIDs
protected com.google.common.collect.BiMap<java.lang.String,org.eclipse.emf.ecore.EObject> fullyQualifiedIDs
-
localIDs
protected java.util.Map<org.eclipse.emf.ecore.EObject,java.lang.String> localIDs
-
frameStack
protected FrameStack frameStack
-
actionMap
protected ActionMap actionMap
-
orderedChildren
protected java.util.Map<org.eclipse.emf.ecore.EObject,java.util.List<org.eclipse.emf.ecore.EObject>> orderedChildren
-
operations
protected java.util.Collection<Operation> operations
-
importedFrom
protected FlexmiResource importedFrom
-
-
Method Detail
-
startProcessingFragment
public void startProcessingFragment(org.eclipse.emf.common.util.URI uri)
-
endProcessingFragment
public void endProcessingFragment()
-
getParsedFragmentURIs
public java.util.Set<org.eclipse.emf.common.util.URI> getParsedFragmentURIs()
-
getTemplates
public java.util.List<Template> getTemplates()
-
getTemplate
public Template getTemplate(java.lang.String name)
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
doLoad
protected void doLoad(java.io.InputStream inputStream, java.util.Map<?,?> options) throws java.io.IOException
- Overrides:
doLoad
in classorg.eclipse.emf.ecore.resource.impl.ResourceImpl
- Throws:
java.io.IOException
-
save
public void save(java.util.Map<?,?> options) throws java.io.IOException
- Specified by:
save
in interfaceorg.eclipse.emf.ecore.resource.Resource
- Overrides:
save
in classorg.eclipse.emf.ecore.resource.impl.ResourceImpl
- Throws:
java.io.IOException
-
setEObjectId
protected void setEObjectId(org.eclipse.emf.ecore.EObject eObject, java.lang.String id)
-
doLoadImpl
public void doLoadImpl(java.io.InputStream inputStream, java.util.Map<?,?> options) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getEObject
public org.eclipse.emf.ecore.EObject getEObject(java.lang.String uriFragment)
- Specified by:
getEObject
in interfaceorg.eclipse.emf.ecore.resource.Resource
- Overrides:
getEObject
in classorg.eclipse.emf.ecore.resource.impl.ResourceImpl
-
startDocument
public void startDocument(org.w3c.dom.Document document)
- Specified by:
startDocument
in interfacePseudoSAXParser.Handler
-
startElement
public void startElement(org.w3c.dom.Element element)
- Specified by:
startElement
in interfacePseudoSAXParser.Handler
-
endElement
public void endElement(org.w3c.dom.Element element)
- Specified by:
endElement
in interfacePseudoSAXParser.Handler
-
processingInstruction
public void processingInstruction(org.w3c.dom.ProcessingInstruction processingInstruction)
- Specified by:
processingInstruction
in interfacePseudoSAXParser.Handler
-
parseEol
public void parseEol(java.lang.String uri) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getProcessingInstructions
public java.util.List<org.w3c.dom.ProcessingInstruction> getProcessingInstructions()
-
endDocument
public void endDocument(org.w3c.dom.Document document)
- Specified by:
endDocument
in interfacePseudoSAXParser.Handler
-
getUnresolvedReferences
public java.util.List<UnresolvedReference> getUnresolvedReferences()
-
addParseWarning
protected void addParseWarning(java.lang.String message)
-
addParseWarning
protected void addParseWarning(java.lang.String message, int line)
-
addParseWarning
protected void addParseWarning(java.lang.String message, org.eclipse.emf.common.util.URI uri, int line)
-
performActions
protected void performActions(org.eclipse.emf.ecore.EObject eObject)
-
resolveReferences
protected void resolveReferences()
-
resolveReference
protected boolean resolveReference(UnresolvedReference unresolvedReference)
-
getLineNumber
public int getLineNumber(org.w3c.dom.Node node)
-
handleVarAttribute
public void handleVarAttribute(java.lang.String attribute, VariableDeclaration.VariableDeclarationType type, org.w3c.dom.NamedNodeMap attributes, org.eclipse.emf.ecore.EObject eObject)
-
setAttributes
protected void setAttributes(org.eclipse.emf.ecore.EObject eObject, org.w3c.dom.Element element)
-
getCurrentURI
public org.eclipse.emf.common.util.URI getCurrentURI()
-
setEAttributeValue
protected void setEAttributeValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EAttribute eAttribute, java.lang.String attributeName, java.lang.String value)
-
getEValue
protected java.lang.Object getEValue(org.eclipse.emf.ecore.EAttribute eAttribute, java.lang.String attributeName, java.lang.String value)
-
getCandidateStructuralFeaturesForAttribute
protected java.util.List<org.eclipse.emf.ecore.EStructuralFeature> getCandidateStructuralFeaturesForAttribute(org.eclipse.emf.ecore.EClass eClass)
-
getAllConcreteEClasses
protected java.util.List<org.eclipse.emf.ecore.EClass> getAllConcreteEClasses()
-
getAllSubtypes
protected java.util.List<org.eclipse.emf.ecore.EClass> getAllSubtypes(org.eclipse.emf.ecore.EClass eClass)
-
eClassForName
protected org.eclipse.emf.ecore.EClass eClassForName(java.lang.String name)
-
eNamedElementForName
protected org.eclipse.emf.ecore.ENamedElement eNamedElementForName(java.lang.String name, java.util.Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates)
-
getEObjectTraceManager
public EObjectTraceManager getEObjectTraceManager()
-
eNamedElementForName
protected org.eclipse.emf.ecore.ENamedElement eNamedElementForName(java.lang.String name, java.util.Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates, boolean fuzzy)
-
addOrderedChild
public void addOrderedChild(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EObject child)
-
getOrderedChildren
public java.util.List<org.eclipse.emf.ecore.EObject> getOrderedChildren(org.eclipse.emf.ecore.EObject parent)
-
getFrameStack
public FrameStack getFrameStack()
-
getLocalId
public java.lang.String getLocalId(org.eclipse.emf.ecore.EObject eObject)
-
getOperations
public java.util.Collection<Operation> getOperations()
-
getImportedFrom
public FlexmiResource getImportedFrom()
-
setImportedFrom
public void setImportedFrom(FlexmiResource importedFrom)
-
getRootResource
public FlexmiResource getRootResource()
-
-