org.eclipse.gmt.umlx.ecore.util
Class ResourceSetResourcesSiblingAccessor

java.lang.Object
  extended by org.eclipse.gmt.umlx.ecore.accessor.ParentAccessor<C,P,CM>
      extended by org.eclipse.gmt.umlx.ecore.accessor.SingleParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
          extended by org.eclipse.gmt.umlx.ecore.util.ResourceSetResourcesSiblingAccessor
All Implemented Interfaces:
IParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>, ISiblingAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>

public class ResourceSetResourcesSiblingAccessor
extends SingleParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>


Method Summary
 org.eclipse.emf.ecore.resource.Resource eResource(org.eclipse.emf.ecore.resource.Resource child)
           
 java.util.List<? super org.eclipse.emf.ecore.resource.Resource> getChildren(org.eclipse.emf.ecore.resource.ResourceSet parent)
          Return all child class children of parent.
static ResourceSetResourcesSiblingAccessor getInstance()
           
 java.lang.String getLabel(org.eclipse.emf.ecore.resource.Resource child)
          Get the label (name/text/whetever) of the child.
 org.eclipse.emf.ecore.resource.ResourceSet getParent(org.eclipse.emf.ecore.resource.Resource child)
           
 boolean hasLabel()
          Test whether the child class has a label field.
 void setLabel(org.eclipse.emf.ecore.resource.Resource child, java.lang.String label)
          Set the label (name/text/whetever) of the child.
 
Methods inherited from class org.eclipse.gmt.umlx.ecore.accessor.SingleParentAccessor
basicGetParent, getParentClass, getSiblingAccessor, getSiblings, removeChild, setParent
 
Methods inherited from class org.eclipse.gmt.umlx.ecore.accessor.ParentAccessor
getBaseParentClass, getChildClass, getCoModel, getCoModelClass, getParentAccessor, getParentAccessor, setCoModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmt.umlx.ecore.accessor.IParentAccessor
getBaseParentClass, getChildClass, getCoModel, getCoModelClass, setCoModel
 

Method Detail

getInstance

public static ResourceSetResourcesSiblingAccessor getInstance()

eResource

public org.eclipse.emf.ecore.resource.Resource eResource(org.eclipse.emf.ecore.resource.Resource child)

getChildren

public java.util.List<? super org.eclipse.emf.ecore.resource.Resource> getChildren(org.eclipse.emf.ecore.resource.ResourceSet parent)
Description copied from interface: ISiblingAccessor
Return all child class children of parent. Note that the returned list is the parenmt's list if the parent happens to maintain a suitable list, otherwise a temporary list is constructed for the return. Changes to the temporary do not affect the parent.

Parameters:
parent - parent of required children
Returns:
the non-null but possibly empty list of children

getLabel

public java.lang.String getLabel(org.eclipse.emf.ecore.resource.Resource child)
Description copied from interface: ISiblingAccessor
Get the label (name/text/whetever) of the child.

Specified by:
getLabel in interface ISiblingAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
Overrides:
getLabel in class SingleParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
Parameters:
child - providing the label
Returns:
the label

getParent

public org.eclipse.emf.ecore.resource.ResourceSet getParent(org.eclipse.emf.ecore.resource.Resource child)
Specified by:
getParent in interface IParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
Specified by:
getParent in class SingleParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>

setLabel

public void setLabel(org.eclipse.emf.ecore.resource.Resource child,
                     java.lang.String label)
Description copied from interface: ISiblingAccessor
Set the label (name/text/whetever) of the child.

Specified by:
setLabel in interface ISiblingAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
Overrides:
setLabel in class SingleParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
Parameters:
child - providing the label
label - the label

hasLabel

public boolean hasLabel()
Description copied from interface: ISiblingAccessor
Test whether the child class has a label field.

Specified by:
hasLabel in interface ISiblingAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
Overrides:
hasLabel in class SingleParentAccessor<org.eclipse.emf.ecore.resource.Resource,org.eclipse.emf.ecore.resource.ResourceSet,java.lang.Object>
Returns:
true if getLabel() and setLabel() are useable.