use of org.eclipse.emf.ecore.util.FeatureMapUtil.FeatureEList in project mylyn.docs by eclipse.
the class AbstractTest method getText.
@SuppressWarnings("rawtypes")
public String getText(Identifier element) {
FeatureMap fm = element.getMixed();
Object o = fm.get(TEXT, false);
if (o instanceof FeatureEList) {
if (((FeatureEList) o).size() > 0) {
return ((FeatureEList) o).get(0).toString();
}
}
return null;
}
use of org.eclipse.emf.ecore.util.FeatureMapUtil.FeatureEList in project mylyn.docs by eclipse.
the class PublicationProxy method getIdentifier.
@SuppressWarnings("rawtypes")
public String getIdentifier() {
EList<Identifier> identifiers = publication.getPackage().getMetadata().getIdentifiers();
if (identifiers.size() > 0) {
FeatureMap fm = identifiers.get(0).getMixed();
Object o = fm.get(TEXT, false);
if (o instanceof FeatureEList) {
if (((FeatureEList) o).size() > 0) {
return ((FeatureEList) o).get(0).toString();
}
}
}
return EMPTY_STRING;
}
use of org.eclipse.emf.ecore.util.FeatureMapUtil.FeatureEList in project mylyn.docs by eclipse.
the class PublicationProxy method getRights.
@SuppressWarnings("rawtypes")
public String getRights() {
EList<Rights> rights = publication.getPackage().getMetadata().getRights();
if (rights.size() > 0) {
FeatureMap fm = rights.get(0).getMixed();
Object o = fm.get(TEXT, false);
if (o instanceof FeatureEList) {
if (((FeatureEList) o).size() > 0) {
return ((FeatureEList) o).get(0).toString();
}
}
}
return EMPTY_STRING;
}
use of org.eclipse.emf.ecore.util.FeatureMapUtil.FeatureEList in project mylyn.docs by eclipse.
the class PublicationProxy method getCreator.
/**
* Returns the name of the first instance of an {@link Creator} in the publication. If a value has not been assigned
* an empty string will be returned.
*
* @return the creator name
*/
@SuppressWarnings("rawtypes")
public String getCreator() {
EList<Creator> creators = publication.getPackage().getMetadata().getCreators();
if (creators.size() > 0) {
FeatureMap fm = creators.get(0).getMixed();
Object o = fm.get(TEXT, false);
if (o instanceof FeatureEList) {
if (((FeatureEList) o).size() > 0) {
return ((FeatureEList) o).get(0).toString();
}
}
}
return EMPTY_STRING;
}
use of org.eclipse.emf.ecore.util.FeatureMapUtil.FeatureEList in project mylyn.docs by eclipse.
the class TestOPSPublication method getText.
@SuppressWarnings("rawtypes")
public String getText(Object element) {
if (element instanceof NavPoint) {
FeatureMap fm = ((NavPoint) element).getNavLabels().get(0).getText().getMixed();
Object o = fm.get(TEXT, false);
if (o instanceof FeatureEList) {
if (((FeatureEList) o).size() > 0) {
return ((FeatureEList) o).get(0).toString();
}
}
}
if (element instanceof Meta) {
Object o = ((Meta) element).getContent();
return o.toString();
}
return "null";
}
Aggregations