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
  • Field Details

    • ROOT_NODE_NAME

      public static final String ROOT_NODE_NAME
      See Also:
    • processingInstructions

      protected List<ProcessingInstruction> processingInstructions
    • eObjectTraceManager

      protected EObjectTraceManager eObjectTraceManager
    • unresolvedReferences

      protected List<UnresolvedReference> unresolvedReferences
    • objectStack

      protected Stack<Object> objectStack
    • currentNode

      protected Node currentNode
    • importedEolModules

      protected Collection<String> importedEolModules
    • eClassCache

      protected Map<String,org.eclipse.emf.ecore.EClass> eClassCache
    • 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
    • templates

      protected Map<String,Template> templates
    • fullyQualifiedIDs

      protected com.google.common.collect.BiMap<String,org.eclipse.emf.ecore.EObject> fullyQualifiedIDs
    • localIDs

      protected Map<org.eclipse.emf.ecore.EObject,String> localIDs
    • 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
    • documentEnded

      protected boolean documentEnded
  • Constructor Details

    • FlexmiResource

      public FlexmiResource(org.eclipse.emf.common.util.URI uri)
  • Method Details

    • 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)
    • getTemplate

      public Template getTemplate(String templateName)
    • getTemplates

      public Collection<Template> getTemplates()
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • doLoad

      protected void doLoad(InputStream inputStream, Map<?,?> options) throws IOException
      Overrides:
      doLoad in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
      Throws:
      IOException
    • getFlavour

      public FlexmiFlavour getFlavour()
    • save

      public void save(Map<?,?> options) throws IOException
      Specified by:
      save in interface org.eclipse.emf.ecore.resource.Resource
      Overrides:
      save in class org.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 interface org.eclipse.emf.ecore.resource.Resource
      Overrides:
      getEObject in class org.eclipse.emf.ecore.resource.impl.ResourceImpl
    • startDocument

      public void startDocument(Document document)
      Specified by:
      startDocument in interface FlexmiXmlParser.Handler
    • startElement

      public void startElement(Element element)
      Specified by:
      startElement in interface FlexmiXmlParser.Handler
    • endElement

      public void endElement(Element element)
      Specified by:
      endElement in interface FlexmiXmlParser.Handler
    • processingInstruction

      public void processingInstruction(ProcessingInstruction processingInstruction)
      Specified by:
      processingInstruction in interface FlexmiXmlParser.Handler
    • parseEol

      public void parseEol(String uri) throws Exception
      Throws:
      Exception
    • getProcessingInstructions

      public List<ProcessingInstruction> getProcessingInstructions()
    • isDocumentEnded

      public boolean isDocumentEnded()
    • endDocument

      public void endDocument(Document document)
      Specified by:
      endDocument in interface FlexmiXmlParser.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, boolean split)
    • 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()