Class: N3Parser ---------------------------------------------------------------------------------- |
PHP | applyStuff(array $prefixes, array $list) |
---|
Applies stuff :) Expands namespace prefixes etc.
Arguments
PHP | doLists(array $list, string $schar, string $echar) |
---|
Makes lists of elements in list into a seperate array element. e.g. doLists(["a","b","[","c","]","d"], "[","]")=> ["a","b", ["c"], "d"]
Arguments
PHP | object generateModel(unknown $path, boolean $dummy, boolean $model) |
---|
Generate a new MemModel from an URI or file.
Arguments
Return
MemModel
PHP | getObjs(array $list) |
---|
Gets a list of triples with same predicate e.g. :Gunnar :likes "Cheese", "Wine".
Arguments
PHP | getPovs(array $list) |
---|
Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
Arguments
PHP | array getSpan(array $list, integer $start, integer $end) |
---|
Gets a slice of an array. Returns the wanted slice, as well as the remainder of the array. e.g. getSpan(['p', 'q', 'r'], 1, 2) gives (['q'], ['p', 'r'])
Arguments
PHP | getStatements(array $list) |
---|
Returns an array of triples extracted from the list of n3 tokens
Arguments
PHP | isWS(string $s) |
---|
==================== Private Methods from here ==================== General list processing functions
Returns FALSE if argument is a whitespace characterArguments
PHP | listify(array $list, integer $start, integer $end) |
---|
Returns a list with the elements between start and end as one quoted string e.g. listify(["a","b","c","d"],1,2) => ["a","b c", "d"]
Arguments
PHP | n3tolist(string $s) |
---|
Main work-horse function. This converts a N3 string to a list of statements
Arguments
PHP | object parse2model(string $s, boolean $model) |
---|
This parses a N3 string and returns a memmodel
Arguments
Return
Model
PHP | posns(array $list, string $item) |
---|
Returns an array with all indexes where item appears in list
Arguments
PHP | replace_a_type(string $l, unknown $p) |
---|
Callback function for replacing "a" elements with the right RDF uri.
Arguments
PHP | replace_equal(string $l, unknown $p) |
---|
Callback function for replacing "=" elements with the right DAML+OIL uri.
Arguments
PHP | replace_this(string $l, unknown $p) |
---|
Callback function for replacing "this" elements with the right RDF uri.
Arguments
PHP | setFixBnodes(unknown $set) |
---|
Sets, if BlankNode labels should be replaced by the generic label from the constants.php file default is "false" -> the used label in n3 is parsed to the model
Arguments
PHP | statementize(array $list) |
---|
Does the real work, returns a list of subject, predicate, object triples.
Arguments
PHP | string str2unicode_nfc(string $str) |
---|
converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH).
Arguments
PHP | toRDFNode(string $s, unknown $state) |
---|
Constructs a RAP RDFNode from URI/Literal/Bnode
Arguments
PHP | trimLine(unknown $l, unknown $i) |
---|
Callback function for trimming whitespace from lines
Arguments
PHP | uparse(string $s, string $func) |
---|
This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
Arguments