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
,FlexmiXmlParser.Handler
public class FlexmiResource extends org.eclipse.emf.ecore.resource.impl.ResourceImpl implements FlexmiXmlParser.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 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 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 Map<org.eclipse.emf.ecore.EClass,List<org.eclipse.emf.ecore.EClass>>
allSubtypesCache
protected Node
currentNode
protected Map<String,org.eclipse.emf.ecore.EClass>
eClassCache
protected EObjectTraceManager
eObjectTraceManager
protected FlexmiFlavour
flavour
protected FrameStack
frameStack
protected com.google.common.collect.BiMap<String,org.eclipse.emf.ecore.EObject>
fullyQualifiedIDs
protected Collection<String>
importedEolModules
protected FlexmiResource
importedFrom
protected Map<org.eclipse.emf.ecore.EObject,String>
localIDs
protected Stack<Object>
objectStack
protected Collection<Operation>
operations
protected Map<org.eclipse.emf.ecore.EObject,List<org.eclipse.emf.ecore.EObject>>
orderedChildren
protected Set<org.eclipse.emf.common.util.URI>
parsedFragmentURIs
protected Stack<org.eclipse.emf.common.util.URI>
parsedFragmentURIStack
protected List<ProcessingInstruction>
processingInstructions
static String
ROOT_NODE_NAME
protected StringSimilarityProvider
stringSimilarityProvider
protected Map<String,Template>
templates
protected 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(String message)
protected void
addParseWarning(String message, int line)
protected void
addParseWarning(String message, org.eclipse.emf.common.util.URI uri, int line)
void
addTemplate(Template template)
FlexmiParser
createParser(BufferedInputStream inputStream)
protected void
doLoad(InputStream inputStream, Map<?,?> options)
protected org.eclipse.emf.ecore.EClass
eClassForName(String name)
protected org.eclipse.emf.ecore.ENamedElement
eNamedElementForName(String name, Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates)
protected org.eclipse.emf.ecore.ENamedElement
eNamedElementForName(String name, Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates, boolean fuzzy)
void
endDocument(Document document)
void
endElement(Element element)
void
endProcessingFragment()
protected List<org.eclipse.emf.ecore.EClass>
getAllConcreteEClasses()
protected List<org.eclipse.emf.ecore.EClass>
getAllSubtypes(org.eclipse.emf.ecore.EClass eClass)
protected 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(String uriFragment)
EObjectTraceManager
getEObjectTraceManager()
protected Object
getEValue(org.eclipse.emf.ecore.EAttribute eAttribute, String attributeName, String value)
FlexmiFlavour
getFlavour()
FrameStack
getFrameStack()
FlexmiResource
getImportedFrom()
int
getLineNumber(Node node)
String
getLocalId(org.eclipse.emf.ecore.EObject eObject)
Collection<Operation>
getOperations()
List<org.eclipse.emf.ecore.EObject>
getOrderedChildren(org.eclipse.emf.ecore.EObject parent)
Set<org.eclipse.emf.common.util.URI>
getParsedFragmentURIs()
List<ProcessingInstruction>
getProcessingInstructions()
FlexmiResource
getRootResource()
Template
getTemplate(String templateName)
Collection<Template>
getTemplates()
List<UnresolvedReference>
getUnresolvedReferences()
void
handleVarAttribute(String attribute, VariableDeclaration.VariableDeclarationType type, NamedNodeMap attributes, org.eclipse.emf.ecore.EObject eObject)
static boolean
isXml(BufferedInputStream inputStream)
static void
main(String[] args)
void
parseEol(String uri)
protected void
performActions(org.eclipse.emf.ecore.EObject eObject)
void
processingInstruction(ProcessingInstruction processingInstruction)
protected boolean
resolveReference(UnresolvedReference unresolvedReference)
protected void
resolveReferences()
void
save(Map<?,?> options)
protected void
setAttributes(org.eclipse.emf.ecore.EObject eObject, Element element)
protected void
setEAttributeValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EAttribute eAttribute, String attributeName, String value)
protected void
setEObjectId(org.eclipse.emf.ecore.EObject eObject, String id)
void
setImportedFrom(FlexmiResource importedFrom)
void
startDocument(Document document)
void
startElement(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 String ROOT_NODE_NAME
- See Also:
- Constant Field Values
-
processingInstructions
protected List<ProcessingInstruction> processingInstructions
-
eObjectTraceManager
protected EObjectTraceManager eObjectTraceManager
-
unresolvedReferences
protected List<UnresolvedReference> unresolvedReferences
-
currentNode
protected Node currentNode
-
importedEolModules
protected Collection<String> importedEolModules
-
allSubtypesCache
protected Map<org.eclipse.emf.ecore.EClass,List<org.eclipse.emf.ecore.EClass>> allSubtypesCache
-
stringSimilarityProvider
protected StringSimilarityProvider stringSimilarityProvider
-
parsedFragmentURIStack
protected Stack<org.eclipse.emf.common.util.URI> parsedFragmentURIStack
-
parsedFragmentURIs
protected Set<org.eclipse.emf.common.util.URI> parsedFragmentURIs
-
fullyQualifiedIDs
protected com.google.common.collect.BiMap<String,org.eclipse.emf.ecore.EObject> fullyQualifiedIDs
-
frameStack
protected FrameStack frameStack
-
actionMap
protected ActionMap actionMap
-
orderedChildren
protected Map<org.eclipse.emf.ecore.EObject,List<org.eclipse.emf.ecore.EObject>> orderedChildren
-
operations
protected Collection<Operation> operations
-
importedFrom
protected FlexmiResource importedFrom
-
flavour
protected FlexmiFlavour flavour
-
-
Method Detail
-
startProcessingFragment
public void startProcessingFragment(org.eclipse.emf.common.util.URI uri)
-
endProcessingFragment
public void endProcessingFragment()
-
getParsedFragmentURIs
public Set<org.eclipse.emf.common.util.URI> getParsedFragmentURIs()
-
addTemplate
public void addTemplate(Template template)
-
getTemplates
public Collection<Template> getTemplates()
-
doLoad
protected void doLoad(InputStream inputStream, Map<?,?> options) throws IOException
- Overrides:
doLoad
in classorg.eclipse.emf.ecore.resource.impl.ResourceImpl
- Throws:
IOException
-
getFlavour
public FlexmiFlavour getFlavour()
-
save
public void save(Map<?,?> options) throws IOException
- Specified by:
save
in interfaceorg.eclipse.emf.ecore.resource.Resource
- Overrides:
save
in classorg.eclipse.emf.ecore.resource.impl.ResourceImpl
- Throws:
IOException
-
setEObjectId
protected void setEObjectId(org.eclipse.emf.ecore.EObject eObject, String id)
-
createParser
public FlexmiParser createParser(BufferedInputStream inputStream)
-
isXml
public static boolean isXml(BufferedInputStream inputStream)
-
getEObject
public org.eclipse.emf.ecore.EObject getEObject(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(Document document)
- Specified by:
startDocument
in interfaceFlexmiXmlParser.Handler
-
startElement
public void startElement(Element element)
- Specified by:
startElement
in interfaceFlexmiXmlParser.Handler
-
endElement
public void endElement(Element element)
- Specified by:
endElement
in interfaceFlexmiXmlParser.Handler
-
processingInstruction
public void processingInstruction(ProcessingInstruction processingInstruction)
- Specified by:
processingInstruction
in interfaceFlexmiXmlParser.Handler
-
getProcessingInstructions
public List<ProcessingInstruction> getProcessingInstructions()
-
endDocument
public void endDocument(Document document)
- Specified by:
endDocument
in interfaceFlexmiXmlParser.Handler
-
getUnresolvedReferences
public List<UnresolvedReference> getUnresolvedReferences()
-
addParseWarning
protected void addParseWarning(String message)
-
addParseWarning
protected void addParseWarning(String message, int line)
-
addParseWarning
protected void addParseWarning(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(Node node)
-
handleVarAttribute
public void handleVarAttribute(String attribute, VariableDeclaration.VariableDeclarationType type, NamedNodeMap attributes, org.eclipse.emf.ecore.EObject eObject)
-
setAttributes
protected void setAttributes(org.eclipse.emf.ecore.EObject eObject, 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, String attributeName, String value)
-
getEValue
protected Object getEValue(org.eclipse.emf.ecore.EAttribute eAttribute, String attributeName, String value)
-
getCandidateStructuralFeaturesForAttribute
protected List<org.eclipse.emf.ecore.EStructuralFeature> getCandidateStructuralFeaturesForAttribute(org.eclipse.emf.ecore.EClass eClass)
-
getAllConcreteEClasses
protected List<org.eclipse.emf.ecore.EClass> getAllConcreteEClasses()
-
getAllSubtypes
protected List<org.eclipse.emf.ecore.EClass> getAllSubtypes(org.eclipse.emf.ecore.EClass eClass)
-
eClassForName
protected org.eclipse.emf.ecore.EClass eClassForName(String name)
-
eNamedElementForName
protected org.eclipse.emf.ecore.ENamedElement eNamedElementForName(String name, Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates)
-
getEObjectTraceManager
public EObjectTraceManager getEObjectTraceManager()
-
eNamedElementForName
protected org.eclipse.emf.ecore.ENamedElement eNamedElementForName(String name, 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 List<org.eclipse.emf.ecore.EObject> getOrderedChildren(org.eclipse.emf.ecore.EObject parent)
-
getFrameStack
public FrameStack getFrameStack()
-
getLocalId
public String getLocalId(org.eclipse.emf.ecore.EObject eObject)
-
getOperations
public Collection<Operation> getOperations()
-
getImportedFrom
public FlexmiResource getImportedFrom()
-
setImportedFrom
public void setImportedFrom(FlexmiResource importedFrom)
-
getRootResource
public FlexmiResource getRootResource()
-
-