diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource')
20 files changed, 3642 insertions, 3642 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java index 7f2a9937bf..3c3b645f36 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceFolder.java @@ -1,70 +1,70 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>CDO Resource Folder</b></em>'.
- *
- * @apiviz.landmark
- * @apiviz.composedOf {@link CDOResourceNode} - - nodes
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc -->
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes <em>Nodes</em>}</li>
- * </ul>
- * </p>
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceFolder()
- * @model
- * @generated
- */
-public interface CDOResourceFolder extends CDOResourceNode
-{
- /**
- * Returns the value of the '<em><b>Nodes</b></em>' containment reference list. The list contents are of type
- * {@link org.eclipse.emf.cdo.eresource.CDOResourceNode}. It is bidirectional and its opposite is '
- * {@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}'. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Nodes</em>' containment reference list isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Nodes</em>' containment reference list.
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceFolder_Nodes()
- * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder
- * @model opposite="folder" containment="true"
- * @generated
- */
- EList<CDOResourceNode> getNodes();
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @model
- * @generated
- */
- CDOResourceFolder addResourceFolder(String name);
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @model
- * @generated
- */
- CDOResource addResource(String name);
-
-} // CDOResourceFolder
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource; + +import org.eclipse.emf.common.util.EList; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>CDO Resource Folder</b></em>'. + * + * @apiviz.landmark + * @apiviz.composedOf {@link CDOResourceNode} - - nodes + * @noextend This interface is not intended to be extended by clients. + * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes <em>Nodes</em>}</li> + * </ul> + * </p> + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceFolder() + * @model + * @generated + */ +public interface CDOResourceFolder extends CDOResourceNode +{ + /** + * Returns the value of the '<em><b>Nodes</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.eresource.CDOResourceNode}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Nodes</em>' containment reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Nodes</em>' containment reference list. + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceFolder_Nodes() + * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder + * @model opposite="folder" containment="true" + * @generated + */ + EList<CDOResourceNode> getNodes(); + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @model + * @generated + */ + CDOResourceFolder addResourceFolder(String name); + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @model + * @generated + */ + CDOResource addResource(String name); + +} // CDOResourceFolder diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java index f23ae8d369..3ba8622869 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOResourceNode.java @@ -1,149 +1,149 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource;
-
-import org.eclipse.emf.cdo.CDOObject;
-
-import org.eclipse.emf.common.util.URI;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>CDO Resource Node</b></em>'.
- *
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc -->
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath <em>Path</em>}</li>
- * </ul>
- * </p>
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode()
- * @model abstract="true"
- * @extends CDOObject
- * @generated
- */
-public interface CDOResourceNode extends CDOObject
-{
- /**
- * @ADDED
- * @since 2.0
- */
- public static final String ROOT_PATH = "/"; //$NON-NLS-1$
-
- /**
- * @ADDED
- * @since 2.0
- */
- public static final String ROOT_NAME = null;
-
- /**
- * @ADDED
- * @since 2.0
- */
- public boolean isRoot();
-
- /**
- * Returns the value of the '<em><b>Folder</b></em>' container reference. It is bidirectional and its opposite is '
- * {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes <em>Nodes</em>}'. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Folder</em>' container reference isn't clear, there really should be more of a
- * description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Folder</em>' container reference.
- * @see #setFolder(CDOResourceFolder)
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Folder()
- * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes
- * @model opposite="nodes" transient="false"
- * @generated
- */
- CDOResourceFolder getFolder();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}' container
- * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Folder</em>' container reference.
- * @see #getFolder()
- * @generated
- */
- void setFolder(CDOResourceFolder value);
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Name()
- * @model annotation="http://www.eclipse.org/CDO/DBStore columnType='VARCHAR' columnLength='255'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getName <em>Name</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Path</em>' attribute isn't clear, there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Path</em>' attribute.
- * @see #setPath(String)
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Path()
- * @model transient="true" volatile="true" derived="true"
- * @generated
- */
- String getPath();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath <em>Path</em>}' attribute. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Path</em>' attribute.
- * @see #getPath()
- * @generated
- */
- void setPath(String value);
-
- /**
- * @ADDED
- */
- public URI getURI();
-
- /**
- * @ADDED
- */
- public void delete(Map<?, ?> options) throws IOException;
-
-} // CDOResourceNode
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource; + +import org.eclipse.emf.cdo.CDOObject; + +import org.eclipse.emf.common.util.URI; + +import java.io.IOException; +import java.util.Map; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>CDO Resource Node</b></em>'. + * + * @noextend This interface is not intended to be extended by clients. + * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}</li> + * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath <em>Path</em>}</li> + * </ul> + * </p> + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode() + * @model abstract="true" + * @extends CDOObject + * @generated + */ +public interface CDOResourceNode extends CDOObject +{ + /** + * @ADDED + * @since 2.0 + */ + public static final String ROOT_PATH = "/"; //$NON-NLS-1$ + + /** + * @ADDED + * @since 2.0 + */ + public static final String ROOT_NAME = null; + + /** + * @ADDED + * @since 2.0 + */ + public boolean isRoot(); + + /** + * Returns the value of the '<em><b>Folder</b></em>' container reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes <em>Nodes</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Folder</em>' container reference isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Folder</em>' container reference. + * @see #setFolder(CDOResourceFolder) + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Folder() + * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes + * @model opposite="nodes" transient="false" + * @generated + */ + CDOResourceFolder getFolder(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}' container + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Folder</em>' container reference. + * @see #getFolder() + * @generated + */ + void setFolder(CDOResourceFolder value); + + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Name() + * @model annotation="http://www.eclipse.org/CDO/DBStore columnType='VARCHAR' columnLength='255'" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getName <em>Name</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Path</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Path</em>' attribute. + * @see #setPath(String) + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOResourceNode_Path() + * @model transient="true" volatile="true" derived="true" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath <em>Path</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Path</em>' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * @ADDED + */ + public URI getURI(); + + /** + * @ADDED + */ + public void delete(Map<?, ?> options) throws IOException; + +} // CDOResourceNode diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOTextResource.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOTextResource.java index 1bbc3e91ba..07923d7c3d 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOTextResource.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/CDOTextResource.java @@ -1,61 +1,61 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource;
-
-import org.eclipse.emf.cdo.common.lob.CDOClob;
-
-import java.io.Reader;
-
-/**
- * <!-- begin-user-doc --> A representation of the model object '<em><b>CDO Text Resource</b></em>'.
- *
- * @since 4.1
- * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc -->
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.emf.cdo.eresource.CDOTextResource#getContents <em>Contents</em>}</li>
- * </ul>
- * </p>
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOTextResource()
- * @model
- * @generated
- */
-public interface CDOTextResource extends CDOFileResource<Reader>
-{
- /**
- * Returns the value of the '<em><b>Contents</b></em>' attribute. <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Contents</em>' attribute isn't clear, there really should be more of a description
- * here...
- * </p>
- * <!-- end-user-doc -->
- *
- * @return the value of the '<em>Contents</em>' attribute.
- * @see #setContents(CDOClob)
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOTextResource_Contents()
- * @model dataType="org.eclipse.emf.cdo.etypes.Clob" required="true"
- * @generated
- */
- CDOClob getContents();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOTextResource#getContents <em>Contents</em>}'
- * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param value
- * the new value of the '<em>Contents</em>' attribute.
- * @see #getContents()
- * @generated
- */
- void setContents(CDOClob value);
-
-} // CDOTextResource
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource; + +import org.eclipse.emf.cdo.common.lob.CDOClob; + +import java.io.Reader; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>CDO Text Resource</b></em>'. + * + * @since 4.1 + * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.eresource.CDOTextResource#getContents <em>Contents</em>}</li> + * </ul> + * </p> + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOTextResource() + * @model + * @generated + */ +public interface CDOTextResource extends CDOFileResource<Reader> +{ + /** + * Returns the value of the '<em><b>Contents</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Contents</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Contents</em>' attribute. + * @see #setContents(CDOClob) + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#getCDOTextResource_Contents() + * @model dataType="org.eclipse.emf.cdo.etypes.Clob" required="true" + * @generated + */ + CDOClob getContents(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.eresource.CDOTextResource#getContents <em>Contents</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Contents</em>' attribute. + * @see #getContents() + * @generated + */ + void setContents(CDOClob value); + +} // CDOTextResource diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java index 058cbc5ba5..61fc5a5f7a 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourceFactory.java @@ -1,77 +1,77 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc --> The <b>Factory</b> for the Eresource model. It provides a create method for each non-abstract
- * class of the model.
- *
- * @apiviz.exclude
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage
- * @generated
- */
-public interface EresourceFactory extends EFactory
-{
- /**
- * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EresourceFactory eINSTANCE = org.eclipse.emf.cdo.eresource.impl.EresourceFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>CDO Resource Folder</em>'. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @return a new object of class '<em>CDO Resource Folder</em>'.
- * @generated
- */
- CDOResourceFolder createCDOResourceFolder();
-
- /**
- * Returns a new object of class '<em>CDO Resource</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return a new object of class '<em>CDO Resource</em>'.
- * @generated
- */
- CDOResource createCDOResource();
-
- /**
- * Returns a new object of class '<em>CDO Binary Resource</em>'. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return a new object of class '<em>CDO Binary Resource</em>'.
- * @generated
- */
- CDOBinaryResource createCDOBinaryResource();
-
- /**
- * Returns a new object of class '<em>CDO Text Resource</em>'. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return a new object of class '<em>CDO Text Resource</em>'.
- * @generated
- */
- CDOTextResource createCDOTextResource();
-
- /**
- * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the package supported by this factory.
- * @generated
- */
- EresourcePackage getEresourcePackage();
-
-} // EresourceFactory
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource; + +import org.eclipse.emf.ecore.EFactory; + +/** + * <!-- begin-user-doc --> The <b>Factory</b> for the Eresource model. It provides a create method for each non-abstract + * class of the model. + * + * @apiviz.exclude + * @noextend This interface is not intended to be extended by clients. + * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.EresourcePackage + * @generated + */ +public interface EresourceFactory extends EFactory +{ + /** + * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EresourceFactory eINSTANCE = org.eclipse.emf.cdo.eresource.impl.EresourceFactoryImpl.init(); + + /** + * Returns a new object of class '<em>CDO Resource Folder</em>'. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @return a new object of class '<em>CDO Resource Folder</em>'. + * @generated + */ + CDOResourceFolder createCDOResourceFolder(); + + /** + * Returns a new object of class '<em>CDO Resource</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>CDO Resource</em>'. + * @generated + */ + CDOResource createCDOResource(); + + /** + * Returns a new object of class '<em>CDO Binary Resource</em>'. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return a new object of class '<em>CDO Binary Resource</em>'. + * @generated + */ + CDOBinaryResource createCDOBinaryResource(); + + /** + * Returns a new object of class '<em>CDO Text Resource</em>'. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return a new object of class '<em>CDO Text Resource</em>'. + * @generated + */ + CDOTextResource createCDOTextResource(); + + /** + * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the package supported by this factory. + * @generated + */ + EresourcePackage getEresourcePackage(); + +} // EresourceFactory diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java index 4c55800797..a02bb37ee6 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/EresourcePackage.java @@ -1,1042 +1,1042 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc --> The <b>Package</b> for the Eresource model. It contains accessors for the meta objects to
- * represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- *
- * @apiviz.exclude
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.EresourceFactory
- * @model kind="package"
- * @generated
- */
-public interface EresourcePackage extends EPackage
-{
- /**
- * The package name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNAME = "eresource"; //$NON-NLS-1$
-
- /**
- * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/emf/CDO/Eresource/4.0.0"; //$NON-NLS-1$
-
- /**
- * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- String eNS_PREFIX = "eresource"; //$NON-NLS-1$
-
- /**
- * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EresourcePackage eINSTANCE = org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl
- * <em>CDO Resource Node</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceNode()
- * @generated
- */
- int CDO_RESOURCE_NODE = 0;
-
- /**
- * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_NODE__FOLDER = 0;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_NODE__NAME = 1;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_NODE__PATH = 2;
-
- /**
- * The number of structural features of the '<em>CDO Resource Node</em>' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_NODE_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl
- * <em>CDO Resource Folder</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceFolder()
- * @generated
- */
- int CDO_RESOURCE_FOLDER = 1;
-
- /**
- * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_FOLDER__FOLDER = CDO_RESOURCE_NODE__FOLDER;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_FOLDER__NAME = CDO_RESOURCE_NODE__NAME;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_FOLDER__PATH = CDO_RESOURCE_NODE__PATH;
-
- /**
- * The feature id for the '<em><b>Nodes</b></em>' containment reference list. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_FOLDER__NODES = CDO_RESOURCE_NODE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>CDO Resource Folder</em>' class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_FOLDER_FEATURE_COUNT = CDO_RESOURCE_NODE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl
- * <em>CDO Resource Leaf</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceLeaf()
- * @generated NOT
- */
- int CDO_RESOURCE_LEAF = 7;
-
- /**
- * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_LEAF__FOLDER = CDO_RESOURCE_NODE__FOLDER;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_LEAF__NAME = CDO_RESOURCE_NODE__NAME;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_LEAF__PATH = CDO_RESOURCE_NODE__PATH;
-
- /**
- * The number of structural features of the '<em>CDO Resource Leaf</em>' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_LEAF_FEATURE_COUNT = CDO_RESOURCE_NODE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl <em>CDO Resource</em>}'
- * class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResource()
- * @generated
- */
- int CDO_RESOURCE = 2;
-
- /**
- * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__FOLDER = CDO_RESOURCE_LEAF__FOLDER;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__NAME = CDO_RESOURCE_LEAF__NAME;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__PATH = CDO_RESOURCE_LEAF__PATH;
-
- /**
- * The feature id for the '<em><b>Resource Set</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__RESOURCE_SET = CDO_RESOURCE_LEAF_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>URI</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__URI = CDO_RESOURCE_LEAF_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Contents</b></em>' containment reference list. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__CONTENTS = CDO_RESOURCE_LEAF_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Modified</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__MODIFIED = CDO_RESOURCE_LEAF_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Loaded</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__LOADED = CDO_RESOURCE_LEAF_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Tracking Modification</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__TRACKING_MODIFICATION = CDO_RESOURCE_LEAF_FEATURE_COUNT + 5;
-
- /**
- * The feature id for the '<em><b>Errors</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__ERRORS = CDO_RESOURCE_LEAF_FEATURE_COUNT + 6;
-
- /**
- * The feature id for the '<em><b>Warnings</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__WARNINGS = CDO_RESOURCE_LEAF_FEATURE_COUNT + 7;
-
- /**
- * The feature id for the '<em><b>Time Stamp</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE__TIME_STAMP = CDO_RESOURCE_LEAF_FEATURE_COUNT + 8;
-
- /**
- * The number of structural features of the '<em>CDO Resource</em>' class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- * @ordered
- */
- int CDO_RESOURCE_FEATURE_COUNT = CDO_RESOURCE_LEAF_FEATURE_COUNT + 9;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl
- * <em>CDO File Resource</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOFileResource()
- * @generated NOT
- */
- int CDO_FILE_RESOURCE = 8;
-
- /**
- * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_FILE_RESOURCE__FOLDER = CDO_RESOURCE_LEAF__FOLDER;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_FILE_RESOURCE__NAME = CDO_RESOURCE_LEAF__NAME;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_FILE_RESOURCE__PATH = CDO_RESOURCE_LEAF__PATH;
-
- /**
- * The number of structural features of the '<em>CDO File Resource</em>' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_FILE_RESOURCE_FEATURE_COUNT = CDO_RESOURCE_LEAF_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl
- * <em>CDO Binary Resource</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOBinaryResource()
- * @generated NOT
- */
- int CDO_BINARY_RESOURCE = 9;
-
- /**
- * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_BINARY_RESOURCE__FOLDER = CDO_FILE_RESOURCE__FOLDER;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_BINARY_RESOURCE__NAME = CDO_FILE_RESOURCE__NAME;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_BINARY_RESOURCE__PATH = CDO_FILE_RESOURCE__PATH;
-
- /**
- * The feature id for the '<em><b>Contents</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_BINARY_RESOURCE__CONTENTS = CDO_FILE_RESOURCE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>CDO Binary Resource</em>' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_BINARY_RESOURCE_FEATURE_COUNT = CDO_FILE_RESOURCE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl
- * <em>CDO Text Resource</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOTextResource()
- * @generated NOT
- */
- int CDO_TEXT_RESOURCE = 10;
-
- /**
- * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_TEXT_RESOURCE__FOLDER = CDO_FILE_RESOURCE__FOLDER;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_TEXT_RESOURCE__NAME = CDO_FILE_RESOURCE__NAME;
-
- /**
- * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_TEXT_RESOURCE__PATH = CDO_FILE_RESOURCE__PATH;
-
- /**
- * The feature id for the '<em><b>Contents</b></em>' attribute. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_TEXT_RESOURCE__CONTENTS = CDO_FILE_RESOURCE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>CDO Text Resource</em>' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CDO_TEXT_RESOURCE_FEATURE_COUNT = CDO_FILE_RESOURCE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '<em>Resource Set</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.ecore.resource.ResourceSet
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getResourceSet()
- * @generated NOT
- */
- int RESOURCE_SET = 3;
-
- /**
- * The meta object id for the '<em>URI</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.common.util.URI
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getURI()
- * @generated NOT
- */
- int URI = 4;
-
- /**
- * The meta object id for the '<em>Diagnostic</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.ecore.resource.Resource.Diagnostic
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getDiagnostic()
- * @generated NOT
- */
- int DIAGNOSTIC = 5;
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode <em>CDO Resource Node</em>}
- * '. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the meta object for class '<em>CDO Resource Node</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceNode
- * @generated
- */
- EClass getCDOResourceNode();
-
- /**
- * Returns the meta object for the container reference '
- * {@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}'. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the meta object for the container reference '<em>Folder</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder()
- * @see #getCDOResourceNode()
- * @generated
- */
- EReference getCDOResourceNode_Folder();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getName
- * <em>Name</em>}'. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getName()
- * @see #getCDOResourceNode()
- * @generated
- */
- EAttribute getCDOResourceNode_Name();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath
- * <em>Path</em>}'. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Path</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath()
- * @see #getCDOResourceNode()
- * @generated
- */
- EAttribute getCDOResourceNode_Path();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder
- * <em>CDO Resource Folder</em>}'. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the meta object for class '<em>CDO Resource Folder</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder
- * @generated
- */
- EClass getCDOResourceFolder();
-
- /**
- * Returns the meta object for the containment reference list '
- * {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes <em>Nodes</em>}'. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Nodes</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes()
- * @see #getCDOResourceFolder()
- * @generated
- */
- EReference getCDOResourceFolder_Nodes();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResource <em>CDO Resource</em>}'. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for class '<em>CDO Resource</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource
- * @generated
- */
- EClass getCDOResource();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getResourceSet
- * <em>Resource Set</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Resource Set</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#getResourceSet()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_ResourceSet();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getURI <em>URI</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>URI</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#getURI()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_URI();
-
- /**
- * Returns the meta object for the containment reference list '
- * {@link org.eclipse.emf.cdo.eresource.CDOResource#getContents <em>Contents</em>}'. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @return the meta object for the containment reference list '<em>Contents</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#getContents()
- * @see #getCDOResource()
- * @generated
- */
- EReference getCDOResource_Contents();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#isModified
- * <em>Modified</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Modified</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#isModified()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_Modified();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#isLoaded
- * <em>Loaded</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Loaded</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#isLoaded()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_Loaded();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#isTrackingModification
- * <em>Tracking Modification</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Tracking Modification</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#isTrackingModification()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_TrackingModification();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.eresource.CDOResource#getErrors
- * <em>Errors</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute list '<em>Errors</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#getErrors()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_Errors();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.eresource.CDOResource#getWarnings
- * <em>Warnings</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute list '<em>Warnings</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#getWarnings()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_Warnings();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp
- * <em>Time Stamp</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for the attribute '<em>Time Stamp</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp()
- * @see #getCDOResource()
- * @generated
- */
- EAttribute getCDOResource_TimeStamp();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResourceLeaf <em>CDO Resource Leaf</em>}
- * '. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the meta object for class '<em>CDO Resource Leaf</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceLeaf
- * @generated
- */
- EClass getCDOResourceLeaf();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOFileResource <em>CDO File Resource</em>}
- * '. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the meta object for class '<em>CDO File Resource</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOFileResource
- * @generated
- */
- EClass getCDOFileResource();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOBinaryResource
- * <em>CDO Binary Resource</em>}'. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the meta object for class '<em>CDO Binary Resource</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOBinaryResource
- * @generated
- */
- EClass getCDOBinaryResource();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOBinaryResource#getContents
- * <em>Contents</em>}'. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Contents</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOBinaryResource#getContents()
- * @see #getCDOBinaryResource()
- * @generated
- */
- EAttribute getCDOBinaryResource_Contents();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOTextResource <em>CDO Text Resource</em>}
- * '. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the meta object for class '<em>CDO Text Resource</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOTextResource
- * @generated
- */
- EClass getCDOTextResource();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOTextResource#getContents
- * <em>Contents</em>}'. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Contents</em>'.
- * @see org.eclipse.emf.cdo.eresource.CDOTextResource#getContents()
- * @see #getCDOTextResource()
- * @generated
- */
- EAttribute getCDOTextResource_Contents();
-
- /**
- * Returns the meta object for data type '{@link org.eclipse.emf.ecore.resource.ResourceSet <em>Resource Set</em>}'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for data type '<em>Resource Set</em>'.
- * @see org.eclipse.emf.ecore.resource.ResourceSet
- * @model instanceClass="org.eclipse.emf.ecore.resource.ResourceSet" serializeable="false"
- * @generated
- */
- EDataType getResourceSet();
-
- /**
- * Returns the meta object for data type '{@link org.eclipse.emf.common.util.URI <em>URI</em>}'. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @return the meta object for data type '<em>URI</em>'.
- * @see org.eclipse.emf.common.util.URI
- * @model instanceClass="org.eclipse.emf.common.util.URI"
- * @generated
- */
- EDataType getURI();
-
- /**
- * Returns the meta object for data type '{@link org.eclipse.emf.ecore.resource.Resource.Diagnostic
- * <em>Diagnostic</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the meta object for data type '<em>Diagnostic</em>'.
- * @see org.eclipse.emf.ecore.resource.Resource.Diagnostic
- * @model instanceClass="org.eclipse.emf.ecore.resource.Resource.Diagnostic" serializeable="false"
- * @generated
- */
- EDataType getDiagnostic();
-
- /**
- * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the factory that creates the instances of the model.
- * @generated
- */
- EresourceFactory getEresourceFactory();
-
- /**
- * <!-- begin-user-doc --> Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- *
- * @since 4.1
- * @noextend This interface is not intended to be extended by clients.
- * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc -->
- * @generated
- */
- interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl
- * <em>CDO Resource Node</em>}' class. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceNode()
- * @generated
- */
- EClass CDO_RESOURCE_NODE = eINSTANCE.getCDOResourceNode();
-
- /**
- * The meta object literal for the '<em><b>Folder</b></em>' container reference feature. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- EReference CDO_RESOURCE_NODE__FOLDER = eINSTANCE.getCDOResourceNode_Folder();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- EAttribute CDO_RESOURCE_NODE__NAME = eINSTANCE.getCDOResourceNode_Name();
-
- /**
- * The meta object literal for the '<em><b>Path</b></em>' attribute feature. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- EAttribute CDO_RESOURCE_NODE__PATH = eINSTANCE.getCDOResourceNode_Path();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl
- * <em>CDO Resource Folder</em>}' class. <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceFolder()
- * @generated
- */
- EClass CDO_RESOURCE_FOLDER = eINSTANCE.getCDOResourceFolder();
-
- /**
- * The meta object literal for the '<em><b>Nodes</b></em>' containment reference list feature. <!-- begin-user-doc
- * -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- EReference CDO_RESOURCE_FOLDER__NODES = eINSTANCE.getCDOResourceFolder_Nodes();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl <em>CDO Resource</em>}
- * ' class. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResource()
- * @generated
- */
- EClass CDO_RESOURCE = eINSTANCE.getCDOResource();
-
- /**
- * The meta object literal for the '<em><b>Resource Set</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__RESOURCE_SET = eINSTANCE.getCDOResource_ResourceSet();
-
- /**
- * The meta object literal for the '<em><b>URI</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__URI = eINSTANCE.getCDOResource_URI();
-
- /**
- * The meta object literal for the '<em><b>Contents</b></em>' containment reference list feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- EReference CDO_RESOURCE__CONTENTS = eINSTANCE.getCDOResource_Contents();
-
- /**
- * The meta object literal for the '<em><b>Modified</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__MODIFIED = eINSTANCE.getCDOResource_Modified();
-
- /**
- * The meta object literal for the '<em><b>Loaded</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__LOADED = eINSTANCE.getCDOResource_Loaded();
-
- /**
- * The meta object literal for the '<em><b>Tracking Modification</b></em>' attribute feature. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__TRACKING_MODIFICATION = eINSTANCE.getCDOResource_TrackingModification();
-
- /**
- * The meta object literal for the '<em><b>Errors</b></em>' attribute list feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__ERRORS = eINSTANCE.getCDOResource_Errors();
-
- /**
- * The meta object literal for the '<em><b>Warnings</b></em>' attribute list feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__WARNINGS = eINSTANCE.getCDOResource_Warnings();
-
- /**
- * The meta object literal for the '<em><b>Time Stamp</b></em>' attribute feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- EAttribute CDO_RESOURCE__TIME_STAMP = eINSTANCE.getCDOResource_TimeStamp();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl
- * <em>CDO Resource Leaf</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceLeaf()
- * @generated
- */
- EClass CDO_RESOURCE_LEAF = eINSTANCE.getCDOResourceLeaf();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl
- * <em>CDO File Resource</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOFileResource()
- * @generated
- */
- EClass CDO_FILE_RESOURCE = eINSTANCE.getCDOFileResource();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl
- * <em>CDO Binary Resource</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOBinaryResource()
- * @generated
- */
- EClass CDO_BINARY_RESOURCE = eINSTANCE.getCDOBinaryResource();
-
- /**
- * The meta object literal for the '<em><b>Contents</b></em>' attribute feature. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- EAttribute CDO_BINARY_RESOURCE__CONTENTS = eINSTANCE.getCDOBinaryResource_Contents();
-
- /**
- * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl
- * <em>CDO Text Resource</em>}' class. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOTextResource()
- * @generated
- */
- EClass CDO_TEXT_RESOURCE = eINSTANCE.getCDOTextResource();
-
- /**
- * The meta object literal for the '<em><b>Contents</b></em>' attribute feature. <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- EAttribute CDO_TEXT_RESOURCE__CONTENTS = eINSTANCE.getCDOTextResource_Contents();
-
- /**
- * The meta object literal for the '<em>Resource Set</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.ecore.resource.ResourceSet
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getResourceSet()
- * @generated
- */
- EDataType RESOURCE_SET = eINSTANCE.getResourceSet();
-
- /**
- * The meta object literal for the '<em>URI</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.common.util.URI
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getURI()
- * @generated
- */
- EDataType URI = eINSTANCE.getURI();
-
- /**
- * The meta object literal for the '<em>Diagnostic</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.ecore.resource.Resource.Diagnostic
- * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getDiagnostic()
- * @generated
- */
- EDataType DIAGNOSTIC = eINSTANCE.getDiagnostic();
-
- }
-
-} // EresourcePackage
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> The <b>Package</b> for the Eresource model. It contains accessors for the meta objects to + * represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * + * @apiviz.exclude + * @noextend This interface is not intended to be extended by clients. + * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.EresourceFactory + * @model kind="package" + * @generated + */ +public interface EresourcePackage extends EPackage +{ + /** + * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "eresource"; //$NON-NLS-1$ + + /** + * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/emf/CDO/Eresource/4.0.0"; //$NON-NLS-1$ + + /** + * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "eresource"; //$NON-NLS-1$ + + /** + * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EresourcePackage eINSTANCE = org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl + * <em>CDO Resource Node</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceNode() + * @generated + */ + int CDO_RESOURCE_NODE = 0; + + /** + * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_NODE__FOLDER = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_NODE__NAME = 1; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_NODE__PATH = 2; + + /** + * The number of structural features of the '<em>CDO Resource Node</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_NODE_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl + * <em>CDO Resource Folder</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceFolder() + * @generated + */ + int CDO_RESOURCE_FOLDER = 1; + + /** + * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_FOLDER__FOLDER = CDO_RESOURCE_NODE__FOLDER; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_FOLDER__NAME = CDO_RESOURCE_NODE__NAME; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_FOLDER__PATH = CDO_RESOURCE_NODE__PATH; + + /** + * The feature id for the '<em><b>Nodes</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_FOLDER__NODES = CDO_RESOURCE_NODE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>CDO Resource Folder</em>' class. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_FOLDER_FEATURE_COUNT = CDO_RESOURCE_NODE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl + * <em>CDO Resource Leaf</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceLeaf() + * @generated NOT + */ + int CDO_RESOURCE_LEAF = 7; + + /** + * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_RESOURCE_LEAF__FOLDER = CDO_RESOURCE_NODE__FOLDER; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_RESOURCE_LEAF__NAME = CDO_RESOURCE_NODE__NAME; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_RESOURCE_LEAF__PATH = CDO_RESOURCE_NODE__PATH; + + /** + * The number of structural features of the '<em>CDO Resource Leaf</em>' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_RESOURCE_LEAF_FEATURE_COUNT = CDO_RESOURCE_NODE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl <em>CDO Resource</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResource() + * @generated + */ + int CDO_RESOURCE = 2; + + /** + * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__FOLDER = CDO_RESOURCE_LEAF__FOLDER; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__NAME = CDO_RESOURCE_LEAF__NAME; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__PATH = CDO_RESOURCE_LEAF__PATH; + + /** + * The feature id for the '<em><b>Resource Set</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__RESOURCE_SET = CDO_RESOURCE_LEAF_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>URI</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__URI = CDO_RESOURCE_LEAF_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Contents</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__CONTENTS = CDO_RESOURCE_LEAF_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Modified</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__MODIFIED = CDO_RESOURCE_LEAF_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Loaded</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__LOADED = CDO_RESOURCE_LEAF_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Tracking Modification</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__TRACKING_MODIFICATION = CDO_RESOURCE_LEAF_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Errors</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__ERRORS = CDO_RESOURCE_LEAF_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>Warnings</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__WARNINGS = CDO_RESOURCE_LEAF_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Time Stamp</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE__TIME_STAMP = CDO_RESOURCE_LEAF_FEATURE_COUNT + 8; + + /** + * The number of structural features of the '<em>CDO Resource</em>' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int CDO_RESOURCE_FEATURE_COUNT = CDO_RESOURCE_LEAF_FEATURE_COUNT + 9; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl + * <em>CDO File Resource</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOFileResource() + * @generated NOT + */ + int CDO_FILE_RESOURCE = 8; + + /** + * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_FILE_RESOURCE__FOLDER = CDO_RESOURCE_LEAF__FOLDER; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_FILE_RESOURCE__NAME = CDO_RESOURCE_LEAF__NAME; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_FILE_RESOURCE__PATH = CDO_RESOURCE_LEAF__PATH; + + /** + * The number of structural features of the '<em>CDO File Resource</em>' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_FILE_RESOURCE_FEATURE_COUNT = CDO_RESOURCE_LEAF_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl + * <em>CDO Binary Resource</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOBinaryResource() + * @generated NOT + */ + int CDO_BINARY_RESOURCE = 9; + + /** + * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_BINARY_RESOURCE__FOLDER = CDO_FILE_RESOURCE__FOLDER; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_BINARY_RESOURCE__NAME = CDO_FILE_RESOURCE__NAME; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_BINARY_RESOURCE__PATH = CDO_FILE_RESOURCE__PATH; + + /** + * The feature id for the '<em><b>Contents</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_BINARY_RESOURCE__CONTENTS = CDO_FILE_RESOURCE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>CDO Binary Resource</em>' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_BINARY_RESOURCE_FEATURE_COUNT = CDO_FILE_RESOURCE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl + * <em>CDO Text Resource</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOTextResource() + * @generated NOT + */ + int CDO_TEXT_RESOURCE = 10; + + /** + * The feature id for the '<em><b>Folder</b></em>' container reference. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_TEXT_RESOURCE__FOLDER = CDO_FILE_RESOURCE__FOLDER; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_TEXT_RESOURCE__NAME = CDO_FILE_RESOURCE__NAME; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_TEXT_RESOURCE__PATH = CDO_FILE_RESOURCE__PATH; + + /** + * The feature id for the '<em><b>Contents</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_TEXT_RESOURCE__CONTENTS = CDO_FILE_RESOURCE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>CDO Text Resource</em>' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + * @ordered + */ + int CDO_TEXT_RESOURCE_FEATURE_COUNT = CDO_FILE_RESOURCE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '<em>Resource Set</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.resource.ResourceSet + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getResourceSet() + * @generated NOT + */ + int RESOURCE_SET = 3; + + /** + * The meta object id for the '<em>URI</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.common.util.URI + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getURI() + * @generated NOT + */ + int URI = 4; + + /** + * The meta object id for the '<em>Diagnostic</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.resource.Resource.Diagnostic + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getDiagnostic() + * @generated NOT + */ + int DIAGNOSTIC = 5; + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode <em>CDO Resource Node</em>} + * '. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @return the meta object for class '<em>CDO Resource Node</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResourceNode + * @generated + */ + EClass getCDOResourceNode(); + + /** + * Returns the meta object for the container reference ' + * {@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder <em>Folder</em>}'. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @return the meta object for the container reference '<em>Folder</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getFolder() + * @see #getCDOResourceNode() + * @generated + */ + EReference getCDOResourceNode_Folder(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getName + * <em>Name</em>}'. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getName() + * @see #getCDOResourceNode() + * @generated + */ + EAttribute getCDOResourceNode_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath + * <em>Path</em>}'. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @return the meta object for the attribute '<em>Path</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResourceNode#getPath() + * @see #getCDOResourceNode() + * @generated + */ + EAttribute getCDOResourceNode_Path(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder + * <em>CDO Resource Folder</em>}'. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @return the meta object for class '<em>CDO Resource Folder</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder + * @generated + */ + EClass getCDOResourceFolder(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes <em>Nodes</em>}'. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Nodes</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder#getNodes() + * @see #getCDOResourceFolder() + * @generated + */ + EReference getCDOResourceFolder_Nodes(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResource <em>CDO Resource</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>CDO Resource</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource + * @generated + */ + EClass getCDOResource(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getResourceSet + * <em>Resource Set</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Resource Set</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#getResourceSet() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_ResourceSet(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getURI <em>URI</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>URI</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#getURI() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_URI(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.eresource.CDOResource#getContents <em>Contents</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Contents</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#getContents() + * @see #getCDOResource() + * @generated + */ + EReference getCDOResource_Contents(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#isModified + * <em>Modified</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Modified</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#isModified() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_Modified(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#isLoaded + * <em>Loaded</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Loaded</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#isLoaded() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_Loaded(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#isTrackingModification + * <em>Tracking Modification</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Tracking Modification</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#isTrackingModification() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_TrackingModification(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.eresource.CDOResource#getErrors + * <em>Errors</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute list '<em>Errors</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#getErrors() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_Errors(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.eresource.CDOResource#getWarnings + * <em>Warnings</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute list '<em>Warnings</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#getWarnings() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_Warnings(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp + * <em>Time Stamp</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Time Stamp</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResource#getTimeStamp() + * @see #getCDOResource() + * @generated + */ + EAttribute getCDOResource_TimeStamp(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOResourceLeaf <em>CDO Resource Leaf</em>} + * '. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return the meta object for class '<em>CDO Resource Leaf</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOResourceLeaf + * @generated + */ + EClass getCDOResourceLeaf(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOFileResource <em>CDO File Resource</em>} + * '. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return the meta object for class '<em>CDO File Resource</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOFileResource + * @generated + */ + EClass getCDOFileResource(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOBinaryResource + * <em>CDO Binary Resource</em>}'. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return the meta object for class '<em>CDO Binary Resource</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOBinaryResource + * @generated + */ + EClass getCDOBinaryResource(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOBinaryResource#getContents + * <em>Contents</em>}'. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Contents</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOBinaryResource#getContents() + * @see #getCDOBinaryResource() + * @generated + */ + EAttribute getCDOBinaryResource_Contents(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.eresource.CDOTextResource <em>CDO Text Resource</em>} + * '. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return the meta object for class '<em>CDO Text Resource</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOTextResource + * @generated + */ + EClass getCDOTextResource(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.eresource.CDOTextResource#getContents + * <em>Contents</em>}'. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Contents</em>'. + * @see org.eclipse.emf.cdo.eresource.CDOTextResource#getContents() + * @see #getCDOTextResource() + * @generated + */ + EAttribute getCDOTextResource_Contents(); + + /** + * Returns the meta object for data type '{@link org.eclipse.emf.ecore.resource.ResourceSet <em>Resource Set</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for data type '<em>Resource Set</em>'. + * @see org.eclipse.emf.ecore.resource.ResourceSet + * @model instanceClass="org.eclipse.emf.ecore.resource.ResourceSet" serializeable="false" + * @generated + */ + EDataType getResourceSet(); + + /** + * Returns the meta object for data type '{@link org.eclipse.emf.common.util.URI <em>URI</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for data type '<em>URI</em>'. + * @see org.eclipse.emf.common.util.URI + * @model instanceClass="org.eclipse.emf.common.util.URI" + * @generated + */ + EDataType getURI(); + + /** + * Returns the meta object for data type '{@link org.eclipse.emf.ecore.resource.Resource.Diagnostic + * <em>Diagnostic</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for data type '<em>Diagnostic</em>'. + * @see org.eclipse.emf.ecore.resource.Resource.Diagnostic + * @model instanceClass="org.eclipse.emf.ecore.resource.Resource.Diagnostic" serializeable="false" + * @generated + */ + EDataType getDiagnostic(); + + /** + * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the factory that creates the instances of the model. + * @generated + */ + EresourceFactory getEresourceFactory(); + + /** + * <!-- begin-user-doc --> Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * + * @since 4.1 + * @noextend This interface is not intended to be extended by clients. + * @noimplement This interface is not intended to be implemented by clients. <!-- end-user-doc --> + * @generated + */ + interface Literals + { + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl + * <em>CDO Resource Node</em>}' class. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceNode() + * @generated + */ + EClass CDO_RESOURCE_NODE = eINSTANCE.getCDOResourceNode(); + + /** + * The meta object literal for the '<em><b>Folder</b></em>' container reference feature. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + EReference CDO_RESOURCE_NODE__FOLDER = eINSTANCE.getCDOResourceNode_Folder(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + EAttribute CDO_RESOURCE_NODE__NAME = eINSTANCE.getCDOResourceNode_Name(); + + /** + * The meta object literal for the '<em><b>Path</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + EAttribute CDO_RESOURCE_NODE__PATH = eINSTANCE.getCDOResourceNode_Path(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl + * <em>CDO Resource Folder</em>}' class. <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceFolder() + * @generated + */ + EClass CDO_RESOURCE_FOLDER = eINSTANCE.getCDOResourceFolder(); + + /** + * The meta object literal for the '<em><b>Nodes</b></em>' containment reference list feature. <!-- begin-user-doc + * --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + EReference CDO_RESOURCE_FOLDER__NODES = eINSTANCE.getCDOResourceFolder_Nodes(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl <em>CDO Resource</em>} + * ' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResource() + * @generated + */ + EClass CDO_RESOURCE = eINSTANCE.getCDOResource(); + + /** + * The meta object literal for the '<em><b>Resource Set</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__RESOURCE_SET = eINSTANCE.getCDOResource_ResourceSet(); + + /** + * The meta object literal for the '<em><b>URI</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__URI = eINSTANCE.getCDOResource_URI(); + + /** + * The meta object literal for the '<em><b>Contents</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference CDO_RESOURCE__CONTENTS = eINSTANCE.getCDOResource_Contents(); + + /** + * The meta object literal for the '<em><b>Modified</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__MODIFIED = eINSTANCE.getCDOResource_Modified(); + + /** + * The meta object literal for the '<em><b>Loaded</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__LOADED = eINSTANCE.getCDOResource_Loaded(); + + /** + * The meta object literal for the '<em><b>Tracking Modification</b></em>' attribute feature. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__TRACKING_MODIFICATION = eINSTANCE.getCDOResource_TrackingModification(); + + /** + * The meta object literal for the '<em><b>Errors</b></em>' attribute list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__ERRORS = eINSTANCE.getCDOResource_Errors(); + + /** + * The meta object literal for the '<em><b>Warnings</b></em>' attribute list feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__WARNINGS = eINSTANCE.getCDOResource_Warnings(); + + /** + * The meta object literal for the '<em><b>Time Stamp</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CDO_RESOURCE__TIME_STAMP = eINSTANCE.getCDOResource_TimeStamp(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl + * <em>CDO Resource Leaf</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOResourceLeafImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOResourceLeaf() + * @generated + */ + EClass CDO_RESOURCE_LEAF = eINSTANCE.getCDOResourceLeaf(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl + * <em>CDO File Resource</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOFileResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOFileResource() + * @generated + */ + EClass CDO_FILE_RESOURCE = eINSTANCE.getCDOFileResource(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl + * <em>CDO Binary Resource</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOBinaryResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOBinaryResource() + * @generated + */ + EClass CDO_BINARY_RESOURCE = eINSTANCE.getCDOBinaryResource(); + + /** + * The meta object literal for the '<em><b>Contents</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + EAttribute CDO_BINARY_RESOURCE__CONTENTS = eINSTANCE.getCDOBinaryResource_Contents(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl + * <em>CDO Text Resource</em>}' class. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.eresource.impl.CDOTextResourceImpl + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getCDOTextResource() + * @generated + */ + EClass CDO_TEXT_RESOURCE = eINSTANCE.getCDOTextResource(); + + /** + * The meta object literal for the '<em><b>Contents</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + EAttribute CDO_TEXT_RESOURCE__CONTENTS = eINSTANCE.getCDOTextResource_Contents(); + + /** + * The meta object literal for the '<em>Resource Set</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.resource.ResourceSet + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getResourceSet() + * @generated + */ + EDataType RESOURCE_SET = eINSTANCE.getResourceSet(); + + /** + * The meta object literal for the '<em>URI</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.common.util.URI + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getURI() + * @generated + */ + EDataType URI = eINSTANCE.getURI(); + + /** + * The meta object literal for the '<em>Diagnostic</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.resource.Resource.Diagnostic + * @see org.eclipse.emf.cdo.eresource.impl.EresourcePackageImpl#getDiagnostic() + * @generated + */ + EDataType DIAGNOSTIC = eINSTANCE.getDiagnostic(); + + } + +} // EresourcePackage diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOFileResourceImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOFileResourceImpl.java index ff5f0b1cd3..724ce1abf6 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOFileResourceImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOFileResourceImpl.java @@ -1,90 +1,90 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.impl;
-
-import org.eclipse.emf.cdo.common.lob.CDOLob;
-import org.eclipse.emf.cdo.eresource.CDOFileResource;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.spi.cdo.FSMUtil;
-import org.eclipse.emf.spi.cdo.InternalCDOView;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>CDO File Resource</b></em>'.
- *
- * @since 4.1
- * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc -->
- * <p>
- * </p>
- * @generated
- */
-public abstract class CDOFileResourceImpl<IO> extends CDOResourceLeafImpl implements CDOFileResource<IO>
-{
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CDOFileResourceImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return EresourcePackage.Literals.CDO_FILE_RESOURCE;
- }
-
- /**
- * @ADDED
- */
- public boolean isRoot()
- {
- return false;
- }
-
- /**
- * @ADDED
- */
- public void delete(Map<?, ?> options) throws IOException
- {
- if (!FSMUtil.isTransient(this))
- {
- if (getFolder() == null)
- {
- InternalCDOView view = cdoView();
- view.getRootResource().getContents().remove(this);
- }
- else
- {
- basicSetFolder(null, false);
- }
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public abstract CDOLob<IO> getContents();
-
-} // CDOFileResourceImpl
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.impl; + +import org.eclipse.emf.cdo.common.lob.CDOLob; +import org.eclipse.emf.cdo.eresource.CDOFileResource; +import org.eclipse.emf.cdo.eresource.EresourcePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.spi.cdo.FSMUtil; +import org.eclipse.emf.spi.cdo.InternalCDOView; + +import java.io.IOException; +import java.util.Map; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>CDO File Resource</b></em>'. + * + * @since 4.1 + * @noextend This class is not intended to be subclassed by clients. <!-- end-user-doc --> + * <p> + * </p> + * @generated + */ +public abstract class CDOFileResourceImpl<IO> extends CDOResourceLeafImpl implements CDOFileResource<IO> +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CDOFileResourceImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EresourcePackage.Literals.CDO_FILE_RESOURCE; + } + + /** + * @ADDED + */ + public boolean isRoot() + { + return false; + } + + /** + * @ADDED + */ + public void delete(Map<?, ?> options) throws IOException + { + if (!FSMUtil.isTransient(this)) + { + if (getFolder() == null) + { + InternalCDOView view = cdoView(); + view.getRootResource().getContents().remove(this); + } + else + { + basicSetFolder(null, false); + } + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public abstract CDOLob<IO> getContents(); + +} // CDOFileResourceImpl diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFactoryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFactoryImpl.java index 3869cd2425..d3ac7f606a 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFactoryImpl.java @@ -1,88 +1,88 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- * Simon McDuff - bug 213402
- * Simon McDuff - bug 246705
- */
-package org.eclipse.emf.cdo.eresource.impl;
-
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.eresource.CDOResourceFactory;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-
-/**
- * Creates default {@link CDOResource} instances.
- *
- * @author Eike Stepper
- * @noextend This interface is not intended to be extended by clients.
- */
-public class CDOResourceFactoryImpl implements CDOResourceFactory
-{
- private static final String RESOURCE_SET_CLASS_NAME = ResourceSetImpl.class.getName();
-
- /**
- * @since 4.0
- */
- public static final CDOResourceFactory INSTANCE = new CDOResourceFactoryImpl();
-
- public CDOResourceFactoryImpl()
- {
- }
-
- public Resource createResource(URI uri)
- {
- CDOResourceImpl resource = createCDOResource(uri);
- resource.setExisting(isGetResource());
- return resource;
- }
-
- /**
- * @since 4.0
- */
- protected CDOResourceImpl createCDOResource(URI uri)
- {
- return new CDOResourceImpl(uri);
- }
-
- /**
- * TODO Add TCs to ensure that Ecore internally doesn't change the way the stack is used!!!
- *
- * @since 3.0
- */
- protected boolean isGetResource()
- {
- boolean inResourceSet = false;
- StackTraceElement[] elements = Thread.currentThread().getStackTrace();
- for (int i = 3; i < elements.length; i++)
- {
- StackTraceElement element = elements[i];
- if (RESOURCE_SET_CLASS_NAME.equals(element.getClassName()))
- {
- inResourceSet = true;
- }
- else
- {
- if (inResourceSet)
- {
- break;
- }
- }
-
- if (inResourceSet && "getResource".equals(element.getMethodName())) //$NON-NLS-1$
- {
- return true;
- }
- }
-
- return false;
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + * Simon McDuff - bug 213402 + * Simon McDuff - bug 246705 + */ +package org.eclipse.emf.cdo.eresource.impl; + +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.eresource.CDOResourceFactory; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +/** + * Creates default {@link CDOResource} instances. + * + * @author Eike Stepper + * @noextend This interface is not intended to be extended by clients. + */ +public class CDOResourceFactoryImpl implements CDOResourceFactory +{ + private static final String RESOURCE_SET_CLASS_NAME = ResourceSetImpl.class.getName(); + + /** + * @since 4.0 + */ + public static final CDOResourceFactory INSTANCE = new CDOResourceFactoryImpl(); + + public CDOResourceFactoryImpl() + { + } + + public Resource createResource(URI uri) + { + CDOResourceImpl resource = createCDOResource(uri); + resource.setExisting(isGetResource()); + return resource; + } + + /** + * @since 4.0 + */ + protected CDOResourceImpl createCDOResource(URI uri) + { + return new CDOResourceImpl(uri); + } + + /** + * TODO Add TCs to ensure that Ecore internally doesn't change the way the stack is used!!! + * + * @since 3.0 + */ + protected boolean isGetResource() + { + boolean inResourceSet = false; + StackTraceElement[] elements = Thread.currentThread().getStackTrace(); + for (int i = 3; i < elements.length; i++) + { + StackTraceElement element = elements[i]; + if (RESOURCE_SET_CLASS_NAME.equals(element.getClassName())) + { + inResourceSet = true; + } + else + { + if (inResourceSet) + { + break; + } + } + + if (inResourceSet && "getResource".equals(element.getMethodName())) //$NON-NLS-1$ + { + return true; + } + } + + return false; + } +} diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java index 4774233d5c..b3ca3b431c 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceFolderImpl.java @@ -1,122 +1,122 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.impl;
-
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-import org.eclipse.emf.cdo.util.CDOURIUtil;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.spi.cdo.FSMUtil;
-import org.eclipse.emf.spi.cdo.InternalCDOView;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>CDO Resource Folder</b></em>'.
- *
- * @since 2.0
- * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl#getNodes <em>Nodes</em>}</li>
- * </ul>
- * </p>
- * @generated
- */
-public class CDOResourceFolderImpl extends CDOResourceNodeImpl implements CDOResourceFolder
-{
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CDOResourceFolderImpl()
- {
- super();
- }
-
- /**
- * @ADDED
- */
- public boolean isRoot()
- {
- return false;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return EresourcePackage.Literals.CDO_RESOURCE_FOLDER;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- public EList<CDOResourceNode> getNodes()
- {
- return (EList<CDOResourceNode>)eGet(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES, true);
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @generated NOT
- */
- public CDOResourceFolder addResourceFolder(String name)
- {
- return cdoView().toTransaction().createResourceFolder(getPath() + CDOURIUtil.SEGMENT_SEPARATOR + name);
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @generated NOT
- */
- public CDOResource addResource(String name)
- {
- return cdoView().toTransaction().createResource(getPath() + CDOURIUtil.SEGMENT_SEPARATOR + name);
- }
-
- /**
- * @ADDED
- */
- public void delete(Map<?, ?> options) throws IOException
- {
- if (!FSMUtil.isTransient(this))
- {
- if (getFolder() == null)
- {
- InternalCDOView view = cdoView();
- view.getRootResource().getContents().remove(this);
- }
- else
- {
- basicSetFolder(null, false);
- }
- }
- }
-} // CDOResourceFolderImpl
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.impl; + +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.eresource.CDOResourceFolder; +import org.eclipse.emf.cdo.eresource.CDOResourceNode; +import org.eclipse.emf.cdo.eresource.EresourcePackage; +import org.eclipse.emf.cdo.util.CDOURIUtil; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.spi.cdo.FSMUtil; +import org.eclipse.emf.spi.cdo.InternalCDOView; + +import java.io.IOException; +import java.util.Map; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>CDO Resource Folder</b></em>'. + * + * @since 2.0 + * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceFolderImpl#getNodes <em>Nodes</em>}</li> + * </ul> + * </p> + * @generated + */ +public class CDOResourceFolderImpl extends CDOResourceNodeImpl implements CDOResourceFolder +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CDOResourceFolderImpl() + { + super(); + } + + /** + * @ADDED + */ + public boolean isRoot() + { + return false; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EresourcePackage.Literals.CDO_RESOURCE_FOLDER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<CDOResourceNode> getNodes() + { + return (EList<CDOResourceNode>)eGet(EresourcePackage.Literals.CDO_RESOURCE_FOLDER__NODES, true); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated NOT + */ + public CDOResourceFolder addResourceFolder(String name) + { + return cdoView().toTransaction().createResourceFolder(getPath() + CDOURIUtil.SEGMENT_SEPARATOR + name); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated NOT + */ + public CDOResource addResource(String name) + { + return cdoView().toTransaction().createResource(getPath() + CDOURIUtil.SEGMENT_SEPARATOR + name); + } + + /** + * @ADDED + */ + public void delete(Map<?, ?> options) throws IOException + { + if (!FSMUtil.isTransient(this)) + { + if (getFolder() == null) + { + InternalCDOView view = cdoView(); + view.getRootResource().getContents().remove(this); + } + else + { + basicSetFolder(null, false); + } + } + } +} // CDOResourceFolderImpl diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceNodeImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceNodeImpl.java index d28ee6fae6..323ec093c5 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceNodeImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceNodeImpl.java @@ -1,261 +1,261 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.impl;
-
-import org.eclipse.emf.cdo.common.util.CDOException;
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-import org.eclipse.emf.cdo.util.CDOURIUtil;
-
-import org.eclipse.emf.internal.cdo.CDOObjectImpl;
-import org.eclipse.emf.internal.cdo.messages.Messages;
-
-import org.eclipse.net4j.util.ObjectUtil;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.spi.cdo.InternalCDOTransaction;
-
-import java.text.MessageFormat;
-import java.util.List;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>CDO Resource Node</b></em>'.
- *
- * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl#getFolder <em>Folder</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl#getPath <em>Path</em>}</li>
- * </ul>
- * </p>
- * @generated
- */
-public abstract class CDOResourceNodeImpl extends CDOObjectImpl implements CDOResourceNode
-{
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected CDOResourceNodeImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return EresourcePackage.Literals.CDO_RESOURCE_NODE;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected int eStaticFeatureCount()
- {
- return 0;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public CDOResourceFolder getFolder()
- {
- return (CDOResourceFolder)eGet(EresourcePackage.Literals.CDO_RESOURCE_NODE__FOLDER, true);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setFolderGen(CDOResourceFolder newFolder)
- {
- eSet(EresourcePackage.Literals.CDO_RESOURCE_NODE__FOLDER, newFolder);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public void setFolder(CDOResourceFolder newFolder)
- {
- basicSetFolder(newFolder, true);
- }
-
- /**
- * @ADDED
- */
- public void basicSetFolder(CDOResourceFolder newFolder, boolean checkDuplicates)
- {
- CDOResourceFolder oldFolder = getFolder();
- if (!ObjectUtil.equals(oldFolder, newFolder))
- {
- if (checkDuplicates)
- {
- String name = getName();
- if (name != null)
- {
- String newPath = (newFolder == null ? "" : newFolder.getPath()) + CDOURIUtil.SEGMENT_SEPARATOR + name; //$NON-NLS-1$
- checkDuplicates(newPath);
- }
- }
-
- setFolderGen(newFolder);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getName()
- {
- return (String)eGet(EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, true);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void setNameGen(String newName)
- {
- eSet(EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, newName);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public void setName(String newName)
- {
- basicSetName(newName, true);
- }
-
- /**
- * @ADDED
- */
- public void basicSetName(String newName, boolean checkDuplicates)
- {
- String oldName = getName();
- if (!ObjectUtil.equals(oldName, newName))
- {
- if (checkDuplicates)
- {
- CDOResourceFolder parent = getFolder();
- if (parent != null)
- {
- String newPath = parent.getPath() + CDOURIUtil.SEGMENT_SEPARATOR + getName();
- checkDuplicates(newPath);
- }
- }
-
- setNameGen(newName);
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public String getPath()
- {
- if (isRoot())
- {
- return CDOResourceNode.ROOT_PATH;
- }
-
- CDOResourceFolder folder = getFolder();
- if (folder == null)
- {
- return CDOResourceNode.ROOT_PATH + getName();
- }
-
- return folder.getPath() + CDOResourceNode.ROOT_PATH + getName();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public void setPath(String newPath)
- {
- InternalCDOTransaction transaction = cdoView().toTransaction();
- if (newPath == null)
- {
- throw new CDOException(Messages.getString("CDOResourceNodeImpl.3")); //$NON-NLS-1$
- }
-
- String oldPath = getPath();
- if (!ObjectUtil.equals(oldPath, newPath))
- {
- // TODO check for duplicates
- List<String> names = CDOURIUtil.analyzePath(newPath);
- if (names.isEmpty())
- {
- throw new CDOException(Messages.getString("CDOResourceNodeImpl.4")); //$NON-NLS-1$
- }
-
- String newName = names.remove(names.size() - 1);
- CDOResourceFolder newFolder = transaction.getOrCreateResourceFolder(names);
- if (newFolder == null)
- {
- transaction.getRootResource().getContents().add(this);
- }
-
- basicSetFolder(newFolder, false);
- basicSetName(newName, false);
- }
- }
-
- /**
- * @ADDED
- */
- public URI getURI()
- {
- return CDOURIUtil.createResourceURI(cdoView(), getPath());
- }
-
- /**
- * @ADDED
- */
- private void checkDuplicates(String newPath)
- {
- try
- {
- cdoView().getResourceNodeID(newPath);
- }
- catch (Exception ex)
- {
- throw new CDOException(MessageFormat.format(Messages.getString("CDOResourceNodeImpl.5"), newPath)); //$NON-NLS-1$
- }
- }
-} // CDOResourceNodeImpl
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.impl; + +import org.eclipse.emf.cdo.common.util.CDOException; +import org.eclipse.emf.cdo.eresource.CDOResourceFolder; +import org.eclipse.emf.cdo.eresource.CDOResourceNode; +import org.eclipse.emf.cdo.eresource.EresourcePackage; +import org.eclipse.emf.cdo.util.CDOURIUtil; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; +import org.eclipse.emf.internal.cdo.messages.Messages; + +import org.eclipse.net4j.util.ObjectUtil; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.spi.cdo.InternalCDOTransaction; + +import java.text.MessageFormat; +import java.util.List; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>CDO Resource Node</b></em>'. + * + * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl#getFolder <em>Folder</em>}</li> + * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.eresource.impl.CDOResourceNodeImpl#getPath <em>Path</em>}</li> + * </ul> + * </p> + * @generated + */ +public abstract class CDOResourceNodeImpl extends CDOObjectImpl implements CDOResourceNode +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CDOResourceNodeImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return EresourcePackage.Literals.CDO_RESOURCE_NODE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CDOResourceFolder getFolder() + { + return (CDOResourceFolder)eGet(EresourcePackage.Literals.CDO_RESOURCE_NODE__FOLDER, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setFolderGen(CDOResourceFolder newFolder) + { + eSet(EresourcePackage.Literals.CDO_RESOURCE_NODE__FOLDER, newFolder); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public void setFolder(CDOResourceFolder newFolder) + { + basicSetFolder(newFolder, true); + } + + /** + * @ADDED + */ + public void basicSetFolder(CDOResourceFolder newFolder, boolean checkDuplicates) + { + CDOResourceFolder oldFolder = getFolder(); + if (!ObjectUtil.equals(oldFolder, newFolder)) + { + if (checkDuplicates) + { + String name = getName(); + if (name != null) + { + String newPath = (newFolder == null ? "" : newFolder.getPath()) + CDOURIUtil.SEGMENT_SEPARATOR + name; //$NON-NLS-1$ + checkDuplicates(newPath); + } + } + + setFolderGen(newFolder); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getName() + { + return (String)eGet(EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setNameGen(String newName) + { + eSet(EresourcePackage.Literals.CDO_RESOURCE_NODE__NAME, newName); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public void setName(String newName) + { + basicSetName(newName, true); + } + + /** + * @ADDED + */ + public void basicSetName(String newName, boolean checkDuplicates) + { + String oldName = getName(); + if (!ObjectUtil.equals(oldName, newName)) + { + if (checkDuplicates) + { + CDOResourceFolder parent = getFolder(); + if (parent != null) + { + String newPath = parent.getPath() + CDOURIUtil.SEGMENT_SEPARATOR + getName(); + checkDuplicates(newPath); + } + } + + setNameGen(newName); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public String getPath() + { + if (isRoot()) + { + return CDOResourceNode.ROOT_PATH; + } + + CDOResourceFolder folder = getFolder(); + if (folder == null) + { + return CDOResourceNode.ROOT_PATH + getName(); + } + + return folder.getPath() + CDOResourceNode.ROOT_PATH + getName(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public void setPath(String newPath) + { + InternalCDOTransaction transaction = cdoView().toTransaction(); + if (newPath == null) + { + throw new CDOException(Messages.getString("CDOResourceNodeImpl.3")); //$NON-NLS-1$ + } + + String oldPath = getPath(); + if (!ObjectUtil.equals(oldPath, newPath)) + { + // TODO check for duplicates + List<String> names = CDOURIUtil.analyzePath(newPath); + if (names.isEmpty()) + { + throw new CDOException(Messages.getString("CDOResourceNodeImpl.4")); //$NON-NLS-1$ + } + + String newName = names.remove(names.size() - 1); + CDOResourceFolder newFolder = transaction.getOrCreateResourceFolder(names); + if (newFolder == null) + { + transaction.getRootResource().getContents().add(this); + } + + basicSetFolder(newFolder, false); + basicSetName(newName, false); + } + } + + /** + * @ADDED + */ + public URI getURI() + { + return CDOURIUtil.createResourceURI(cdoView(), getPath()); + } + + /** + * @ADDED + */ + private void checkDuplicates(String newPath) + { + try + { + cdoView().getResourceNodeID(newPath); + } + catch (Exception ex) + { + throw new CDOException(MessageFormat.format(Messages.getString("CDOResourceNodeImpl.5"), newPath)); //$NON-NLS-1$ + } + } +} // CDOResourceNodeImpl diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourceFactoryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourceFactoryImpl.java index c8886ef4c7..d46c47480f 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourceFactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourceFactoryImpl.java @@ -1,217 +1,217 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.impl;
-
-//import org.eclipse.emf.cdo.eresource.*;
-import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-import org.eclipse.emf.cdo.eresource.CDOTextResource;
-import org.eclipse.emf.cdo.eresource.EresourceFactory;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>.
- *
- * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc -->
- * @generated
- */
-public class EresourceFactoryImpl extends EFactoryImpl implements EresourceFactory
-{
- /**
- * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public static EresourceFactory init()
- {
- try
- {
- EresourceFactory theEresourceFactory = (EresourceFactory)EPackage.Registry.INSTANCE
- .getEFactory("http://www.eclipse.org/emf/CDO/Eresource/4.0.0"); //$NON-NLS-1$
- if (theEresourceFactory != null)
- {
- return theEresourceFactory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new EresourceFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EresourceFactoryImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @SuppressWarnings("cast")
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- case EresourcePackage.CDO_RESOURCE_FOLDER:
- return (EObject)createCDOResourceFolder();
- case EresourcePackage.CDO_RESOURCE:
- return (EObject)createCDOResource();
- case EresourcePackage.CDO_BINARY_RESOURCE:
- return (EObject)createCDOBinaryResource();
- case EresourcePackage.CDO_TEXT_RESOURCE:
- return (EObject)createCDOTextResource();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue)
- {
- switch (eDataType.getClassifierID())
- {
- case EresourcePackage.URI:
- return createURIFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue)
- {
- switch (eDataType.getClassifierID())
- {
- case EresourcePackage.URI:
- return convertURIToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 2.0 <!-- end-user-doc -->
- * @generated
- */
- public CDOResourceFolder createCDOResourceFolder()
- {
- CDOResourceFolderImpl cdoResourceFolder = new CDOResourceFolderImpl();
- return cdoResourceFolder;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public CDOResource createCDOResource()
- {
- CDOResourceImpl cdoResource = new CDOResourceImpl();
- return cdoResource;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public CDOBinaryResource createCDOBinaryResource()
- {
- CDOBinaryResourceImpl cdoBinaryResource = new CDOBinaryResourceImpl();
- return cdoBinaryResource;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public CDOTextResource createCDOTextResource()
- {
- CDOTextResourceImpl cdoTextResource = new CDOTextResourceImpl();
- return cdoTextResource;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public URI createURIFromString(EDataType eDataType, String initialValue)
- {
- return URI.createURI(initialValue);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated NOT
- */
- public String convertURIToString(EDataType eDataType, Object instanceValue)
- {
- return instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EresourcePackage getEresourcePackage()
- {
- return (EresourcePackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @deprecated
- * @generated
- */
- @Deprecated
- public static EresourcePackage getPackage()
- {
- return EresourcePackage.eINSTANCE;
- }
-
-} // EresourceFactoryImpl
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.impl; + +//import org.eclipse.emf.cdo.eresource.*; +import org.eclipse.emf.cdo.eresource.CDOBinaryResource; +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.eresource.CDOResourceFolder; +import org.eclipse.emf.cdo.eresource.CDOTextResource; +import org.eclipse.emf.cdo.eresource.EresourceFactory; +import org.eclipse.emf.cdo.eresource.EresourcePackage; + +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. + * + * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc --> + * @generated + */ +public class EresourceFactoryImpl extends EFactoryImpl implements EresourceFactory +{ + /** + * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static EresourceFactory init() + { + try + { + EresourceFactory theEresourceFactory = (EresourceFactory)EPackage.Registry.INSTANCE + .getEFactory("http://www.eclipse.org/emf/CDO/Eresource/4.0.0"); //$NON-NLS-1$ + if (theEresourceFactory != null) + { + return theEresourceFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new EresourceFactoryImpl(); + } + + /** + * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EresourceFactoryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("cast") + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case EresourcePackage.CDO_RESOURCE_FOLDER: + return (EObject)createCDOResourceFolder(); + case EresourcePackage.CDO_RESOURCE: + return (EObject)createCDOResource(); + case EresourcePackage.CDO_BINARY_RESOURCE: + return (EObject)createCDOBinaryResource(); + case EresourcePackage.CDO_TEXT_RESOURCE: + return (EObject)createCDOTextResource(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case EresourcePackage.URI: + return createURIFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case EresourcePackage.URI: + return convertURIToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * <!-- begin-user-doc --> + * + * @since 2.0 <!-- end-user-doc --> + * @generated + */ + public CDOResourceFolder createCDOResourceFolder() + { + CDOResourceFolderImpl cdoResourceFolder = new CDOResourceFolderImpl(); + return cdoResourceFolder; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CDOResource createCDOResource() + { + CDOResourceImpl cdoResource = new CDOResourceImpl(); + return cdoResource; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public CDOBinaryResource createCDOBinaryResource() + { + CDOBinaryResourceImpl cdoBinaryResource = new CDOBinaryResourceImpl(); + return cdoBinaryResource; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public CDOTextResource createCDOTextResource() + { + CDOTextResourceImpl cdoTextResource = new CDOTextResourceImpl(); + return cdoTextResource; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public URI createURIFromString(EDataType eDataType, String initialValue) + { + return URI.createURI(initialValue); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated NOT + */ + public String convertURIToString(EDataType eDataType, Object instanceValue) + { + return instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EresourcePackage getEresourcePackage() + { + return (EresourcePackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @deprecated + * @generated + */ + @Deprecated + public static EresourcePackage getPackage() + { + return EresourcePackage.eINSTANCE; + } + +} // EresourceFactoryImpl diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java index 1e4ae4c50c..a1f35987be 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/EresourcePackageImpl.java @@ -1,668 +1,668 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.impl;
-
-import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
-import org.eclipse.emf.cdo.eresource.CDOFileResource;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
-import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-import org.eclipse.emf.cdo.eresource.CDOTextResource;
-import org.eclipse.emf.cdo.eresource.EresourceFactory;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-import org.eclipse.emf.cdo.etypes.EtypesPackage;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EOperation;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model <b>Package</b>.
- *
- * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc -->
- * @generated
- */
-public class EresourcePackageImpl extends EPackageImpl implements EresourcePackage
-{
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass cdoResourceNodeEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass cdoResourceFolderEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass cdoResourceEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass cdoResourceLeafEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass cdoFileResourceEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass cdoBinaryResourceEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass cdoTextResourceEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EDataType resourceSetEDataType = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EDataType uriEDataType = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EDataType diagnosticEDataType = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
- * EPackage.Registry} by the package package URI value.
- * <p>
- * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also
- * performs initialization of the package, or returns the registered package, if one already exists. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage#eNS_URI
- * @see #init()
- * @generated
- */
- private EresourcePackageImpl()
- {
- super(eNS_URI, EresourceFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- * <p>
- * This method is used to initialize {@link EresourcePackage#eINSTANCE} when that field is accessed. Clients should
- * not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static EresourcePackage init()
- {
- if (isInited)
- return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI);
-
- // Obtain or create and register package
- EresourcePackageImpl theEresourcePackage = (EresourcePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EresourcePackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI) : new EresourcePackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- EtypesPackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theEresourcePackage.createPackageContents();
-
- // Initialize created meta-data
- theEresourcePackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theEresourcePackage.freeze();
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(EresourcePackage.eNS_URI, theEresourcePackage);
- return theEresourcePackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- public EClass getCDOResourceNode()
- {
- return cdoResourceNodeEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- public EReference getCDOResourceNode_Folder()
- {
- return (EReference)cdoResourceNodeEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- public EAttribute getCDOResourceNode_Name()
- {
- return (EAttribute)cdoResourceNodeEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- public EAttribute getCDOResourceNode_Path()
- {
- return (EAttribute)cdoResourceNodeEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- public EClass getCDOResourceFolder()
- {
- return cdoResourceFolderEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 2.0<!-- end-user-doc -->
- * @generated
- */
- public EReference getCDOResourceFolder_Nodes()
- {
- return (EReference)cdoResourceFolderEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EClass getCDOResource()
- {
- return cdoResourceEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_ResourceSet()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_URI()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EReference getCDOResource_Contents()
- {
- return (EReference)cdoResourceEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_Modified()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_Loaded()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_TrackingModification()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_Errors()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_Warnings()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(7);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EAttribute getCDOResource_TimeStamp()
- {
- return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(8);
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public EClass getCDOResourceLeaf()
- {
- return cdoResourceLeafEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public EClass getCDOFileResource()
- {
- return cdoFileResourceEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public EClass getCDOBinaryResource()
- {
- return cdoBinaryResourceEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getCDOBinaryResource_Contents()
- {
- return (EAttribute)cdoBinaryResourceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public EClass getCDOTextResource()
- {
- return cdoTextResourceEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- *
- * @since 4.1 <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getCDOTextResource_Contents()
- {
- return (EAttribute)cdoTextResourceEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EDataType getResourceSet()
- {
- return resourceSetEDataType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EDataType getURI()
- {
- return uriEDataType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EDataType getDiagnostic()
- {
- return diagnosticEDataType;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EresourceFactory getEresourceFactory()
- {
- return (EresourceFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its
- * first. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated)
- return;
- isCreated = true;
-
- // Create classes and their features
- cdoResourceNodeEClass = createEClass(CDO_RESOURCE_NODE);
- createEReference(cdoResourceNodeEClass, CDO_RESOURCE_NODE__FOLDER);
- createEAttribute(cdoResourceNodeEClass, CDO_RESOURCE_NODE__NAME);
- createEAttribute(cdoResourceNodeEClass, CDO_RESOURCE_NODE__PATH);
-
- cdoResourceFolderEClass = createEClass(CDO_RESOURCE_FOLDER);
- createEReference(cdoResourceFolderEClass, CDO_RESOURCE_FOLDER__NODES);
-
- cdoResourceEClass = createEClass(CDO_RESOURCE);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__RESOURCE_SET);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__URI);
- createEReference(cdoResourceEClass, CDO_RESOURCE__CONTENTS);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__MODIFIED);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__LOADED);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__TRACKING_MODIFICATION);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__ERRORS);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__WARNINGS);
- createEAttribute(cdoResourceEClass, CDO_RESOURCE__TIME_STAMP);
-
- cdoResourceLeafEClass = createEClass(CDO_RESOURCE_LEAF);
-
- cdoFileResourceEClass = createEClass(CDO_FILE_RESOURCE);
-
- cdoBinaryResourceEClass = createEClass(CDO_BINARY_RESOURCE);
- createEAttribute(cdoBinaryResourceEClass, CDO_BINARY_RESOURCE__CONTENTS);
-
- cdoTextResourceEClass = createEClass(CDO_TEXT_RESOURCE);
- createEAttribute(cdoTextResourceEClass, CDO_TEXT_RESOURCE__CONTENTS);
-
- // Create data types
- resourceSetEDataType = createEDataType(RESOURCE_SET);
- uriEDataType = createEDataType(URI);
- diagnosticEDataType = createEDataType(DIAGNOSTIC);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any
- * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized)
- return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
- EtypesPackage theEtypesPackage = (EtypesPackage)EPackage.Registry.INSTANCE.getEPackage(EtypesPackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- cdoResourceFolderEClass.getESuperTypes().add(this.getCDOResourceNode());
- cdoResourceEClass.getESuperTypes().add(this.getCDOResourceLeaf());
- cdoResourceLeafEClass.getESuperTypes().add(this.getCDOResourceNode());
- cdoFileResourceEClass.getESuperTypes().add(this.getCDOResourceLeaf());
- cdoBinaryResourceEClass.getESuperTypes().add(this.getCDOFileResource());
- cdoTextResourceEClass.getESuperTypes().add(this.getCDOFileResource());
-
- // Initialize classes and features; add operations and parameters
- initEClass(cdoResourceNodeEClass, CDOResourceNode.class,
- "CDOResourceNode", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getCDOResourceNode_Folder(),
- this.getCDOResourceFolder(),
- this.getCDOResourceFolder_Nodes(),
- "folder", null, 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResourceNode_Name(),
- ecorePackage.getEString(),
- "name", null, 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResourceNode_Path(),
- ecorePackage.getEString(),
- "path", null, 0, 1, CDOResourceNode.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(cdoResourceFolderEClass, CDOResourceFolder.class,
- "CDOResourceFolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getCDOResourceFolder_Nodes(),
- this.getCDOResourceNode(),
- this.getCDOResourceNode_Folder(),
- "nodes", null, 0, -1, CDOResourceFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- EOperation op = addEOperation(cdoResourceFolderEClass, this.getCDOResourceFolder(),
- "addResourceFolder", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- op = addEOperation(cdoResourceFolderEClass, this.getCDOResource(), "addResource", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
- addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(cdoResourceEClass, CDOResource.class,
- "CDOResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(
- getCDOResource_ResourceSet(),
- this.getResourceSet(),
- "resourceSet", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResource_URI(),
- this.getURI(),
- "uRI", null, 0, 1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEReference(
- getCDOResource_Contents(),
- theEcorePackage.getEObject(),
- null,
- "contents", null, 0, -1, CDOResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResource_Modified(),
- ecorePackage.getEBoolean(),
- "modified", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResource_Loaded(),
- ecorePackage.getEBoolean(),
- "loaded", "true", 0, 1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
- initEAttribute(
- getCDOResource_TrackingModification(),
- ecorePackage.getEBoolean(),
- "trackingModification", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResource_Errors(),
- this.getDiagnostic(),
- "errors", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResource_Warnings(),
- this.getDiagnostic(),
- "warnings", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getCDOResource_TimeStamp(),
- theEcorePackage.getELong(),
- "timeStamp", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(cdoResourceLeafEClass, CDOResourceLeaf.class,
- "CDOResourceLeaf", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- initEClass(cdoFileResourceEClass, CDOFileResource.class,
- "CDOFileResource", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- addEOperation(cdoFileResourceEClass, theEtypesPackage.getLob(), "getContents", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(cdoBinaryResourceEClass, CDOBinaryResource.class,
- "CDOBinaryResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(
- getCDOBinaryResource_Contents(),
- theEtypesPackage.getBlob(),
- "contents", null, 1, 1, CDOBinaryResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- initEClass(cdoTextResourceEClass, CDOTextResource.class,
- "CDOTextResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEAttribute(
- getCDOTextResource_Contents(),
- theEtypesPackage.getClob(),
- "contents", null, 1, 1, CDOTextResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
-
- // Initialize data types
- initEDataType(resourceSetEDataType, ResourceSet.class,
- "ResourceSet", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEDataType(uriEDataType, org.eclipse.emf.common.util.URI.class,
- "URI", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEDataType(diagnosticEDataType, Diagnostic.class, "Diagnostic", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
-
- // Create resource
- createResource(eNS_URI);
-
- // Create annotations
- // http://www.eclipse.org/CDO/DBStore
- createDBStoreAnnotations();
- }
-
- /**
- * Initializes the annotations for <b>http://www.eclipse.org/CDO/DBStore</b>. <!-- begin-user-doc -->
- *
- * @since 4.0 <!-- end-user-doc -->
- * @generated
- */
- protected void createDBStoreAnnotations()
- {
- String source = "http://www.eclipse.org/CDO/DBStore"; //$NON-NLS-1$
- addAnnotation(getCDOResourceNode_Name(), source, new String[] { "columnType", "VARCHAR", //$NON-NLS-1$ //$NON-NLS-2$
- "columnLength", "255" //$NON-NLS-1$ //$NON-NLS-2$
- });
- }
-
-} // EresourcePackageImpl
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.impl; + +import org.eclipse.emf.cdo.eresource.CDOBinaryResource; +import org.eclipse.emf.cdo.eresource.CDOFileResource; +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.eresource.CDOResourceFolder; +import org.eclipse.emf.cdo.eresource.CDOResourceLeaf; +import org.eclipse.emf.cdo.eresource.CDOResourceNode; +import org.eclipse.emf.cdo.eresource.CDOTextResource; +import org.eclipse.emf.cdo.eresource.EresourceFactory; +import org.eclipse.emf.cdo.eresource.EresourcePackage; +import org.eclipse.emf.cdo.etypes.EtypesPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.emf.ecore.resource.Resource.Diagnostic; +import org.eclipse.emf.ecore.resource.ResourceSet; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. + * + * @noextend This interface is not intended to be extended by clients. <!-- end-user-doc --> + * @generated + */ +public class EresourcePackageImpl extends EPackageImpl implements EresourcePackage +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass cdoResourceNodeEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass cdoResourceFolderEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass cdoResourceEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass cdoResourceLeafEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass cdoFileResourceEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass cdoBinaryResourceEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass cdoTextResourceEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EDataType resourceSetEDataType = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EDataType uriEDataType = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EDataType diagnosticEDataType = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry + * EPackage.Registry} by the package package URI value. + * <p> + * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also + * performs initialization of the package, or returns the registered package, if one already exists. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.cdo.eresource.EresourcePackage#eNS_URI + * @see #init() + * @generated + */ + private EresourcePackageImpl() + { + super(eNS_URI, EresourceFactory.eINSTANCE); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * <p> + * This method is used to initialize {@link EresourcePackage#eINSTANCE} when that field is accessed. Clients should + * not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static EresourcePackage init() + { + if (isInited) + return (EresourcePackage)EPackage.Registry.INSTANCE.getEPackage(EresourcePackage.eNS_URI); + + // Obtain or create and register package + EresourcePackageImpl theEresourcePackage = (EresourcePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof EresourcePackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) : new EresourcePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EtypesPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theEresourcePackage.createPackageContents(); + + // Initialize created meta-data + theEresourcePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theEresourcePackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(EresourcePackage.eNS_URI, theEresourcePackage); + return theEresourcePackage; + } + + /** + * <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + public EClass getCDOResourceNode() + { + return cdoResourceNodeEClass; + } + + /** + * <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + public EReference getCDOResourceNode_Folder() + { + return (EReference)cdoResourceNodeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + public EAttribute getCDOResourceNode_Name() + { + return (EAttribute)cdoResourceNodeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + public EAttribute getCDOResourceNode_Path() + { + return (EAttribute)cdoResourceNodeEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + public EClass getCDOResourceFolder() + { + return cdoResourceFolderEClass; + } + + /** + * <!-- begin-user-doc --> + * + * @since 2.0<!-- end-user-doc --> + * @generated + */ + public EReference getCDOResourceFolder_Nodes() + { + return (EReference)cdoResourceFolderEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getCDOResource() + { + return cdoResourceEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_ResourceSet() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_URI() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCDOResource_Contents() + { + return (EReference)cdoResourceEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_Modified() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_Loaded() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_TrackingModification() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_Errors() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_Warnings() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCDOResource_TimeStamp() + { + return (EAttribute)cdoResourceEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public EClass getCDOResourceLeaf() + { + return cdoResourceLeafEClass; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public EClass getCDOFileResource() + { + return cdoFileResourceEClass; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public EClass getCDOBinaryResource() + { + return cdoBinaryResourceEClass; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public EAttribute getCDOBinaryResource_Contents() + { + return (EAttribute)cdoBinaryResourceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public EClass getCDOTextResource() + { + return cdoTextResourceEClass; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.1 <!-- end-user-doc --> + * @generated + */ + public EAttribute getCDOTextResource_Contents() + { + return (EAttribute)cdoTextResourceEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EDataType getResourceSet() + { + return resourceSetEDataType; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EDataType getURI() + { + return uriEDataType; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EDataType getDiagnostic() + { + return diagnosticEDataType; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EresourceFactory getEresourceFactory() + { + return (EresourceFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its + * first. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + cdoResourceNodeEClass = createEClass(CDO_RESOURCE_NODE); + createEReference(cdoResourceNodeEClass, CDO_RESOURCE_NODE__FOLDER); + createEAttribute(cdoResourceNodeEClass, CDO_RESOURCE_NODE__NAME); + createEAttribute(cdoResourceNodeEClass, CDO_RESOURCE_NODE__PATH); + + cdoResourceFolderEClass = createEClass(CDO_RESOURCE_FOLDER); + createEReference(cdoResourceFolderEClass, CDO_RESOURCE_FOLDER__NODES); + + cdoResourceEClass = createEClass(CDO_RESOURCE); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__RESOURCE_SET); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__URI); + createEReference(cdoResourceEClass, CDO_RESOURCE__CONTENTS); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__MODIFIED); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__LOADED); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__TRACKING_MODIFICATION); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__ERRORS); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__WARNINGS); + createEAttribute(cdoResourceEClass, CDO_RESOURCE__TIME_STAMP); + + cdoResourceLeafEClass = createEClass(CDO_RESOURCE_LEAF); + + cdoFileResourceEClass = createEClass(CDO_FILE_RESOURCE); + + cdoBinaryResourceEClass = createEClass(CDO_BINARY_RESOURCE); + createEAttribute(cdoBinaryResourceEClass, CDO_BINARY_RESOURCE__CONTENTS); + + cdoTextResourceEClass = createEClass(CDO_TEXT_RESOURCE); + createEAttribute(cdoTextResourceEClass, CDO_TEXT_RESOURCE__CONTENTS); + + // Create data types + resourceSetEDataType = createEDataType(RESOURCE_SET); + uriEDataType = createEDataType(URI); + diagnosticEDataType = createEDataType(DIAGNOSTIC); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any + * invocation but its first. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + EtypesPackage theEtypesPackage = (EtypesPackage)EPackage.Registry.INSTANCE.getEPackage(EtypesPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + cdoResourceFolderEClass.getESuperTypes().add(this.getCDOResourceNode()); + cdoResourceEClass.getESuperTypes().add(this.getCDOResourceLeaf()); + cdoResourceLeafEClass.getESuperTypes().add(this.getCDOResourceNode()); + cdoFileResourceEClass.getESuperTypes().add(this.getCDOResourceLeaf()); + cdoBinaryResourceEClass.getESuperTypes().add(this.getCDOFileResource()); + cdoTextResourceEClass.getESuperTypes().add(this.getCDOFileResource()); + + // Initialize classes and features; add operations and parameters + initEClass(cdoResourceNodeEClass, CDOResourceNode.class, + "CDOResourceNode", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference( + getCDOResourceNode_Folder(), + this.getCDOResourceFolder(), + this.getCDOResourceFolder_Nodes(), + "folder", null, 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResourceNode_Name(), + ecorePackage.getEString(), + "name", null, 0, 1, CDOResourceNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResourceNode_Path(), + ecorePackage.getEString(), + "path", null, 0, 1, CDOResourceNode.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass(cdoResourceFolderEClass, CDOResourceFolder.class, + "CDOResourceFolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference( + getCDOResourceFolder_Nodes(), + this.getCDOResourceNode(), + this.getCDOResourceNode_Folder(), + "nodes", null, 0, -1, CDOResourceFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + EOperation op = addEOperation(cdoResourceFolderEClass, this.getCDOResourceFolder(), + "addResourceFolder", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ + + op = addEOperation(cdoResourceFolderEClass, this.getCDOResource(), "addResource", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ + addEParameter(op, theEcorePackage.getEString(), "name", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ + + initEClass(cdoResourceEClass, CDOResource.class, + "CDOResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getCDOResource_ResourceSet(), + this.getResourceSet(), + "resourceSet", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResource_URI(), + this.getURI(), + "uRI", null, 0, 1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEReference( + getCDOResource_Contents(), + theEcorePackage.getEObject(), + null, + "contents", null, 0, -1, CDOResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResource_Modified(), + ecorePackage.getEBoolean(), + "modified", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResource_Loaded(), + ecorePackage.getEBoolean(), + "loaded", "true", 0, 1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$ + initEAttribute( + getCDOResource_TrackingModification(), + ecorePackage.getEBoolean(), + "trackingModification", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResource_Errors(), + this.getDiagnostic(), + "errors", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResource_Warnings(), + this.getDiagnostic(), + "warnings", null, 0, -1, CDOResource.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + initEAttribute( + getCDOResource_TimeStamp(), + theEcorePackage.getELong(), + "timeStamp", null, 0, 1, CDOResource.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass(cdoResourceLeafEClass, CDOResourceLeaf.class, + "CDOResourceLeaf", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + initEClass(cdoFileResourceEClass, CDOFileResource.class, + "CDOFileResource", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + addEOperation(cdoFileResourceEClass, theEtypesPackage.getLob(), "getContents", 1, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ + + initEClass(cdoBinaryResourceEClass, CDOBinaryResource.class, + "CDOBinaryResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getCDOBinaryResource_Contents(), + theEtypesPackage.getBlob(), + "contents", null, 1, 1, CDOBinaryResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass(cdoTextResourceEClass, CDOTextResource.class, + "CDOTextResource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute( + getCDOTextResource_Contents(), + theEtypesPackage.getClob(), + "contents", null, 1, 1, CDOTextResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + // Initialize data types + initEDataType(resourceSetEDataType, ResourceSet.class, + "ResourceSet", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(uriEDataType, org.eclipse.emf.common.util.URI.class, + "URI", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEDataType(diagnosticEDataType, Diagnostic.class, "Diagnostic", !IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/CDO/DBStore + createDBStoreAnnotations(); + } + + /** + * Initializes the annotations for <b>http://www.eclipse.org/CDO/DBStore</b>. <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + protected void createDBStoreAnnotations() + { + String source = "http://www.eclipse.org/CDO/DBStore"; //$NON-NLS-1$ + addAnnotation(getCDOResourceNode_Name(), source, new String[] { "columnType", "VARCHAR", //$NON-NLS-1$ //$NON-NLS-2$ + "columnLength", "255" //$NON-NLS-1$ //$NON-NLS-2$ + }); + } + +} // EresourcePackageImpl diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/package-info.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/package-info.java index c8d485291c..0c8c55efd3 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/package-info.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/package-info.java @@ -1,18 +1,18 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-
-/**
- * The generated EMF implementation of the CDO repository file system.
- *
- * @apiviz.exclude .*
- */
-package org.eclipse.emf.cdo.eresource.impl;
-
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ + +/** + * The generated EMF implementation of the CDO repository file system. + * + * @apiviz.exclude .* + */ +package org.eclipse.emf.cdo.eresource.impl; + diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/package-info.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/package-info.java index ef952dd3f8..195032a1f2 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/package-info.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/package-info.java @@ -1,19 +1,19 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-
-/**
- * The generated EMF API of the CDO repository file system.
- *
- * @apiviz.exclude .*\.EresourcePackage.*
- * @apiviz.exclude .*\.EresourceFactory.*
- */
-package org.eclipse.emf.cdo.eresource;
-
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ + +/** + * The generated EMF API of the CDO repository file system. + * + * @apiviz.exclude .*\.EresourcePackage.* + * @apiviz.exclude .*\.EresourceFactory.* + */ +package org.eclipse.emf.cdo.eresource; + diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java index 570d7afc47..23d6420600 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceAdapterFactory.java @@ -1,265 +1,265 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.util;
-
-//import org.eclipse.emf.cdo.eresource.*;
-import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
-import org.eclipse.emf.cdo.eresource.CDOFileResource;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
-import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-import org.eclipse.emf.cdo.eresource.CDOTextResource;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code>
- * method for each class of the model. <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage
- * @generated
- */
-public class EresourceAdapterFactory extends AdapterFactoryImpl
-{
- /**
- * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected static EresourcePackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EresourceAdapterFactory()
- {
- if (modelPackage == null)
- {
- modelPackage = EresourcePackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation
- * returns <code>true</code> if the object is either the model's package or is an instance object of the model. <!--
- * end-user-doc -->
- *
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object)
- {
- if (object == modelPackage)
- {
- return true;
- }
- if (object instanceof EObject)
- {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EresourceSwitch<Adapter> modelSwitch = new EresourceSwitch<Adapter>()
- {
- @Override
- public Adapter caseCDOResourceNode(CDOResourceNode object)
- {
- return createCDOResourceNodeAdapter();
- }
-
- @Override
- public Adapter caseCDOResourceFolder(CDOResourceFolder object)
- {
- return createCDOResourceFolderAdapter();
- }
-
- @Override
- public Adapter caseCDOResource(CDOResource object)
- {
- return createCDOResourceAdapter();
- }
-
- @Override
- public Adapter caseCDOResourceLeaf(CDOResourceLeaf object)
- {
- return createCDOResourceLeafAdapter();
- }
-
- @Override
- public Adapter caseCDOFileResource(CDOFileResource<?> object)
- {
- return createCDOFileResourceAdapter();
- }
-
- @Override
- public Adapter caseCDOBinaryResource(CDOBinaryResource object)
- {
- return createCDOBinaryResourceAdapter();
- }
-
- @Override
- public Adapter caseCDOTextResource(CDOTextResource object)
- {
- return createCDOTextResourceAdapter();
- }
-
- @Override
- public Adapter defaultCase(EObject object)
- {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @param target
- * the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target)
- {
- return modelSwitch.doSwitch((EObject)target);
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode
- * <em>CDO Resource Node</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
- * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceNode
- * @generated
- */
- public Adapter createCDOResourceNodeAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder
- * <em>CDO Resource Folder</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
- * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @since 2.0<!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder
- * @generated
- */
- public Adapter createCDOResourceFolderAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResource
- * <em>CDO Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily
- * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
- *
- * @return the new adapter.
- * @see org.eclipse.emf.cdo.eresource.CDOResource
- * @generated
- */
- public Adapter createCDOResourceAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceLeaf
- * <em>CDO Resource Leaf</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
- * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.cdo.eresource.CDOResourceLeaf
- * @generated
- */
- public Adapter createCDOResourceLeafAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOFileResource
- * <em>CDO File Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
- * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.cdo.eresource.CDOFileResource
- * @generated
- */
- public Adapter createCDOFileResourceAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOBinaryResource
- * <em>CDO Binary Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
- * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.cdo.eresource.CDOBinaryResource
- * @generated
- */
- public Adapter createCDOBinaryResourceAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOTextResource
- * <em>CDO Text Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can
- * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.cdo.eresource.CDOTextResource
- * @generated
- */
- public Adapter createCDOTextResourceAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!--
- * end-user-doc -->
- *
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter()
- {
- return null;
- }
-
-} // EresourceAdapterFactory
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.util; + +//import org.eclipse.emf.cdo.eresource.*; +import org.eclipse.emf.cdo.eresource.CDOBinaryResource; +import org.eclipse.emf.cdo.eresource.CDOFileResource; +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.eresource.CDOResourceFolder; +import org.eclipse.emf.cdo.eresource.CDOResourceLeaf; +import org.eclipse.emf.cdo.eresource.CDOResourceNode; +import org.eclipse.emf.cdo.eresource.CDOTextResource; +import org.eclipse.emf.cdo.eresource.EresourcePackage; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code> + * method for each class of the model. <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.eresource.EresourcePackage + * @generated + */ +public class EresourceAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static EresourcePackage modelPackage; + + /** + * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EresourceAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = EresourcePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation + * returns <code>true</code> if the object is either the model's package or is an instance object of the model. <!-- + * end-user-doc --> + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) + { + if (object == modelPackage) + { + return true; + } + if (object instanceof EObject) + { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected EresourceSwitch<Adapter> modelSwitch = new EresourceSwitch<Adapter>() + { + @Override + public Adapter caseCDOResourceNode(CDOResourceNode object) + { + return createCDOResourceNodeAdapter(); + } + + @Override + public Adapter caseCDOResourceFolder(CDOResourceFolder object) + { + return createCDOResourceFolderAdapter(); + } + + @Override + public Adapter caseCDOResource(CDOResource object) + { + return createCDOResourceAdapter(); + } + + @Override + public Adapter caseCDOResourceLeaf(CDOResourceLeaf object) + { + return createCDOResourceLeafAdapter(); + } + + @Override + public Adapter caseCDOFileResource(CDOFileResource<?> object) + { + return createCDOFileResourceAdapter(); + } + + @Override + public Adapter caseCDOBinaryResource(CDOBinaryResource object) + { + return createCDOBinaryResourceAdapter(); + } + + @Override + public Adapter caseCDOTextResource(CDOTextResource object) + { + return createCDOTextResourceAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param target + * the object to adapt. + * @return the adapter for the <code>target</code>. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceNode + * <em>CDO Resource Node</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can + * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @since 2.0<!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.eresource.CDOResourceNode + * @generated + */ + public Adapter createCDOResourceNodeAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceFolder + * <em>CDO Resource Folder</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can + * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @since 2.0<!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.eresource.CDOResourceFolder + * @generated + */ + public Adapter createCDOResourceFolderAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResource + * <em>CDO Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily + * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc --> + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.eresource.CDOResource + * @generated + */ + public Adapter createCDOResourceAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOResourceLeaf + * <em>CDO Resource Leaf</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can + * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @since 4.1 <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.eresource.CDOResourceLeaf + * @generated + */ + public Adapter createCDOResourceLeafAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOFileResource + * <em>CDO File Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can + * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @since 4.1 <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.eresource.CDOFileResource + * @generated + */ + public Adapter createCDOFileResourceAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOBinaryResource + * <em>CDO Binary Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can + * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @since 4.1 <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.eresource.CDOBinaryResource + * @generated + */ + public Adapter createCDOBinaryResourceAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.eresource.CDOTextResource + * <em>CDO Text Resource</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can + * easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @since 4.1 <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.eresource.CDOTextResource + * @generated + */ + public Adapter createCDOTextResourceAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!-- + * end-user-doc --> + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} // EresourceAdapterFactory diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java index 27cee7907c..d9ef3a2964 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java @@ -1,348 +1,348 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.util;
-
-import org.eclipse.emf.cdo.eresource.CDOBinaryResource;
-import org.eclipse.emf.cdo.eresource.CDOFileResource;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-import org.eclipse.emf.cdo.eresource.CDOResourceLeaf;
-import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-import org.eclipse.emf.cdo.eresource.CDOTextResource;
-import org.eclipse.emf.cdo.eresource.EresourcePackage;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import java.util.List;
-
-/**
- * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call
- * {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is
- * returned, which is the result of the switch. <!-- end-user-doc -->
- *
- * @see org.eclipse.emf.cdo.eresource.EresourcePackage
- * @generated
- */
-public class EresourceSwitch<T>
-{
- /**
- * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected static EresourcePackage modelPackage;
-
- /**
- * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public EresourceSwitch()
- {
- if (modelPackage == null)
- {
- modelPackage = EresourcePackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject)
- {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject)
- {
- if (theEClass.eContainer() == modelPackage)
- {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject)
- {
- switch (classifierID)
- {
- case EresourcePackage.CDO_RESOURCE_NODE:
- {
- CDOResourceNode cdoResourceNode = (CDOResourceNode)theEObject;
- T result = caseCDOResourceNode(cdoResourceNode);
- if (result == null)
- {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case EresourcePackage.CDO_RESOURCE_FOLDER:
- {
- CDOResourceFolder cdoResourceFolder = (CDOResourceFolder)theEObject;
- T result = caseCDOResourceFolder(cdoResourceFolder);
- if (result == null)
- {
- result = caseCDOResourceNode(cdoResourceFolder);
- }
- if (result == null)
- {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case EresourcePackage.CDO_RESOURCE:
- {
- CDOResource cdoResource = (CDOResource)theEObject;
- T result = caseCDOResource(cdoResource);
- if (result == null)
- {
- result = caseCDOResourceLeaf(cdoResource);
- }
- if (result == null)
- {
- result = caseCDOResourceNode(cdoResource);
- }
- if (result == null)
- {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case EresourcePackage.CDO_RESOURCE_LEAF:
- {
- CDOResourceLeaf cdoResourceLeaf = (CDOResourceLeaf)theEObject;
- T result = caseCDOResourceLeaf(cdoResourceLeaf);
- if (result == null)
- {
- result = caseCDOResourceNode(cdoResourceLeaf);
- }
- if (result == null)
- {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case EresourcePackage.CDO_FILE_RESOURCE:
- {
- CDOFileResource<?> cdoFileResource = (CDOFileResource<?>)theEObject;
- T result = caseCDOFileResource(cdoFileResource);
- if (result == null)
- {
- result = caseCDOResourceLeaf(cdoFileResource);
- }
- if (result == null)
- {
- result = caseCDOResourceNode(cdoFileResource);
- }
- if (result == null)
- {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case EresourcePackage.CDO_BINARY_RESOURCE:
- {
- CDOBinaryResource cdoBinaryResource = (CDOBinaryResource)theEObject;
- T result = caseCDOBinaryResource(cdoBinaryResource);
- if (result == null)
- {
- result = caseCDOFileResource(cdoBinaryResource);
- }
- if (result == null)
- {
- result = caseCDOResourceLeaf(cdoBinaryResource);
- }
- if (result == null)
- {
- result = caseCDOResourceNode(cdoBinaryResource);
- }
- if (result == null)
- {
- result = defaultCase(theEObject);
- }
- return result;
- }
- case EresourcePackage.CDO_TEXT_RESOURCE:
- {
- CDOTextResource cdoTextResource = (CDOTextResource)theEObject;
- T result = caseCDOTextResource(cdoTextResource);
- if (result == null)
- {
- result = caseCDOFileResource(cdoTextResource);
- }
- if (result == null)
- {
- result = caseCDOResourceLeaf(cdoTextResource);
- }
- if (result == null)
- {
- result = caseCDOResourceNode(cdoTextResource);
- }
- if (result == null)
- {
- result = defaultCase(theEObject);
- }
- return result;
- }
- default:
- return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>CDO Resource Node</em>'. <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch.
- *
- * @since 2.0<!-- end-user-doc -->
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>CDO Resource Node</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseCDOResourceNode(CDOResourceNode object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>CDO Resource Folder</em>'. <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch.
- *
- * @since 2.0 <!-- end-user-doc -->
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>CDO Resource Folder</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseCDOResourceFolder(CDOResourceFolder object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>CDO Resource</em>'. <!-- begin-user-doc -->
- * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>CDO Resource</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseCDOResource(CDOResource object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>CDO Resource Leaf</em>'. <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>CDO Resource Leaf</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseCDOResourceLeaf(CDOResourceLeaf object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>CDO File Resource</em>'. <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>CDO File Resource</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseCDOFileResource(CDOFileResource<?> object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>CDO Binary Resource</em>'. <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>CDO Binary Resource</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseCDOBinaryResource(CDOBinaryResource object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>CDO Text Resource</em>'. <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch.
- *
- * @since 4.1 <!-- end-user-doc -->
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>CDO Text Resource</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseCDOTextResource(CDOTextResource object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This
- * implementation returns null; returning a non-null result will terminate the switch, but this is the last case
- * anyway. <!-- end-user-doc -->
- *
- * @param object
- * the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object)
- {
- return null;
- }
-
-} // EresourceSwitch
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.util; + +import org.eclipse.emf.cdo.eresource.CDOBinaryResource; +import org.eclipse.emf.cdo.eresource.CDOFileResource; +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.eresource.CDOResourceFolder; +import org.eclipse.emf.cdo.eresource.CDOResourceLeaf; +import org.eclipse.emf.cdo.eresource.CDOResourceNode; +import org.eclipse.emf.cdo.eresource.CDOTextResource; +import org.eclipse.emf.cdo.eresource.EresourcePackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import java.util.List; + +/** + * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call + * {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model, + * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is + * returned, which is the result of the switch. <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.eresource.EresourcePackage + * @generated + */ +public class EresourceSwitch<T> +{ + /** + * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static EresourcePackage modelPackage; + + /** + * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EresourceSwitch() + { + if (modelPackage == null) + { + modelPackage = EresourcePackage.eINSTANCE; + } + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + public T doSwitch(EObject theEObject) + { + return doSwitch(theEObject.eClass(), theEObject); + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + protected T doSwitch(EClass theEClass, EObject theEObject) + { + if (theEClass.eContainer() == modelPackage) + { + return doSwitch(theEClass.getClassifierID(), theEObject); + } + List<EClass> eSuperTypes = theEClass.getESuperTypes(); + return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case EresourcePackage.CDO_RESOURCE_NODE: + { + CDOResourceNode cdoResourceNode = (CDOResourceNode)theEObject; + T result = caseCDOResourceNode(cdoResourceNode); + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case EresourcePackage.CDO_RESOURCE_FOLDER: + { + CDOResourceFolder cdoResourceFolder = (CDOResourceFolder)theEObject; + T result = caseCDOResourceFolder(cdoResourceFolder); + if (result == null) + { + result = caseCDOResourceNode(cdoResourceFolder); + } + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case EresourcePackage.CDO_RESOURCE: + { + CDOResource cdoResource = (CDOResource)theEObject; + T result = caseCDOResource(cdoResource); + if (result == null) + { + result = caseCDOResourceLeaf(cdoResource); + } + if (result == null) + { + result = caseCDOResourceNode(cdoResource); + } + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case EresourcePackage.CDO_RESOURCE_LEAF: + { + CDOResourceLeaf cdoResourceLeaf = (CDOResourceLeaf)theEObject; + T result = caseCDOResourceLeaf(cdoResourceLeaf); + if (result == null) + { + result = caseCDOResourceNode(cdoResourceLeaf); + } + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case EresourcePackage.CDO_FILE_RESOURCE: + { + CDOFileResource<?> cdoFileResource = (CDOFileResource<?>)theEObject; + T result = caseCDOFileResource(cdoFileResource); + if (result == null) + { + result = caseCDOResourceLeaf(cdoFileResource); + } + if (result == null) + { + result = caseCDOResourceNode(cdoFileResource); + } + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case EresourcePackage.CDO_BINARY_RESOURCE: + { + CDOBinaryResource cdoBinaryResource = (CDOBinaryResource)theEObject; + T result = caseCDOBinaryResource(cdoBinaryResource); + if (result == null) + { + result = caseCDOFileResource(cdoBinaryResource); + } + if (result == null) + { + result = caseCDOResourceLeaf(cdoBinaryResource); + } + if (result == null) + { + result = caseCDOResourceNode(cdoBinaryResource); + } + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + case EresourcePackage.CDO_TEXT_RESOURCE: + { + CDOTextResource cdoTextResource = (CDOTextResource)theEObject; + T result = caseCDOTextResource(cdoTextResource); + if (result == null) + { + result = caseCDOFileResource(cdoTextResource); + } + if (result == null) + { + result = caseCDOResourceLeaf(cdoTextResource); + } + if (result == null) + { + result = caseCDOResourceNode(cdoTextResource); + } + if (result == null) + { + result = defaultCase(theEObject); + } + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>CDO Resource Node</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. + * + * @since 2.0<!-- end-user-doc --> + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CDO Resource Node</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCDOResourceNode(CDOResourceNode object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>CDO Resource Folder</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. + * + * @since 2.0 <!-- end-user-doc --> + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CDO Resource Folder</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCDOResourceFolder(CDOResourceFolder object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>CDO Resource</em>'. <!-- begin-user-doc --> + * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CDO Resource</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCDOResource(CDOResource object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>CDO Resource Leaf</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. + * + * @since 4.1 <!-- end-user-doc --> + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CDO Resource Leaf</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCDOResourceLeaf(CDOResourceLeaf object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>CDO File Resource</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. + * + * @since 4.1 <!-- end-user-doc --> + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CDO File Resource</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCDOFileResource(CDOFileResource<?> object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>CDO Binary Resource</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. + * + * @since 4.1 <!-- end-user-doc --> + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CDO Binary Resource</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCDOBinaryResource(CDOBinaryResource object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>CDO Text Resource</em>'. <!-- begin-user-doc + * --> This implementation returns null; returning a non-null result will terminate the switch. + * + * @since 4.1 <!-- end-user-doc --> + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>CDO Text Resource</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCDOTextResource(CDOTextResource object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch, but this is the last case + * anyway. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public T defaultCase(EObject object) + { + return null; + } + +} // EresourceSwitch diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/package-info.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/package-info.java index 23fa5e734f..187332db05 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/package-info.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/package-info.java @@ -1,16 +1,16 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-
-/**
- * The generated EMF utilities of the CDO repository file system.
- */
-package org.eclipse.emf.cdo.eresource.util;
-
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ + +/** + * The generated EMF utilities of the CDO repository file system. + */ +package org.eclipse.emf.cdo.eresource.util; + diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceFolderValidator.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceFolderValidator.java index 36bfc2fb0f..62d3024ea0 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceFolderValidator.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceFolderValidator.java @@ -1,31 +1,31 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.validation;
-
-import org.eclipse.emf.cdo.eresource.CDOResourceNode;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * A sample validator interface for {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder}. This doesn't really do
- * anything, and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator
- * plug-in to illustrate how EMF's code generator can be extended. This can be disabled with -vmargs
- * -Dorg.eclipse.emf.examples.generator.validator=false.
- *
- * @since 2.0
- */
-@Deprecated
-public interface CDOResourceFolderValidator
-{
- boolean validate();
-
- boolean validateNodes(EList<CDOResourceNode> value);
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.validation; + +import org.eclipse.emf.cdo.eresource.CDOResourceNode; + +import org.eclipse.emf.common.util.EList; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.eresource.CDOResourceFolder}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator + * plug-in to illustrate how EMF's code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + * + * @since 2.0 + */ +@Deprecated +public interface CDOResourceFolderValidator +{ + boolean validate(); + + boolean validateNodes(EList<CDOResourceNode> value); +} diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceNodeValidator.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceNodeValidator.java index 16978dac2f..a338453176 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceNodeValidator.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceNodeValidator.java @@ -1,33 +1,33 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.validation;
-
-import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
-
-/**
- * A sample validator interface for {@link org.eclipse.emf.cdo.eresource.CDOResourceNode}. This doesn't really do
- * anything, and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator
- * plug-in to illustrate how EMF's code generator can be extended. This can be disabled with -vmargs
- * -Dorg.eclipse.emf.examples.generator.validator=false.
- *
- * @since 2.0
- */
-@Deprecated
-public interface CDOResourceNodeValidator
-{
- boolean validate();
-
- boolean validateFolder(CDOResourceFolder value);
-
- boolean validateName(String value);
-
- boolean validatePath(String value);
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.validation; + +import org.eclipse.emf.cdo.eresource.CDOResourceFolder; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.eresource.CDOResourceNode}. This doesn't really do + * anything, and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator + * plug-in to illustrate how EMF's code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + * + * @since 2.0 + */ +@Deprecated +public interface CDOResourceNodeValidator +{ + boolean validate(); + + boolean validateFolder(CDOResourceFolder value); + + boolean validateName(String value); + + boolean validatePath(String value); +} diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceValidator.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceValidator.java index 653d3a8c2d..a94170ea35 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceValidator.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/CDOResourceValidator.java @@ -1,49 +1,49 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.eresource.validation;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-
-/**
- * A sample validator interface for {@link org.eclipse.emf.cdo.eresource.CDOResource}. This doesn't really do anything,
- * and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator plug-in to
- * illustrate how EMF's code generator can be extended. This can be disabled with -vmargs
- * -Dorg.eclipse.emf.examples.generator.validator=false.
- *
- * @since 2.0
- */
-@Deprecated
-public interface CDOResourceValidator
-{
- boolean validate();
-
- boolean validateResourceSet(ResourceSet value);
-
- boolean validateURI(URI value);
-
- boolean validateContents(EList<EObject> value);
-
- boolean validateModified(boolean value);
-
- boolean validateLoaded(boolean value);
-
- boolean validateTrackingModification(boolean value);
-
- boolean validateErrors(EList<Diagnostic> value);
-
- boolean validateWarnings(EList<Diagnostic> value);
-
- boolean validateTimeStamp(long value);
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.eresource.validation; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource.Diagnostic; +import org.eclipse.emf.ecore.resource.ResourceSet; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.eresource.CDOResource}. This doesn't really do anything, + * and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator plug-in to + * illustrate how EMF's code generator can be extended. This can be disabled with -vmargs + * -Dorg.eclipse.emf.examples.generator.validator=false. + * + * @since 2.0 + */ +@Deprecated +public interface CDOResourceValidator +{ + boolean validate(); + + boolean validateResourceSet(ResourceSet value); + + boolean validateURI(URI value); + + boolean validateContents(EList<EObject> value); + + boolean validateModified(boolean value); + + boolean validateLoaded(boolean value); + + boolean validateTrackingModification(boolean value); + + boolean validateErrors(EList<Diagnostic> value); + + boolean validateWarnings(EList<Diagnostic> value); + + boolean validateTimeStamp(long value); +} diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/package-info.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/package-info.java index 0e34ff92d5..791093075b 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/package-info.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/validation/package-info.java @@ -1,18 +1,18 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-
-/**
- * The generated EMF validation of the CDO repository file system.
- *
- * @deprecated
- */
-package org.eclipse.emf.cdo.eresource.validation;
-
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * 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 + * + * Contributors: + * Eike Stepper - initial API and implementation + */ + +/** + * The generated EMF validation of the CDO repository file system. + * + * @deprecated + */ +package org.eclipse.emf.cdo.eresource.validation; + |