GET /layertemplates/id: Show a specific item.
327613
def show(self, id):
        """"""
        # url('LayerTemplates', id=ID)
        lt = meta.Session.query(LayerTemplate).get(id)
        # use following query for getting a layertemplate owned by current user
        #lt = self._get_lt_from_user_by_id(c.user, id)
        if lt is None:
            abort(404)
        return lt.to_json()
1004458
def get_template_names(self):
        """"""
        if self.request.is_ajax():
            template = self.ajax_template_name
        else:
            template = self.template_name
        return template
1301264
def getItemType(self, itemID):
        

        collections = self.getAllItemTypes()

        for coll in collections:
            note = self.noteDB[coll].find_one({"ID": itemID})
            if note is not None:
                return coll
110101
def get_display_panel_by_id(self, identifier: str) -> DisplayPanel:
        
        display_panel = next(
            (display_panel for display_panel in self.__document_controller.workspace_controller.display_panels if
            display_panel.identifier.lower() == identifier.lower()), None)
        return DisplayPanel(display_panel) if display_panel else None
1036508
@Api
	public Layer<?> getLayer(String layerId) {
		if (layers != null) {
			for (Layer<?> layer : layers) {
				if (layer.getId().equals(layerId)) {
					return layer;
				}
			}
		}
		return null;
	}
1126978
def get_id2children(objs):
    """"""
    id2children = {}
    for obj in objs:
        _get_id2children(id2children, obj.item_id, obj)
    return id2children
231479
def get_current_item(self):
        """"""
        l = self.selectedIndexes()
        if len(l) > 0:
            return self.model().get_item(l[0])
852840
def get_layer_by_name(self, name):
        
        try:
            return self.layernames[name]
        except KeyError:
            msg = 'Layer "{0}" not found.'
            logger.debug(msg.format(name))
            raise ValueError
676466
function getViewTileId(gid) {
         if (this.animations.has(gid)) {
           // apply animations
           gid = this.animations.get(gid).cur.tileid;
         } else {
           // get the local tileset id
           gid -= this.firstgid;
         }

         return gid;
       }
29431
def _get_ax_layer(cls, ax, primary=True):
        """"""
        if primary:
            return getattr(ax, 'left_ax', ax)
        else:
            return getattr(ax, 'right_ax', ax)
20400
def check_vector_template(self):
        """"""

        if self.vector_url is not None and self.vector_layer_name is not None:
            self.template = 'vector_' + self.template
            self.vector_source = True
        else:
            self.vector_source = False
75160
public void goToStepId(int id) {
        for (int i = 0; i < getWidgetCount(); i++) {
            Widget w = getWidget(i);
            if (w instanceof MaterialStep) {
                MaterialStep materialStep = (MaterialStep) w;
                boolean active = materialStep.getStep() == id;
                materialStep.setActive(active);
                if (active) {
                    setCurrentStepIndex(i);
                }
            }
        }
    }
478991
function getView(id, viewID) {
  return getItem(id)
    .then(pkg => pkg.views.find(e => e.viewID === viewID));
}
366997
def get_id2parents(objs):
    """"""
    id2parents = {}
    for obj in objs:
        _get_id2parents(id2parents, obj.item_id, obj)
    return id2parents
1082869
def getItem(self, itemId):
        
        url = "%s/items/%s" % (self.root, itemId)
        return Item(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
218044
def _showItemContextMenu(self, item, point, col):
        """"""
        menu = getattr(item, '_menu', None)
        if menu:
            settitle = getattr(item, '_set_menu_title', None)
            if settitle:
                settitle()
            # self._current_item tells callbacks what item the menu was referring to
            point = self.etw.mapToGlobal(point)
            self._current_item = item
            self.etw.clearSelection()
            self.etw.setItemSelected(item, True)
            menu.exec_(point)
        else:
            self._current_item = None
277983
def get_item_ids(self):
        """"""
        if self.has_item_ids():
            return IdList(self.my_osid_object._my_map['itemIds'],
                          runtime=self.my_osid_object._runtime,
                          proxy=self.my_osid_object._proxy)
        raise IllegalState()