end init 
Returns a <a href="http://n2.talis.com/wiki/RDF_JSON_Specification">RDF/JSON</a> representation of this blank node.
@returns {Object}
359687
function () {
      var e = {
        type: 'literal',
        value: this.value.toString()
      };
      if (this.lang !== undefined) {
        e.lang = this.lang;
      } else if (this.datatype !== undefined) {
        e.datatype = this.datatype.toString();
      }
      return e;
    }
1197874
public JsonNode getDataAttrs() {
        Lock lock = lockForRead();
        try {
            if (dataJson == null || dataJson instanceof NullNode
                    || dataJson instanceof MissingNode) {
                return null;
            }
            return dataJson.deepCopy();
        } finally {
            lock.unlock();
        }
    }
490193
function getInitialState() {
  if (!window.localStorage) {
    return undefined;
  }

  const storedState = window.localStorage.getItem(storeKey);

  if (!storedState) {
    return undefined;
  }

  const normalisedState = storedState.replace(new RegExp('"isFetching":true', 'g'), '"isFetching":false');
  return JSON.parse(normalisedState);
}
1243692
function () {
                // Simple things first
                if(this._from.substr(this._at, 4) === 'null') {
                    this._at += 4;
                    return null;
                } else if(this._from.substr(this._at, 9) === 'undefined') {
                    this._at += 9;
                    return undefined;
                } else if(this._from.substr(this._at, 4) === 'true') {
                    this._at += 4;
                    return true;
                } else if(this._from.substr(this._at, 5) === 'false') {
                    this._at += 5;
                    return false;
                } else if(this._from.substr(this._at, 3) === 'NaN') {
                    this._at += 3;
                    return NaN;
                } else if(this._from.substr(this._at, 8) === 'Infinity') {
                    this._at += 8;
                    return Infinity;
                } else if(this._from.substr(this._at, 9) === '-Infinity') {
                    this._at += 9;
                    return -Infinity;
                }
                // JSON escaped string?
                if(this._from.charAt(this._at) === '"') {
                    var end = this._at + 1;
                    while(end < this._from.length) {
                        if(this._from.charAt(end) === '\\') {
                            end += 1;
                        } else if(this._from.charAt(end) === '"') {
                            break;
                        }
                        end += 1;
                    }
                    if(end < this._from.length) {
                        var s = this._from.substr(this._at, end - this._at + 1);
                        this._at = end + 1;
                        return JSON.parse(s);
                    }
                }
                // Reference?
                if(this._from.charAt(this._at) === '<' && this._from.charAt(this._at + 1 + shared.utils.uidStringLength) === '>') {
                    var id = this._from.substr(this._at + 1, shared.utils.uidStringLength);
                    this._at += (2 + shared.utils.uidStringLength);
                    return new Reference(shared.utils.makeUID(id));
                }
                // Maybe a number
                var l = this.numberLength();
                if(l) {
                    var n = parseFloat(this._from.substr(this._at));
                    shared.utils.dassert(!isNaN(n));
                    this._at += l;
                    return n;
                }
                shared.utils.defaultLogger().fatal('Unexpected value encoding: %s', this._from.substr(this._at));
            }
299689
function(){
            return {
                request: this.request.toJSON(),
                response: this.response.toJSON(),
                app: this.app.toJSON(),
                originalUrl: this.originalUrl,
                req: '<original node req>',
                res: '<original node res>',
                socket: '<original node socket>',
            };
        }
415273
function () {
		var str, i, len;

		// TODO void tags
		str = '' +
			'<' + this.descriptor.e;

		len = this.attributes.length;
		for ( i=0; i<len; i+=1 ) {
			str += ' ' + this.attributes[i].toString();
		}

		str += '>';

		if ( this.html ) {
			str += this.html;
		} else if ( this.fragment ) {
			str += this.fragment.toString();
		}

		str += '</' + this.descriptor.e + '>';

		return str;
	}
