Skip to content
Snippets Groups Projects
Commit a3b7374a authored by Dominique Marcadet's avatar Dominique Marcadet
Browse files

Initial import in new git repositories

parent cde70de9
No related branches found
No related tags found
No related merge requests found
Showing
with 349 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>fr.centralesupelec.edf.riseclipse.cim.cim17.util</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: fr.centralesupelec.edf.riseclipse.cim.cim17.util;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
fr.centralesupelec.edf.riseclipse;bundle-version="1.0.0",
fr.centralesupelec.edf.riseclipse.util;bundle-version="1.0.0",
fr.centralesupelec.edf.riseclipse.cim.headerModel;bundle-version="1.0.0",
fr.centralesupelec.edf.riseclipse.cim.util;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: fr.centralesupelec.edf.riseclipse.cim.cim17.util
# Copyright (c) 2016 CentraleSupélec & EDF.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# This file is part of the RiseClipse tool
#
# Contributors:
# Computer Science Department, CentraleSupélec : initial implementation
# Contacts:
# Dominique.Marcadet@centralesupelec.fr
#
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
# Copyright (c) 2016 CentraleSupélecec & EDF.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# This file is part of the RiseClipse tool
#
# Contributors:
# Computer Science Department, CentraleSupélec : initial implementation
# Contacts:
# Dominique.Marcadet@centralesupelec.fr
#
pluginName = RiseClipse Iec61970cim17 general Metamodel
providerName = CentraleSupélec & EDF
/**
* Copyright (c) 2016 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec : initial implementation
* Contacts:
* Dominique.Marcadet@centralesupelec.fr
*
*/
package fr.centralesupelec.edf.riseclipse.cim.cim17.util;
public class CimConstants extends fr.centralesupelec.edf.riseclipse.cim.util.cimxml.CimConstants {
// CimPackage is specific to each concrete Cim17 metamodel, so we cannot get it here,
// but we prefer to have a generic Cim17 package
//public static final String cimURI = CimPackage.eNS_URI;
public static final String cimURI = "http://iec.ch/TC57/2016/CIM-schema-cim17";
public static final String cimURISharp = cimURI + "#";
}
/**
* Copyright (c) 2016 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec : initial implementation
* Contacts:
* Dominique.Marcadet@centralesupelec.fr
*
*/
package fr.centralesupelec.edf.riseclipse.cim.cim17.util;
import fr.centralesupelec.edf.riseclipse.cim.cim17.util.CimResourceHandler;
/**
* <!-- begin-user-doc -->
* The <b>Resource Factory</b> associated with the package.
* <!-- end-user-doc -->
* @see fr.centralesupelec.edf.riseclipse.cim.cim17.iec61970cim17v16.cim.util.CimResourceImpl
* @generated NOT
*/
public abstract class CimResourceFactoryImpl extends fr.centralesupelec.edf.riseclipse.cim.util.cimxml.CimResourceFactoryImpl {
@Override
protected CimResourceHandler createCimResourceHandler() {
return new CimResourceHandler();
}
} //CimResourceFactoryImpl
/**
* Copyright (c) 2016 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec : initial implementation
* Contacts:
* Dominique.Marcadet@centralesupelec.fr
*
*/
package fr.centralesupelec.edf.riseclipse.cim.cim17.util;
import java.io.OutputStream;
import java.util.Map;
import org.eclipse.emf.ecore.xmi.XMLResource;
public class CimResourceHandler extends fr.centralesupelec.edf.riseclipse.cim.util.cimxml.CimResourceHandler {
static final String xmlDeclaration = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n";
@Override
public void preSave( XMLResource resource, OutputStream outputStream, Map< ?, ? > options ) {
super.preSave( resource, outputStream, options, CimConstants.cimURI );
}
}
/**
* Copyright (c) 2016 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec : initial implementation
* Contacts:
* Dominique.Marcadet@centralesupelec.fr
*
*/
package fr.centralesupelec.edf.riseclipse.cim.cim17.util;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.xmi.XMLHelper;
import org.eclipse.emf.ecore.xmi.XMLSave;
/**
* <!-- begin-user-doc -->
* The <b>Resource </b> associated with the package.
* <!-- end-user-doc -->
* @see fr.centralesupelec.edf.riseclipse.cim.cim17.iec61970cim17v16.cim.util.CimResourceFactoryImpl
* @generated
*/
public abstract class CimResourceImpl extends fr.centralesupelec.edf.riseclipse.cim.util.cimxml.CimResourceImpl {
/**
* Creates an instance of the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param uri the URI of the new resource.
* @generated NOT
*/
public CimResourceImpl( URI uri ) {
super( uri );
}
@Override
protected XMLSave createXMLSave() {
return new CimXMLSaveImpl( createXMLHelper() );
}
@Override
protected XMLHelper createXMLHelper() {
return new CimXMLHelperImpl( this );
}
} // CimResourceImpl
/**
* Copyright (c) 2016 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec : initial implementation
* Contacts:
* Dominique.Marcadet@centralesupelec.fr
*
*/
package fr.centralesupelec.edf.riseclipse.cim.cim17.util;
import java.util.Map;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.xmi.XMLHelper;
import org.eclipse.emf.ecore.xmi.XMLResource;
public abstract class CimXMLHandler extends fr.centralesupelec.edf.riseclipse.cim.util.cimxml.CimXMLHandler {
public CimXMLHandler( XMLResource xmiResource, XMLHelper helper, Map< ?, ? > options ) {
super( CimConstants.cimURI, xmiResource, helper, options );
}
@Override
protected boolean setEnumValue( EObject object, EStructuralFeature feature, String resource ) {
if( resource.startsWith( CimConstants.cimURISharp ) ) {
int enumNameLength = feature.getEType().getName().length();
// do not call fr.centralesupelec.riseclipse.cim.util.cimxml.CimXMLHandler.setFeatureValue to avoid infinite recursion
// call instead org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.setFeatureValue
// We use the fact that SAXXMLHandler.setFeatureValue( EObject, EStructuralFeature, Object ) call
// SAXXMLHandler.setFeatureValue( EObject, EStructuralFeature, Object, -1 )
super.setFeatureValue( object, feature,
resource.substring( CimConstants.cimURISharp.length() + enumNameLength + 1 ), -1 );
return true;
}
return false;
}
}
/**
* Copyright (c) 2016 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec : initial implementation
* Contacts:
* Dominique.Marcadet@centralesupelec.fr
*/
package fr.centralesupelec.edf.riseclipse.cim.cim17.util;
public class CimXMLHelperImpl extends fr.centralesupelec.edf.riseclipse.cim.util.cimxml.CimXMLHelperImpl {
public CimXMLHelperImpl( CimResourceImpl cimResourceImpl ) {
super( cimResourceImpl );
}
@Override
public String getURI( String prefix ) {
String uri = super.getURI( prefix );
if( CimConstants.cimURISharp.equals( uri )) return CimConstants.cimURI;
return uri;
}
}
/**
* Copyright (c) 2016 CentraleSupélec & EDF.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* This file is part of the RiseClipse tool
*
* Contributors:
* Computer Science Department, CentraleSupélec : initial implementation
* Contacts:
* Dominique.Marcadet@centralesupelec.fr
*
*/
package fr.centralesupelec.edf.riseclipse.cim.cim17.util;
import java.util.Map;
import org.eclipse.emf.ecore.xmi.XMLHelper;
public class CimXMLSaveImpl extends fr.centralesupelec.edf.riseclipse.cim.util.cimxml.CimXMLSaveImpl {
public CimXMLSaveImpl( XMLHelper helper ) {
super( CimConstants.cimURI, helper );
}
public CimXMLSaveImpl( Map< ?, ? > options, XMLHelper helper, String encoding ) {
super( CimConstants.cimURI, options, helper, encoding );
}
public CimXMLSaveImpl( Map< ?, ? > options, XMLHelper helper, String encoding, String xmlVersion ) {
super( CimConstants.cimURI, options, helper, encoding, xmlVersion );
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment