|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Identifiable
An Identifiable
instance represents an "identifiable"
component in STEM. Such a component is one that is uniquely identified by a
URI
. An Identifiable
also has DublinCore
metadata (http://www.dublincore.org/)
associated with it that defines its origin and contents.
Virtually all components in a STEM simulation are Identifiable
.
Graph
,
Model
,
Scenario
Method Summary | |
---|---|
DublinCore |
getDublinCore()
|
org.eclipse.emf.common.util.URI |
getTypeURI()
|
org.eclipse.emf.common.util.URI |
getURI()
|
boolean |
sane()
This method is for ongoing development and testing purposes. |
void |
setDublinCore(DublinCore value)
Sets the value of the ' Dublin Core ' containment reference. |
void |
setTypeURI(org.eclipse.emf.common.util.URI value)
Sets the value of the ' Type URI ' attribute. |
void |
setURI(org.eclipse.emf.common.util.URI value)
Sets the value of the ' URI ' attribute. |
Methods inherited from interface org.eclipse.emf.ecore.EObject |
---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
---|
eAdapters, eDeliver, eNotify, eSetDeliver |
Method Detail |
---|
org.eclipse.emf.common.util.URI getURI()
void setURI(org.eclipse.emf.common.util.URI value)
URI
' attribute.
value
- the new value of the 'URI' attribute.getURI()
org.eclipse.emf.common.util.URI getTypeURI()
void setTypeURI(org.eclipse.emf.common.util.URI value)
Type URI
' attribute.
value
- the new value of the 'Type URI' attribute.getTypeURI()
DublinCore getDublinCore()
void setDublinCore(DublinCore value)
Dublin Core
' containment reference.
value
- the new value of the 'Dublin Core' containment reference.getDublinCore()
boolean sane()
SanityChecker
This method is intended to be overridden by extending sub-classes. These
classes should first call the method in the super class (i.e.,
super.sane()
) to ensure that the super class is "ok" and
then it can issue its own assertions.
void sane() {
boolean retValue = super.sane();
// If foo references bar, then bar should reference foo!
retValue = retValue && (foo.a == bar && bar.a == foo);
assert(retValue);
return retValue;
} // sane
The idiom retValue = retValue && <boolean test>
followed by an assertion of the value of retValue
is a
typical pattern. If followed, then once a problem is detected, an
assertion will be thrown, or the rest of the tests will be skipped and
the value of false
returned. By having sane
return a value rather than simply relying upon the assert
keyword sanity testing can occur even if assertions are not enabled.
The sane
method should be called when the instance is
known to be "stable" so the consistency checks should complete with no
problems (if all is well).
sane
in interface SanityChecker
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |