當前位置: 首頁>>代碼示例>>Java>>正文


Java XMLResource類代碼示例

本文整理匯總了Java中org.eclipse.emf.ecore.xmi.XMLResource的典型用法代碼示例。如果您正苦於以下問題:Java XMLResource類的具體用法?Java XMLResource怎麽用?Java XMLResource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XMLResource類屬於org.eclipse.emf.ecore.xmi包,在下文中一共展示了XMLResource類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: configureResourceSet

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
private static void configureResourceSet(ResourceSet rs, URI modelURI, HashMap<String, String> nsURIMapping,
		SubMonitor subMonitor) {

	subMonitor.subTask("Configuring ResourceSet");
	subMonitor.newChild(1);

	final String fileExtension = modelURI.fileExtension();
	// indicates which melange query should be added to the xml uri handler
	// for a given extension
	// use to resolve cross ref URI during XMI parsing
	final XMLURIHandler handler = new XMLURIHandler(modelURI.query(), fileExtension);
	handler.setResourceSet(rs);
	rs.getLoadOptions().put(XMLResource.OPTION_URI_HANDLER, handler);

	final MelangeURIConverter converter = new MelangeURIConverter(nsURIMapping);
	rs.setURIConverter(converter);
	// fix sirius to prevent non intentional model savings
	converter.getURIHandlers().add(0, new DebugURIHandler(converter.getURIHandlers()));
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:20,代碼來源:DefaultModelLoader.java

示例2: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource ( URI uri )
{
    XMLResource result = new ChartResourceImpl ( uri );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );
    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );

    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE );
    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:ChartResourceFactoryImpl.java

示例3: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
@Override
public Resource createResource ( final URI uri )
{
    final XMLResource result = new ProfileResourceImpl ( uri );

    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );
    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );

    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE );

    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_URI_HANDLER, new URIHandlerImpl.PlatformSchemeAware () );

    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:27,代碼來源:ProfileResourceFactoryImpl.java

示例4: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource ( URI uri )
{
    XMLResource result = new MemoryManagerResourceImpl ( uri );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );
    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );

    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE );
    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:MemoryManagerResourceFactoryImpl.java

示例5: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource ( URI uri )
{
    XMLResource result = new ExporterResourceImpl ( uri );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );
    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );

    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE );
    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:ExporterResourceFactoryImpl.java

示例6: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource ( URI uri )
{
    XMLResource result = new ConfigurationResourceImpl ( uri );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );
    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE );

    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );
    result.getDefaultSaveOptions ().put ( XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE );

    result.getDefaultLoadOptions ().put ( XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE );
    return result;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:ConfigurationResourceFactoryImpl.java

示例7: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new DocumentumModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:DocumentumModuleResourceFactoryImpl.java

示例8: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new ProcedureCallModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:ProcedureCallModuleResourceFactoryImpl.java

示例9: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new FixManipModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:FixManipModuleResourceFactoryImpl.java

示例10: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new DatacompareModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:DatacompareModuleResourceFactoryImpl.java

示例11: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new RuncmdsModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:RuncmdsModuleResourceFactoryImpl.java

示例12: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new XmlValidatorModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:XmlValidatorModuleResourceFactoryImpl.java

示例13: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new SoapIOModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:SoapIOModuleResourceFactoryImpl.java

示例14: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new EnvValidatorModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:EnvValidatorModuleResourceFactoryImpl.java

示例15: createResource

import org.eclipse.emf.ecore.xmi.XMLResource; //導入依賴的package包/類
/**
 * Creates an instance of the resource.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override
public Resource createResource(URI uri)
{
  XMLResource result = new MailModuleResourceImpl(uri);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
  result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);

  result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
  result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);

  result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
  return result;
}
 
開發者ID:Morgan-Stanley,項目名稱:Saturn,代碼行數:21,代碼來源:MailModuleResourceFactoryImpl.java


注:本文中的org.eclipse.emf.ecore.xmi.XMLResource類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。