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

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • setContentView (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • 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