Gets a component scribe by name.
@param componentName the component name (e.g. "VEVENT")
@param version the version of the iCalendar object being parsed
@return the component scribe or a {@link RawComponentScribe} if not found
11075
public ICalComponentScribe<? extends ICalComponent> getComponentScribe(String componentName, ICalVersion version) {
		componentName = componentName.toUpperCase();

		ICalComponentScribe<? extends ICalComponent> scribe = experimentalCompByName.get(componentName);
		if (scribe == null) {
			scribe = standardCompByName.get(componentName);
		}

		if (scribe == null) {
			return new RawComponentScribe(componentName);
		}

		if (version != null && !scribe.getSupportedVersions().contains(version)) {
			//treat the component as a raw component if the current iCal version doesn't support it
			return new RawComponentScribe(componentName);
		}

		return scribe;
	}
1310129
public UIComponent getFacet(String name) {

        if (facets != null) {
            return (facets.get(name));
        } else {
            return (null);
        }

    }
249941
protected Node getComponentByName(String name) throws QTasteException {
        mFoundComponent = null;
        mFindWithEqual = false;
        LOGGER.debug("try to find a component with the name : " + name);
        // TODO: Think about several component having the same names!
        for (Stage s : getStages()) {
            if (mFindWithEqual) {
                break;
            }
            if (!checkName(name, s.getScene().getRoot()) || !mFindWithEqual) {
                LOGGER.debug("parse window");
                lookForComponent(name, s.getScene().getRoot().getChildrenUnmodifiable());
            }
        }
        if (mFoundComponent != null) {
            //			Parent parent = mFoundComponent.getParent();
            //			//active the parent
            //			while ( parent != null && !(parent instanceof Window) )
            //			{
            //				parent = parent.getParent();
            //			}
            //			if ( parent != null )
            //				((Window)parent).toFront();

            return mFoundComponent;
        }
        throw new QTasteTestFailException("The component \"" + name + "\" is not found.");
    }
113102
public Component getComponent(int componentIndex)
    {
        if (componentList != null)
            if (componentIndex < componentList.length)
                return componentList[componentIndex];
        return null;
    }
1256301
public synchronized void registerComponent(Class<?> _clazz, String _version) {
        componentVersions.put(_clazz.getName(), _version);
    }
10813
protected Component lookForComponent(String name, ObservableList<Node> components) {
        for (int i = 0; i < components.size() && !mFindWithEqual; i++) {
            //String componentName = ComponentNamer.getInstance().getNameForComponent(components[c]);
            Node c = components.get(i);
            checkName(name, c);
            if (!mFindWithEqual) {
                if (c instanceof Parent) {
                    Component result = lookForComponent(name, ((Parent) c).getChildrenUnmodifiable());
                    if (result != null) {
                        return result;
                    }
                }
            }
        }
        return null;
    }
796559
function getComponent(tn) {
        var cid = tn.toLowerCase()
        var compDef
        components.some(function (comp) {
            if (comp.hasOwnProperty(cid)) {
                compDef = comp[cid]
                return true
            }
        })
        return compDef
    }
672057
public static WComponent getComponentWithId(final WComponent root, final String id,
			final boolean visibleOnly) {
		ComponentWithContext comp = getComponentWithContextForId(root, id, visibleOnly);
		return comp == null ? null : comp.getComponent();
	}
30618
public static String getAttributeAsString(UIComponent component, String attributeName) {
		try {
			Object attribute = getAttribute(component, attributeName);
			if (null != attribute) {
				if (attribute instanceof ValueExpression) {
					return (String) ((ValueExpression) attribute)
							.getValue(FacesContext.getCurrentInstance().getELContext());
				} else if (attribute instanceof String) {
					return (String) attribute;
				} else {
					LOGGER.severe("unexpected data type of label: " + attributeName + " type:"
							+ attribute.getClass().getName());
					return "unexpected data type of label: " + attributeName + " type:"
							+ attribute.getClass().getName();
				}
			}
			if (null == attribute) {
				ValueExpression vex = component.getValueExpression(attributeName);
				if (null != vex) {
					return (String) vex.getValue(FacesContext.getCurrentInstance().getELContext());
				}
			}
		} catch (ClassCastException error) {
			LOGGER.fine("Attribute is not a String: " + attributeName);
		}
		return null;
	}
227883
def getComponent(self, innerFlag=False):
        
        if self._currentIdx is None:
            raise error.PyAsn1Error('Component not chosen')
        else:
            c = self._componentValues[self._currentIdx]
            if innerFlag and isinstance(c, Choice):
                return c.getComponent(innerFlag)
            else:
                return c
