本文整理汇总了Java中org.eclipse.emf.ecore.util.FeatureMap.Entry类的典型用法代码示例。如果您正苦于以下问题:Java Entry类的具体用法?Java Entry怎么用?Java Entry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Entry类属于org.eclipse.emf.ecore.util.FeatureMap包,在下文中一共展示了Entry类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: undoTextElementToTextNode
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private static void undoTextElementToTextNode(XMLResource saturnResourceImpl_, Map<Entry, Entry> textNodes_)
{
DocumentRoot o = (DocumentRoot) saturnResourceImpl_.getContents().get(0);
Saturn saturn = (Saturn) o.eContents().get(0);
TreeIterator<EObject> ee = saturn.eAllContents();
while (ee.hasNext())
{
EObject e = ee.next();
if (e == null) continue;
EClass ec = e.eClass();
if (!ValuesPackage.eINSTANCE.getComplexValue().isSuperTypeOf(ec)) continue;
ComplexValue cv = (ComplexValue) e;
for (int i = 0; i < cv.getMixed().size(); i++)
{
FeatureMap.Entry entry = cv.getMixed().get(i);
if (textNodes_.containsKey(entry))
{
Entry textComplexValueEntry = textNodes_.get(entry);
cv.getMixed().set(i, textComplexValueEntry);
}
}
}
}
开发者ID:Morgan-Stanley,项目名称:Saturn,代码行数:25,代码来源:SaturnDocLoadSaveUtil.java
示例2: findOwnerIdOfEObj
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private String findOwnerIdOfEObj(AnyType eObjAnyType) {
String ownerId = null;
if (eObjAnyType != null) {
FeatureMap mixed = eObjAnyType.getMixed();
for (Entry entry : mixed) {
String entryName = (entry.getEStructuralFeature()).getName();
if (entryName != null) {
if (entryName.equals("model")) {
if (entry.getValue() instanceof AnyType) {
AnyType modelAnyType = (AnyType) entry.getValue();
ownerId = getEObjEOwnerIdFromModelAnyType(modelAnyType);
break;
}
}
}
}
}
return ownerId;
}
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:20,代码来源:EAEObjInfoManager.java
示例3: findStereoTypeOfEObj
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private String findStereoTypeOfEObj(AnyType eObjAnyType) {
// find parameter and store it in List
String stereoType = null;
if (eObjAnyType != null) {
FeatureMap mixed = eObjAnyType.getMixed();
for (Entry entry : mixed) {
String entryName = (entry.getEStructuralFeature()).getName();
if (entryName != null) {
if (entryName.equals("properties")) {
if (entry.getValue() instanceof AnyType) {
AnyType propertiesAnyType = (AnyType) entry
.getValue();
stereoType = getEObjStereotypeFromPropertyAnyType(propertiesAnyType);
break;
}
}
}
}
}
return stereoType;
}
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:22,代码来源:EAEObjInfoManager.java
示例4: findEObjAllParameterList
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private ArrayList<Parameter> findEObjAllParameterList(AnyType eObjAnyType) {
// find parameter in 'Tag' tag and store it in List
ArrayList<Parameter> paramList = null;
FeatureMap mixed = eObjAnyType.getMixed();
for (Entry entry : mixed) {
String entryName = (entry.getEStructuralFeature()).getName();
if (entryName != null) {
if (entryName.equals("tags")) {
if (entry.getValue() instanceof AnyType) {
AnyType tagAnyType = (AnyType) entry.getValue();
paramList = findTagsAttrAndAddToParamList(tagAnyType);
}
}
}
}
return paramList;
}
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:18,代码来源:EAEObjInfoManager.java
示例5: getEObjStereotypeFromPropertyAnyType
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private String getEObjStereotypeFromPropertyAnyType(
AnyType propertiesAnyType) {
String stereoType = null;
if (propertiesAnyType != null) {
FeatureMap propertiesMap = propertiesAnyType.getAnyAttribute();
for (Entry entry : propertiesMap) {
String entryName = (entry.getEStructuralFeature()).getName();
if (entryName != null) {
if (entryName.equals("stereotype")) {
stereoType = (String) entry.getValue();
break;
}
}
}
}
return stereoType;
}
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:19,代码来源:EAEObjInfoManager.java
示例6: equals
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
@Override
public boolean equals(Object that)
{
if (this == that)
{
return true;
}
else if (!(that instanceof FeatureMap.Entry))
{
return false;
}
else
{
FeatureMap.Entry entry = (FeatureMap.Entry)that;
return
entry.getEStructuralFeature() == eStructuralFeature &&
(value == null ? entry.getValue() == null : value.equals(entry.getValue()));
}
}
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:20,代码来源:FeatureMapUtil.java
示例7: addAllUnique
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
public boolean addAllUnique(int index, Entry.Internal [] entries, int start, int end)
{
modCount = -1;
BasicEList<Entry.Internal> collection = new BasicEList<Entry.Internal>();
if (start == 0)
{
collection.setData(end, entries);
}
else
{
collection.grow(end - start);
for (int i = start; i < end; ++i)
{
collection.add(entries[i]);
}
}
return featureMap.addAllUnique(index, collection);
}
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:19,代码来源:FeatureMapUtil.java
示例8: addAll
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
public boolean addAll(int index, EStructuralFeature feature, Collection<?> values)
{
if (isFeatureMap(feature))
{
@SuppressWarnings("unchecked") Collection<? extends Entry> entryValues = (Collection<? extends Entry>)values;
return addAll(index, entryValues);
}
else
{
Collection<Entry> entries = new ArrayList<Entry>(values.size());
for (Object value : values)
{
entries.add(createEntry(feature, value));
}
return addAll(index, entries);
}
}
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:18,代码来源:FeatureMapUtil.java
示例9: verifyFormIsNull
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
/**
* 判断表单是否空
*
* @param flowElement
*/
private static void verifyFormIsNull(FlowElement flowElement,StringBuffer sb) {
if (flowElement instanceof UserTask) {
UserTask userTask = (UserTask) flowElement;
for (ExtensionAttributeValue extensionAttributeValue : userTask.getExtensionValues()) {
FeatureMap extensionElements = extensionAttributeValue.getValue();
for (Entry entry : extensionElements) {
if (entry.getValue() instanceof FormUri) {
FormUri formUri = (FormUri) entry.getValue();
if (formUri.getExpression().getValue() != null || !(formUri.getExpression().getValue().equals(""))) {
return;
}
}
}
}
sb.append(userTask.getId() + "节点没有设置表单;" + "");
}
}
开发者ID:fixteam,项目名称:fixflow,代码行数:26,代码来源:VerificationUtil.java
示例10: allUserTaskNodeHaveTaskCommand
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
/**
* 验证所有人工节点含有处理命令
*
* @param flowElement
*/
private static void allUserTaskNodeHaveTaskCommand(FlowElement flowElement,StringBuffer sb) {
if (flowElement instanceof UserTask) {
for (ExtensionAttributeValue extensionAttributeValue : ((UserTask) flowElement).getExtensionValues()) {
FeatureMap extensionElements = extensionAttributeValue.getValue();
for (Entry entry : extensionElements) {
if (entry.getValue() instanceof TaskCommand) {
TaskCommand taskCommand = (TaskCommand) entry.getValue();
if (taskCommand != null) {
return;
}
}
}
}
sb.append(((UserTask) flowElement).getId() + "节点没有设置处理命令;" + "");
}
}
开发者ID:fixteam,项目名称:fixflow,代码行数:25,代码来源:VerificationUtil.java
示例11: doSave
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
/**
* @generated NOT
*/
@Override
public void doSave(OutputStream outputStream_, Map<?, ?> options_) throws IOException
{
final Map<Entry, Entry> textNodes_ = new HashMap<Entry, Entry>();
Collection<EObject> objects = EcoreUtil.copyAll(this.getContents());
SaturnResourceImpl s = new SaturnResourceImpl(this.uri);
s.init();
s.getContents().addAll(objects);
SaturnDocLoadSaveUtil.save(s, textNodes_);
XMLSave xmlSave = createXMLSave();
if (options_ == null)
{
options_ = Collections.EMPTY_MAP;
}
ResourceHandler handler = (ResourceHandler) options_.get(OPTION_RESOURCE_HANDLER);
if (handler != null)
{
handler.preSave(s, outputStream_, options_);
}
xmlSave.save(s, outputStream_, options_);
if (handler != null)
{
handler.postSave(s, outputStream_, options_);
}
}
开发者ID:Morgan-Stanley,项目名称:Saturn,代码行数:37,代码来源:SaturnResourceImpl.java
示例12: textElementToTextNode
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private static void textElementToTextNode(SaturnResourceImpl saturnResourceImpl_, Map<Entry, Entry> textNodes_)
{
DocumentRoot o = (DocumentRoot) saturnResourceImpl_.getContents().get(0);
Saturn saturn = (Saturn) o.eContents().get(0);
TreeIterator<EObject> ee = saturn.eAllContents();
while (ee.hasNext())
{
EObject e = ee.next();
if (e == null) continue;
EClass ec = e.eClass();
if (!ValuesPackage.eINSTANCE.getComplexValue().isSuperTypeOf(ec)) continue;
ComplexValue cv = (ComplexValue) e;
for (int i = 0; i < cv.getMixed().size(); i++)
{
FeatureMap.Entry entry = cv.getMixed().get(i);
Object value = entry.getValue();
if (value instanceof TextComplexValue)
{
FeatureMap.Entry newEntry = FeatureMapUtil.createTextEntry(((TextComplexValue) value).getText());
cv.getMixed().set(i, newEntry);
textNodes_.put(newEntry, entry);
}
}
}
}
开发者ID:Morgan-Stanley,项目名称:Saturn,代码行数:28,代码来源:SaturnDocLoadSaveUtil.java
示例13: textNodeToTextElement
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private static void textNodeToTextElement(SaturnResourceImpl saturnResourceImpl_)
{
DocumentRoot o = (DocumentRoot) saturnResourceImpl_.getContents().get(0);
Saturn saturn = (Saturn) o.eContents().get(0);
TreeIterator<EObject> ee = saturn.eAllContents();
while (ee.hasNext())
{
EObject e = ee.next();
if (e == null) continue;
EClass ec = e.eClass();
if (!ValuesPackage.eINSTANCE.getComplexValue().isSuperTypeOf(ec)) continue;
ComplexValue cv = (ComplexValue) e;
for (int i = 0; i < cv.getMixed().size(); i++)
{
FeatureMap.Entry entry = cv.getMixed().get(i);
Object value = entry.getValue();
if (value instanceof String)
{
TextComplexValue textComplexValue = ValuesPackage.eINSTANCE.getValuesFactory().createTextComplexValue();
textComplexValue.setText((String) value);
FeatureMap.Entry newEntry = FeatureMapUtil.createEntry(ValuesPackage.eINSTANCE.getComplexValue_Text(),
textComplexValue);
cv.getMixed().set(i, newEntry);
}
}
}
}
开发者ID:Morgan-Stanley,项目名称:Saturn,代码行数:29,代码来源:SaturnDocLoadSaveUtil.java
示例14: addXmlNsPrefixes
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private static void addXmlNsPrefixes(SaturnResourceImpl saturnResourceImpl_)
{
EList<EObject> contents = saturnResourceImpl_.getContents();
if (contents.size() <= 0) return;
if (!(contents.get(0) instanceof DocumentRoot)) return;
DocumentRoot documentRoot = (DocumentRoot) contents.get(0);
List<BasicEMap.Entry<String, String>> xmlNsList = getXmlNsList();
for (BasicEMap.Entry<String, String> newEntry : xmlNsList)
{
documentRoot.getXMLNSPrefixMap().add(newEntry);
}
}
开发者ID:Morgan-Stanley,项目名称:Saturn,代码行数:15,代码来源:SaturnDocLoadSaveUtil.java
示例15: getEObjEOwnerIdFromModelAnyType
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private String getEObjEOwnerIdFromModelAnyType(AnyType modelAnyType) {
String ownerId = null;
FeatureMap eObjAttrs = modelAnyType.getAnyAttribute();
for (Entry entry : eObjAttrs) {
String entryName = (entry.getEStructuralFeature()).getName();
if (entryName.equals("owner")) {
ownerId = (String) entry.getValue();
break;
}
}
return ownerId;
}
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:13,代码来源:EAEObjInfoManager.java
示例16: getEObjectIdRefFromExtensionImpl
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private String getEObjectIdRefFromExtensionImpl(AnyType eObjAnyType) {
String idRef = null;
FeatureMap eObjAttrs = eObjAnyType.getAnyAttribute();
for (Entry entry : eObjAttrs) {
String entryName = (entry.getEStructuralFeature()).getName();
if (entryName.equals("idref")) {
idRef = (String) entry.getValue();
}
}
return idRef;
}
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:12,代码来源:EAEObjInfoManager.java
示例17: findEObjAllConstraintList
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
private ArrayList<Constraint> findEObjAllConstraintList(AnyType eObjAnyType) {
ArrayList<Constraint> constraintList = null;
FeatureMap mixed = eObjAnyType.getMixed();
for (Entry entry : mixed) {
String entryName = (entry.getEStructuralFeature()).getName();
if (entryName != null) {
if (entryName.equals("constraints")) {
AnyType cosntraintsAnyType = (AnyType) entry.getValue();
constraintList = findConstraintAttrAndAddToConstraintList(cosntraintsAnyType);
}
}
}
return constraintList;
}
开发者ID:ZhengshuaiPENG,项目名称:org.lovian.eaxmireader,代码行数:15,代码来源:EAEObjInfoManager.java
示例18: createRawProcessingInstructionEntry
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
public static FeatureMap.Entry.Internal createRawProcessingInstructionEntry(String target, String data)
{
ProcessingInstruction processingInstruction = XMLTypeFactory.eINSTANCE.createProcessingInstruction();
processingInstruction.setTarget(target);
processingInstruction.setData(data);
return XMLTypeFeatures.PROCESSING_INSTRUCTION_PROTOTYPE.createEntry(processingInstruction);
}
开发者ID:LangleyStudios,项目名称:eclipse-avro,代码行数:8,代码来源:FeatureMapUtil.java
示例19: getText
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
@Override
public String getText(Object object) {
if (((FeatureMap.Entry)value).getValue() instanceof AnyType) {
return ((FeatureMap.Entry) value).getEStructuralFeature().getName();
} else {
return value.toString();
}
}
开发者ID:markus1978,项目名称:clickwatch,代码行数:9,代码来源:ClickWatchReflectiveItemProviderAdapterFactory.java
示例20: getForeground
import org.eclipse.emf.ecore.util.FeatureMap.Entry; //导入依赖的package包/类
@Override
public Object getForeground(Object object) {
Object result = null;
if (object instanceof FeatureMapEntryWrapperItemProvider) {
FeatureMap.Entry entry = (FeatureMap.Entry)
((FeatureMapEntryWrapperItemProvider)object).getValue();
EObject owner = (EObject)
((FeatureMapEntryWrapperItemProvider)object).getOwner();
result = ClickWatchReflectiveItemProviderAdapterFactory.this.
getForeground(owner, entry.getEStructuralFeature(), entry.getValue());
}
return result == null ? super.getForeground(object) : result;
}
开发者ID:markus1978,项目名称:clickwatch,代码行数:15,代码来源:ClickWatchReflectiveItemProviderAdapterFactory.java
注:本文中的org.eclipse.emf.ecore.util.FeatureMap.Entry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论