1044600
function () {
      var c = this.nextChar();

      if (c === undefined)
        return null;

      // Read any text as Text node
      if (c !== "<") {
        --this.currentChar;
        var textNode = new Text();
        var n = this.html.indexOf("<", this.currentChar);
        if (n === -1) {
          textNode.innerHTML = this.html.substring(this.currentChar, this.html.length);
          this.currentChar = this.html.length;
        } else {
          textNode.innerHTML = this.html.substring(this.currentChar, n);
          this.currentChar = n;
        }
        return textNode;
      }

      c = this.peekNext();

      // Read Comment node. Normally, Comment nodes know their inner
      // textContent, but we don't really care about Comment nodes (we throw
      // them away in readChildren()). So just returning an empty Comment node
      // here is sufficient.
      if (c === "!" || c === "?") {
        // We're still before the ! or ? that is starting this comment:
        this.currentChar++;
        return this.discardNextComment();
      }

      // If we're reading a closing tag, return null. This means we've reached
      // the end of this set of child nodes.
      if (c === "/") {
        --this.currentChar;
        return null;
      }

      // Otherwise, we're looking at an Element node
      var result = this.makeElementNode(this.retPair);
      if (!result)
        return null;

      var node = this.retPair[0];
      var closed = this.retPair[1];
      var localName = node.localName;

      // If this isn't a void Element, read its child nodes
      if (!closed) {
        this.readChildren(node);
        var closingTag = "</" + localName + ">";
        if (!this.match(closingTag)) {
          this.error("expected '" + closingTag + "' and got " + this.html.substr(this.currentChar, closingTag.length));
          return null;
        }
      }

      // Only use the first title, because SVG might have other
      // title elements which we don't care about (medium.com
      // does this, at least).
      if (localName === "title" && !this.doc.title) {
        this.doc.title = node.textContent.trim();
      } else if (localName === "head") {
        this.doc.head = node;
      } else if (localName === "body") {
        this.doc.body = node;
      } else if (localName === "html") {
        this.doc.documentElement = node;
      }

      return node;
    }
415029
public Document toXML()
	{
		Element sparql = new Element("sparql");
		sparql.setNamespace(Namespace.getNamespace("http://www.w3.org/2005/sparql-results#"));
		
		// generate head
		Element head = new Element("head");
		if(!bindings.isEmpty()) {
			QueryBinding top = bindings.get(0);
			for(QueryArgument arg : top.getBoundArgs()) {
				if(arg.isVar()) {
					Element var = new Element("variable");
					var.setAttribute("name", arg.getValueAsString());
					head.addContent(var);
				}
			}
		}
		sparql.addContent(head);
		
		if(query.isAsk()) {
			Element booleanElement = new Element("boolean");
			if(ask) {
				booleanElement.setText("true");
			}
			else {
				booleanElement.setText("false");
			}
			sparql.addContent(booleanElement);
		}
		else {
			// otherwise generate results
			Element results = new Element("results");
			for(QueryBinding binding : bindings) {
				Element result = new Element("result");
				for(QueryArgument key : binding.getBoundArgs()) {
					if(key.isVar()) {
						Element b = new Element("binding");
						b.setAttribute("name", key.getValueAsString());
						QueryArgument value = binding.get(key);
						switch(value.getType()) {
						case URI:
							Element uri = new Element("uri");
							uri.setText(value.getValueAsIRI().toString());
							b.addContent(uri);
							break;
						case LITERAL:
							Element literal = new Element("literal");
							literal.setText(value.getValueAsLiteral().getLiteral());
							b.addContent(literal);
							break;
						case BNODE:
							Element bnode = new Element("bnode");
							bnode.setText(value.getValueAsBNode().getID().toString());
							b.addContent(bnode);
							break;
						default:
						}
						result.addContent(b);
					}
				}
				results.addContent(result);
			}
			sparql.addContent(results);
		}
		
		return new Document(sparql);
	}
182684
def initialize_name
      return nil unless valid_rdf_subject?
      query_params = { :rows => 1,
                       :q => rdf_subject,
                       :qf => 'provider_id',
                       :fl => 'provider_name provider_id' }
      response = Krikri::SolrResponseBuilder.new(query_params).response
      return nil unless response.docs.count > 0
      response.docs.first['provider_name'].respond_to?(:first) ?
        response.docs.first['provider_name'].first : rdf_subject
    end
1135183
function Node(cfg) {

  this.namespace     = cfg.namespace || null;
  this.text          = cfg.text;
  this._selfCloseTag = cfg.selfCloseTag;


  Object.defineProperties(this, {
    nodeType: {
      value: cfg.nodeType
    },
    nodeName: {
      value: cfg.nodeType == 1 ? cfg.nodeName : '#text'
    },
    childNodes: {
      value: cfg.childNodes
    },
    firstChild: {
      get: function(){
        return this.childNodes[0] || null;
      }
    },
    lastChild: {
      get: function(){
        return this.childNodes[this.childNodes.length-1] || null;
      }
    },
    parentNode: {
      value: cfg.parentNode || null
    },
    attributes: {
      value: cfg.attributes || []
    },
    innerHTML: {
      get: function(){
        var
          result = '',
          cNode;
        for (var i = 0, l = this.childNodes.length; i < l; i++) {
          cNode = this.childNodes[i];
          result += cNode.nodeType === 3 ? cNode.text : cNode.outerHTML;
        }
        return result;
      }
    },
    outerHTML: {
      get: function(){
        if (this.nodeType != 3){
          var
            str,
            attrs = (this.attributes.map(function(elem){
              return elem.name + (elem.value ? '=' + '"'+ elem.value +'"' : '');
            }) || []).join(' '),
            childs = '';

          str = '<' + this.nodeName + (attrs ? ' ' + attrs : '') + (this._selfCloseTag ? '/' : '') + '>';

          if (!this._selfCloseTag){
            childs = (this._selfCloseTag ? '' : this.childNodes.map(function(child){
              return child.outerHTML;
            }) || []).join('');

            str += childs;
            str += '</' + this.nodeName + '>';
          }
        }
        else{
          str = this.textContent;
        }
        return str;
      }
    },
    textContent: {
      get: function(){
        if (this.nodeType == Node.TEXT_NODE){
          return this.text;
        }
        else{
          return this.childNodes.map(function(node){
            return node.textContent;
          }).join('').replace(/\x20+/g, ' ');
        }
      }
    }
  });
}
501828
function initContentStructureTree( $rootNodeID, $fetchHidden, $classFilter = false )
    {
        // create initial subtree with root node and empty children.
        $nodes = false;
        $rootTreeNode = eZContentObjectTreeNode::fetch( $rootNodeID );
        if ( $rootTreeNode && $rootTreeNode->canRead() )
        {
            if ( !$fetchHidden && ( $rootTreeNode->attribute( 'is_hidden' ) || $rootTreeNode->attribute( 'is_invisible' ) ) )
            {
                return false;
            }
            else
            {
                $contentObject = $rootTreeNode->attribute( 'object' );

                $viewNodeAllowed = true;
                if ( is_array( $classFilter ) && count( $classFilter ) > 0 )
                {
                    $contentClassIdentifier = $contentObject->attribute( 'class_identifier' );

                    if ( !in_array( $contentClassIdentifier, $classFilter ) )
                        $viewNodeAllowed = false;
                }

                if ( $viewNodeAllowed )
                {
                    $rootNode = array( 'node' => array( 'node_id' => $rootTreeNode->attribute( 'node_id' ),
                                                        'path_identification_string' => $rootTreeNode->pathWithNames(),
                                                        'children_count' => $rootTreeNode->attribute( 'children_count' ),
                                                        'sort_array' => $rootTreeNode->attribute( 'sort_array' ),
                                                        'path_string' => $rootTreeNode->attribute( 'path_string' ),
                                                        'depth' => $rootTreeNode->attribute( 'depth' ),
                                                        'is_hidden' => $rootTreeNode->attribute( 'is_hidden' ),
                                                        'is_invisible' => $rootTreeNode->attribute( 'is_invisible' ) ),
                                                        'classes_js_array' => eZContentObjectTreeNode::availableClassListJsArray( array( 'node' => &$rootTreeNode ) ),
                                       'object' => array( 'id' => $contentObject->attribute( 'id' ),
                                                          'name' => $contentObject->attribute( 'name' ),
                                                          'class_identifier' => $contentObject->attribute( 'class_identifier' ),
                                                          'class_name' => $contentObject->attribute('class_name'),
                                                          'published' => $contentObject->attribute( 'published' ),
                                                          'is_container' => true,
                                                          'language_js_array' => eZContentLanguage::jsArrayByMask( $contentObject->attribute( 'language_mask' ) ) ) );

                    $nodes = array( 'parent_node' => &$rootNode,
                                    'children' => array() );
                }
            }
        }

        return $nodes;
    }