1117758
private Component getFlexViewComponent() {

        final CmsFlexCacheTable table = new CmsFlexCacheTable();
        m_siteTableFilter = new TextField();
        m_siteTableFilter.setIcon(FontOpenCms.FILTER);
        m_siteTableFilter.setInputPrompt(
            Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_FILTER_0));
        m_siteTableFilter.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
        m_siteTableFilter.setWidth("200px");
        m_siteTableFilter.addTextChangeListener(new TextChangeListener() {

            private static final long serialVersionUID = 1L;

            public void textChange(TextChangeEvent event) {

                table.filterTable(event.getText());
            }
        });
        m_infoLayout.addComponent(m_siteTableFilter);

        m_uiContext.addToolbarButton(getFlexStatisticButton());
        m_uiContext.addToolbarButton(CmsFlushCache.getFlushToolButton());

        table.setSizeFull();
        return table;
    }
776025
public T get(String componentId) {
		for (T component : components) {
			if (component.getId().equals(componentId)) {
				return component;
			}
		}
		return null;
	}
642031
public static Component getDescendantNamed(String name, Component parent) {

        Assert.notNull(name, "name");
        Assert.notNull(parent, "parent");

        if (name.equals(parent.getName())) { // Base case
            return parent;
        } else if (parent instanceof Container) { // Recursive case
            for (final Component component : ((Container) parent).getComponents()) {

                final Component foundComponent = SwingUtils.getDescendantNamed(name, component);

                if (foundComponent != null) {
                    return foundComponent;
                }
            }
        }

        return null;
    }
836047
public static UIForm getClosestForm(UIComponent component) {
		while (component != null) {
			if (component instanceof UIForm) {
				return (UIForm) component;
			}
			component = component.getParent();
		}
		return null;
	}
273955
private String _serializeComponent(Component component, Map<Object, String> done) throws ConverterException {
	StringBuilder sb = new StringBuilder();
	Component ca;
	component = new ComponentSpecificAccess(Component.ACCESS_PRIVATE, ca = component);
	boolean isPeristent = ca.isPersistent();

	deep++;
	Object member;
	Iterator<Key> it = component.keyIterator();
	Collection.Key key;
	while (it.hasNext()) {
	    key = it.next();
	    member = component.get(key, null);
	    if (member instanceof UDF) continue;
	    sb.append(goIn() + "<var scope=\"this\" name=" + del + key.toString() + del + ">");
	    sb.append(_serialize(member, done));
	    sb.append(goIn() + "</var>");
	}

	Property p;
	Boolean remotingFetch;
	Struct props = ignoreRemotingFetch ? null : ComponentUtil.getPropertiesAsStruct(ca, false);
	ComponentScope scope = ca.getComponentScope();
	it = scope.keyIterator();
	while (it.hasNext()) {
	    key = Caster.toKey(it.next(), null);
	    if (!ignoreRemotingFetch) {
		p = (Property) props.get(key, null);
		if (p != null) {
		    remotingFetch = Caster.toBoolean(p.getDynamicAttributes().get(REMOTING_FETCH, null), null);
		    if (remotingFetch == null) {
			if (isPeristent && ORMUtil.isRelated(p)) continue;
		    }
		    else if (!remotingFetch.booleanValue()) continue;
		}
	    }

	    member = scope.get(key, null);
	    if (member instanceof UDF || key.equals(KeyConstants._this)) continue;
	    sb.append(goIn() + "<var scope=\"variables\" name=" + del + key.toString() + del + ">");
	    sb.append(_serialize(member, done));
	    sb.append(goIn() + "</var>");
	}

	deep--;
	try {
	    // return goIn()+"<struct>"+sb+"</struct>";
	    return goIn() + "<component md5=\"" + ComponentUtil.md5(component) + "\" name=\"" + component.getAbsName() + "\">" + sb + "</component>";
	}
	catch (Exception e) {
	    throw toConverterException(e);
	}
    }
99236
public void register(ICalComponentScribe<? extends ICalComponent> scribe) {
		experimentalCompByName.put(scribe.getComponentName().toUpperCase(), scribe);
		experimentalCompByClass.put(scribe.getComponentClass(), scribe);
	}
600632
@Override
	public SimpleOrderedMap<Object> create(ComponentVersion version, Boolean encode) throws IOException {
		return getVersion();
	}