Class: RDF_N3_Parser
Source Location: /RDF_N3-0.2.0/RDF/N3/Parser.php
RDF_Object
|
--RDF_N3_Parser
PHP Notation3 Parser
Author(s):
- Sean B. Palmer <sean at mysterylights.com>, Gunnar AA. Grimnes <ggrimnes at csd.abdn.ac.uk>, Daniel Westphal <mail at d-westphal.de>
Version:
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
RDF_N3_Parser (Constructor) [line 54]
RDF_N3_Parser RDF_N3_Parser(
)
|
|
applyStuff [line 471]
$list applyStuff(
array
$prefixes, array
$list)
|
|
Applies stuff :) Expands namespace prefixes etc.
Parameters:
array_concat [line 314]
array array_concat(
array
$a, array
$b)
|
|
Concatenates two arrays
Parameters:
bnodeID [line 787]
doLists [line 726]
array 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"]
Parameters:
expandLists [line 823]
array expandLists(
array
$list)
|
|
This makes [ ] lists into bnodes.
Parameters:
filterWs [line 278]
void filterWs(
array
$list)
|
|
Removes all whitespace tokens from list
Parameters:
fixAnon [line 800]
array fixAnon(
array
$list)
|
|
This makes bNodes out of variables like _:a etc.
Parameters:
generateModel [line 212]
object Model_Memory &generateModel(
$path
$path)
|
|
Generate a new Model_Memory from an URI or file.
Parameters:
getObjs [line 603]
array getObjs(
array
$list)
|
|
* Gets a list of triples with same predicate e.g. :Gunnar :likes "Cheese", "Wine".
Parameters:
getPovs [line 579]
array getPovs(
array
$list)
|
|
Gets a list of triples with same subject e.g. :Gunnar :firstname "Gunnar" ; :lastname "Grimnes.
Parameters:
getPrefixes [line 401]
array getPrefixes(
array
$list)
|
|
Returns an array with prefixes=>namespace mappings
Parameters:
getSpan [line 295]
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'])
Parameters:
getStatements [line 549]
array getStatements(
array
$list)
|
|
Returns an array of triples extracted from the list of n3 tokens
Parameters:
isWS [line 235]
Returns FALSE if argument is a whitespace character
Parameters:
listify [line 379]
array 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"]
Parameters:
listStuff [line 772]
array listStuff(
array
$list)
|
|
Apply doLists for all different types of list.
Parameters:
n3tolist [line 849]
array n3tolist(
string
$s)
|
|
Main work-horse function. This converts a N3 string to a list of statements
Parameters:
notComment [line 262]
boolean notComment(
string
$s)
|
|
Returns true if the string is not a comment
Parameters:
parse [line 113]
This parses a N3 string and prints out the triples
Parameters:
parse2model [line 180]
object Model parse2model(
string
$s)
|
|
This parses a N3 string and prints out the triples
Parameters:
posns [line 328]
array posns(
array
$list, string
$item)
|
|
Returns an array with all indexes where item appears in list
Parameters:
replace_a_type [line 429]
void replace_a_type(
&$l,
$p, string
$l)
|
|
Callback function for replacing "a" elements with the right RDF uri.
Parameters:
replace_equal [line 442]
void replace_equal(
&$l,
$p, string
$l)
|
|
Callback function for replacing "=" elements with the right DAML+OIL uri.
Parameters:
replace_this [line 455]
void replace_this(
string
$l,
$p)
|
|
Callback function for replacing "this" elements with the right RDF uri.
Parameters:
setFixBnodes [line 100]
void setFixBnodes(
boolean
$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
Parameters:
statementize [line 651]
array statementize(
array
$list)
|
|
Does the real work, returns a list of subject, predicate, object triples.
Parameters:
toke [line 351]
Returns a list of tokens
Parameters:
toRDFNode [line 912]
object RDFNode toRDFNode(
string
$s,
$state)
|
|
Constructs a RAP RDFNode from URI/Literal/Bnode
Parameters:
trimLine [line 250]
void trimLine(
string
&$l,
$i)
|
|
Callback function for trimming whitespace from lines
Parameters:
uparse [line 146]
void uparse(
string
$s, string
$func)
|
|
This parses a N3 string and calls func($subject, $predicate, $object) with each trioke
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:39:51 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|