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 ActionMapactionMapprotected Map<org.eclipse.emf.ecore.EClass,List<org.eclipse.emf.ecore.EClass>>allSubtypesCacheprotected NodecurrentNodeprotected Map<String,org.eclipse.emf.ecore.EClass>eClassCacheprotected EObjectTraceManagereObjectTraceManagerprotected FlexmiFlavourflavourprotected FrameStackframeStackprotected com.google.common.collect.BiMap<String,org.eclipse.emf.ecore.EObject>fullyQualifiedIDsprotected Collection<String>importedEolModulesprotected FlexmiResourceimportedFromprotected Map<org.eclipse.emf.ecore.EObject,String>localIDsprotected Stack<Object>objectStackprotected Collection<Operation>operationsprotected Map<org.eclipse.emf.ecore.EObject,List<org.eclipse.emf.ecore.EObject>>orderedChildrenprotected Set<org.eclipse.emf.common.util.URI>parsedFragmentURIsprotected Stack<org.eclipse.emf.common.util.URI>parsedFragmentURIStackprotected List<ProcessingInstruction>processingInstructionsstatic StringROOT_NODE_NAMEprotected StringSimilarityProviderstringSimilarityProviderprotected Map<String,Template>templatesprotected 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 voidaddOrderedChild(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EObject child)protected voidaddParseWarning(String message)protected voidaddParseWarning(String message, int line)protected voidaddParseWarning(String message, org.eclipse.emf.common.util.URI uri, int line)voidaddTemplate(Template template)FlexmiParsercreateParser(BufferedInputStream inputStream)protected voiddoLoad(InputStream inputStream, Map<?,?> options)protected org.eclipse.emf.ecore.EClasseClassForName(String name)protected org.eclipse.emf.ecore.ENamedElementeNamedElementForName(String name, Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates)protected org.eclipse.emf.ecore.ENamedElementeNamedElementForName(String name, Collection<? extends org.eclipse.emf.ecore.ENamedElement> candidates, boolean fuzzy)voidendDocument(Document document)voidendElement(Element element)voidendProcessingFragment()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.URIgetCurrentURI()org.eclipse.emf.ecore.EObjectgetEObject(String uriFragment)EObjectTraceManagergetEObjectTraceManager()protected ObjectgetEValue(org.eclipse.emf.ecore.EAttribute eAttribute, String attributeName, String value)FlexmiFlavourgetFlavour()FrameStackgetFrameStack()FlexmiResourcegetImportedFrom()intgetLineNumber(Node node)StringgetLocalId(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()FlexmiResourcegetRootResource()TemplategetTemplate(String templateName)Collection<Template>getTemplates()List<UnresolvedReference>getUnresolvedReferences()voidhandleVarAttribute(String attribute, VariableDeclaration.VariableDeclarationType type, NamedNodeMap attributes, org.eclipse.emf.ecore.EObject eObject)static booleanisXml(BufferedInputStream inputStream)static voidmain(String[] args)voidparseEol(String uri)protected voidperformActions(org.eclipse.emf.ecore.EObject eObject)voidprocessingInstruction(ProcessingInstruction processingInstruction)protected booleanresolveReference(UnresolvedReference unresolvedReference)protected voidresolveReferences()voidsave(Map<?,?> options)protected voidsetAttributes(org.eclipse.emf.ecore.EObject eObject, Element element)protected voidsetEAttributeValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EAttribute eAttribute, String attributeName, String value)protected voidsetEObjectId(org.eclipse.emf.ecore.EObject eObject, String id)voidsetImportedFrom(FlexmiResource importedFrom)voidstartDocument(Document document)voidstartElement(Element element)voidstartProcessingFragment(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:
doLoadin classorg.eclipse.emf.ecore.resource.impl.ResourceImpl- Throws:
IOException
-
getFlavour
public FlexmiFlavour getFlavour()
-
save
public void save(Map<?,?> options) throws IOException
- Specified by:
savein interfaceorg.eclipse.emf.ecore.resource.Resource- Overrides:
savein 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:
getEObjectin interfaceorg.eclipse.emf.ecore.resource.Resource- Overrides:
getEObjectin classorg.eclipse.emf.ecore.resource.impl.ResourceImpl
-
startDocument
public void startDocument(Document document)
- Specified by:
startDocumentin interfaceFlexmiXmlParser.Handler
-
startElement
public void startElement(Element element)
- Specified by:
startElementin interfaceFlexmiXmlParser.Handler
-
endElement
public void endElement(Element element)
- Specified by:
endElementin interfaceFlexmiXmlParser.Handler
-
processingInstruction
public void processingInstruction(ProcessingInstruction processingInstruction)
- Specified by:
processingInstructionin interfaceFlexmiXmlParser.Handler
-
getProcessingInstructions
public List<ProcessingInstruction> getProcessingInstructions()
-
endDocument
public void endDocument(Document document)
- Specified by:
endDocumentin 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()
-
-