239977
def parse_init_data
      @init_data ||= {}
      # set empty strings to nil
      @init_data.jss_nillify! '', :recurse

      # Find the "main" subset which contains :id and :name
      @main_subset = find_main_subset
      @name = @main_subset[:name]

      if @main_subset[:id] == :new
        @id = 0
        @in_jss = false
      else
        @id = @main_subset[:id].to_i
        @in_jss = true
      end

      @rest_rsrc = "#{self.class::RSRC_BASE}/id/#{@id}"

      # many things have  a :site
      # TODO: Implement a Sitable mixin module
      #
      # @site = JSS::APIObject.get_name(@main_subset[:site]) if @main_subset[:site]

      ##### Handle Mix-ins
      initialize_category
      initialize_site
      initialize_location
      initialize_purchasing
      initialize_scope
      initialize_criteria
      initialize_ext_attrs
      initialize_vpp
      initialize_self_service
    end
772771
function(node) {
    var doc = '';
    var sibling = node.firstChild;
    var serializer = new XMLSerializer();

    while (sibling) {
      if (this.isElementNode(sibling)) {
        doc += serializer.serializeToString(sibling);
      }
      sibling = sibling.nextSibling;
    }

    return doc !== '' ? doc : null;
  }
465412
function() {
    var block = this.emptyBlock(0);

    while ('eos' != this.peek().type) {
      if ('newline' == this.peek().type) {
        this.advance();
      } else if ('text-html' == this.peek().type) {
        block.nodes = block.nodes.concat(this.parseTextHtml());
      } else {
        var expr = this.parseExpr();
        if (expr)
          block.nodes.push(expr);
        }
      }

    return block;
  }
1080318
function() {
        "use strict";
        var ret = "";
        if (this.json.length > 0) {
            if (this.json.length === 1) {
                ret = JSON.stringify(this.json[0]);
            } else {
                ret = JSON.stringify(this.json);
            }
        }
        return ret;
    }
1054108
@SuppressWarnings("unchecked")
	public JSONNavi<T> object() {
		if (failure)
			return this;
		if (current == null && readonly)
			failure("Can not create Object child in readonly", null);
		if (current != null) {
			if (isObject())
				return this;
			if (isArray())
				failure("can not use Object feature on Array.", null);
			failure("Can not use current possition as Object", null);
		} else {
			current = mapper.createObject();
		}
		if (root == null)
			root = (T) current;
		else
			store();
		return this;
	}
1285157
private JsonNode toJson(){
    	ObjectNode result = new ObjectNode(Topology.OBJECT_MAPPER.getNodeFactory());
        ArrayNode propertyArrayNode = new ArrayNode(Topology.OBJECT_MAPPER.getNodeFactory());
        for (PropertyColumn property : this.properties) {
            ObjectNode objectNode = property.toNotifyJson();
            objectNode.put("schemaName", property.getParentLabel().getSchema().getName());
            objectNode.put("abstractLabelLabel", property.getParentLabel().getLabel());
            propertyArrayNode.add(objectNode);
        }
        result.put("name", getName());
        result.set("properties", propertyArrayNode);
        return result;
    }