congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Resource$Factory$Registry.getFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
getFactory
method
in
org.eclipse.emf.ecore.resource.Resource$Factory$Registry

Best Java code snippets using org.eclipse.emf.ecore.resource.Resource$Factory$Registry.getFactory (Showing top 7 results out of 855)

origin: org.wso2.wsdl.validator/wsdl-validator

Factory factory = parent.getFactory(uri);
Factory defaultFactory = (Factory)INSTANCE.getFactory(URI.createURI(DEFAULT_EXTENSION));
  factory = parent.getFactory(URI.createURI("*.wsdl"));
  factory = parent.getFactory(URI.createURI("*.xsd"));
    factory = parent.getFactory(URI.createURI("*.xsd"));
    factory = parent.getFactory(URI.createURI("*.wsdl"));
origin: org.eclipse.emf/org.eclipse.emf.ecore

public Resource createResource(URI uri, String contentType)
{
 Resource.Factory resourceFactory = getResourceFactoryRegistry().getFactory(uri, contentType);
 if (resourceFactory != null)
 {
  Resource result = resourceFactory.createResource(uri);
  getResources().add(result);
  return result;
 }
 else
 {
  return null;
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

public Resource createResource(URI uri, String contentType)
{
 Resource.Factory resourceFactory = getResourceFactoryRegistry().getFactory(uri, contentType);
 if (resourceFactory != null)
 {
  Resource result = resourceFactory.createResource(uri);
  getResources().add(result);
  return result;
 }
 else
 {
  return null;
 }
}
origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore

 Resource.Factory.Registry.INSTANCE.getFactory(genModelURI).createResource(genModelURI);
GenModel genModel = GenModelFactory.eINSTANCE.createGenModel();
genModelResource.getContents().add(genModel);
origin: org.eclipse/org.eclipse.emf.codegen.ecore

 Resource.Factory.Registry.INSTANCE.getFactory(genModelURI).createResource(genModelURI);
GenModel genModel = GenModelFactory.eINSTANCE.createGenModel();
genModelResource.getContents().add(genModel);
origin: org.eclipse/org.eclipse.jst.j2ee

resourceFactory = getResourceFactoryRegistry().getFactory(uri);
origin: org.eclipse/org.eclipse.jem.util

public Resource createResource(URI uri) {
  if (isReleasing) return null;
  //Check the map first when creating the resource and do not
  //normalize if a value is found.
  boolean isMapped = detectURIMapping(uri);
  boolean hasContentType = (getContentTypeName(uri) != null);
  URI converted = uri;
  if (!isMapped)
    converted = getURIConverter().normalize(uri);
  else if (hasContentType)
    converted = getURIConverter().normalize(uri);
  
  Resource result = createResourceFromHandlers(converted);
  if (result == null) {
    Resource.Factory resourceFactory = getResourceFactoryRegistry().getFactory(uri);
    if (resourceFactory != null)
    {//We got the right factory, now use the right URI
     result = resourceFactory.createResource(converted);
     getResources().add(result);
    }
  }
    
  
  return result;
}
private boolean detectURIMapping(URI uri) {
org.eclipse.emf.ecore.resourceResource$Factory$RegistrygetFactory

Javadoc

Returns the resource factory appropriate for the given URI.

An implementation will (typically) use the URI's URI#scheme to search the #getProtocolToFactoryMap map the URI's URI#fileExtension to search #getExtensionToFactoryMap map, and the URI's URIConverter#contentDescription(URI,Map) to search the #getContentTypeToFactoryMap() map. It will org.eclipse.emf.ecore.resource.Resource.Factory.Descriptor#createFactorya resulting descriptor into a factory. It may choose to provide additional mechanisms and algorithms to determine a factory appropriate for the given URI.

Popular methods of Resource$Factory$Registry

  • getExtensionToFactoryMap
    Returns a map from URI#fileExtension to org.eclipse.emf.ecore.resource.Resource.Factoryor org.eclips
  • getProtocolToFactoryMap
    Returns a map from URI#scheme to org.eclipse.emf.ecore.resource.Resource.Factoryor org.eclipse.emf.e
  • getContentTypeToFactoryMap
    Returns a map from content type identifier to org.eclipse.emf.ecore.resource.Resource.Factoryor org.

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • JCheckBox (javax.swing)
  • JList (javax.swing)
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now