returns the Item class of an Item
432785
def item(self):
        """"""
        url = self._contentURL
        return Item(url=self._contentURL,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port,
                    initalize=True)
1049888
function(item) {
            if(!item || !item.type || !item.element)
                return false;

            switch(item.type) {
                case 'milestone':
                    return (item.element.hasClass('timeline-milestone'));
                    break;
                case 'smallItem':
                    return (item.element.hasClass('timeline-smallitem'));
                    break;
                case 'bigItem':
                    return (item.element.hasClass('timeline-bigitem'));
                    break;
                default:
                    return false;
                    break;
            }
        }
715070
def diff(self, items):
        
        return self.__class__([i for i in self.items if i not in items])
984923
def get_item_key(self, item):
        """"""
        try:
            ret = item[item['key']]
        except KeyError:
            logger.error("No 'key' available in {}".format(item))
        if isinstance(ret, list):
            return ret[0]
        else:
            return ret
1270090
def match(self, item):
        
        val = getattr(item, self._name) or False
        return bool(val) is self._value
130756
function(item) {
            if(!item || (item && !item.element) || (item && !item.position))
                return;

            switch(item.position) {
                case 'left':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-left');
                    break;
                case 'top':
                    item.element
                    .removeClass('timeline-me-left')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-top');
                    break;
                case 'right':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-left')
                    .removeClass('timeline-me-bottom')
                    .addClass('timeline-me-right');
                    break;
                case 'bottom':
                    item.element
                    .removeClass('timeline-me-top')
                    .removeClass('timeline-me-right')
                    .removeClass('timeline-me-left')
                    .addClass('timeline-me-bottom');
                    break;
            }

            return item;
        }
1216280
def infer_list_subtype(items):
        """"""
        subtype = End

        for item in items:
            item_type = type(item)
            if not issubclass(item_type, Base):
                continue

            if subtype is End:
                subtype = item_type
                if not issubclass(subtype, List):
                    return subtype
            elif subtype is not item_type:
                stype, itype = subtype, item_type
                generic = List
                while issubclass(stype, List) and issubclass(itype, List):
                    stype, itype = stype.subtype, itype.subtype
                    generic = List[generic]

                if stype is End:
                    subtype = item_type
                elif itype is not End:
                    return generic.subtype
        return subtype
159506
def get_class(class_string):
    
    split_string = class_string.encode('ascii').split('.')
    import_path = '.'.join(split_string[:-1])
    class_name = split_string[-1]

    if class_name:
        try:
            if import_path:
                mod = __import__(import_path, globals(), {}, [class_name])
                cls = getattr(mod, class_name)
            else:
                cls = __import__(class_name, globals(), {})
            if cls:
                return cls
        except (ImportError, AttributeError):
            pass

    return None
331011
def node(self):
        

        if self.node_class is None:
            raise ValueError("You have to create an ``Item`` by calling ``__init__`` with ``node_class`` argument"
                             " or by decorating a ``Node`` class.")

        node = self.node_class(*self.node_args, **self.node_kwargs)
        node.__item__ = self

        return node
449660
def get_class(cls, name_or_sl):
        """"""
        try:
            return cls.sl_map[int(name_or_sl)]

        except TypeError as e:
            raise TypeError("Bad name or sl: {} : {}".format(name_or_sl, e))
        except ValueError:
            try:
                return cls.class_map[name_or_sl.lower()]
            except (KeyError, ValueError):
                raise NotASummaryName("Value '{}' is not a valid summary level".format(name_or_sl))
1266159
def unindex_item(self, item):
        
        name_property = getattr(self.__class__, "name_property", None)
        if name_property is None:
            return
        name = getattr(item, name_property, None)
        if name is None:
            return
        self.name_to_item.pop(name, None)
178422
def get_array_items_description(item: Array) -> str:
    
    desc = ''
    if isinstance(item.items, list):
        # This means the type has a list of types where each position is
        # mapped to a different type.  Document what each type should be.
        desc = ''
        item_pos_template = (
            ' *Item {pos} must be*: {description}{enum}{ref}')
        for pos, item in enumerate(item.items):
            _enum = ''
            ref = ''
            if issubclass(item, Enum):
                _enum = ' Must be one of: `{}`'.format(item.enum)
                if item.case_insensitive:
                    _enum += ' (case-insensitive)'
                _enum += '.'
            elif issubclass(item, Object):
                ref = get_object_reference(item)

            desc += item_pos_template.format(
                pos=pos, description=item.description, enum=_enum,
                ref=ref)

    else:
        # Otherwise just document the type assigned to `items`.
        desc = item.items.description
        _enum = ''
        ref = ''
        if issubclass(item.items, Enum):
            _enum = ' Must be one of: `{}`'.format(
                item.items.enum)
            if item.items.case_insensitive:
                _enum += ' (case-insensitive)'
            _enum += '.'
        elif issubclass(item.items, Object):
            ref = get_object_reference(item.items)
        desc = '  *Items must be*: {description}{enum}{ref}'.format(
            description=desc, enum=_enum, ref=ref)
    return desc
820333
def classorder(self,classes):
        """"""
        return [ classid for classid, classitem in sorted( ((classid, classitem) for classid, classitem in classes.items() if 'seqnr' in classitem) , key=lambda pair: pair[1]['seqnr'] )] + \
               [ classid for classid, classitem in sorted( ((classid, classitem) for classid, classitem in classes.items() if 'seqnr' not in classitem) , key=lambda pair: pair[1]['label'] if 'label' in pair[1] else pair[1]['id']) ]
534063
def fieldnames(self):
        ''' 
        '''
        if not self._fields:
            if self._item_class is not None:
                for m in inspect.getmembers(self._item_class):
                    if m[0] == 'fields' and isinstance(m[1], dict):
                        self._fields = m[1]
                if not self._fields:
                    raise RuntimeError('Unknown item type, no fields: %s' % self._item_class)
            else:
                raise RuntimeError('Item class is not defined, %s' % self._item_class)
        return self._fields.keys()
1359626
def of(cls, part_class):
        
        copy = type(
            "VectorOf%s" % part_class.__name__,
            cls.__bases__, dict(cls.__dict__)
        )
        copy.item_class = part_class

        return copy
1338840
def get_item_name(self, item, parent):
        
        names = self.get_name_elements(item)
        if not names:
            raise MissingNameElementError

        name = names[0].text
        prefix = self.item_name_prefix(parent)
        if prefix:
            name = prefix + name

        return name
178318
def match(self, item):
        
        result = self._value == getattr(item, self._name)
        #log.debug("%r for %r = %r, name %r, item %r" % (
        #    result, getattr(item, self._name), self._value, self._name, item))
        return result