{
    "content": [
        {
            "type": "text",
            "text": "# RDF::Redland::Model (perldoc)\n\n## NAME\n\nRDF::Redland::Model - Redland RDF Model Class\n\n## SYNOPSIS\n\nuse RDF::Redland;\nmy $storage=new RDF::Redland::Storage(\"hashes\", \"test\", \"new='yes',hash-type='memory'\");\nmy $model=new RDF::Redland::Model($storage, \"\");\n...\nmy(@sources)=$model->targets($predicatenode, $objectnode);\n...\n\n## DESCRIPTION\n\nManipulate the RDF model.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONSTRUCTORS**\n- **METHODS**\n- **OLDER METHODS**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "RDF::Redland::Model",
        "section": "",
        "mode": "perldoc",
        "summary": "RDF::Redland::Model - Redland RDF Model Class",
        "synopsis": "use RDF::Redland;\nmy $storage=new RDF::Redland::Storage(\"hashes\", \"test\", \"new='yes',hash-type='memory'\");\nmy $model=new RDF::Redland::Model($storage, \"\");\n...\nmy(@sources)=$model->targets($predicatenode, $objectnode);\n...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CONSTRUCTORS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 106,
                "subsections": []
            },
            {
                "name": "OLDER METHODS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "RDF::Redland::Model - Redland RDF Model Class\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use RDF::Redland;\nmy $storage=new RDF::Redland::Storage(\"hashes\", \"test\", \"new='yes',hash-type='memory'\");\nmy $model=new RDF::Redland::Model($storage, \"\");\n...\n\nmy(@sources)=$model->targets($predicatenode, $objectnode);\n\n...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Manipulate the RDF model.\n",
                "subsections": []
            },
            "CONSTRUCTORS": {
                "content": "new STORAGE OPTIONSSTRING\nnewwithoptions STORAGE OPTIONSHASH\nCreate a new RDF::Redland::Model object using RDF::Redland::Storage object *STORAGE* with a\noptions. The options can be given either as a string in the first form as *OPTIONSSTRING*.\nThe options take the form key1='value1',key2='value2'. The quotes are required. In the\nsecond case *OPTIONSHASH* is a reference to a Perl hash of options.\n\nnewfrommodel MODEL\nCreate a new model from an existing RDF::Redland::Model *MODEL* (copy constructor).\n",
                "subsections": []
            },
            "METHODS": {
                "content": "size\nReturn the size of the model (number of statements).\n\nsync\nSynchronise the model to the underlying storage.\n\nadd SUBJECT PREDICATE OBJECT\nAdd a new statement to the model with *SUBJECT*, *PREDICATE* and *OBJECT*. These can be\nRDF::Redland::Node, RDF::Redland::URI or perl URI objects.\n\naddtypedliteralstatement SUBJECT PREDICATE STRING [XMLLANGUAGE [DATATYPE]]\nAdd a new statement to the model containing a typed literal string object *STRING* with\n(optional) XML language (xml:lang attribute) *XMLLANGUAGE* and (optional) datatype URI\n*DATATYPE*. *XMLLANGUAGE* or *DATATYPE* can either or both be set to undef.\n\naddstatement STATEMENT [CONTEXT] | NODE NODE NODE [CONTEXT]\nAdd RDF::Redland::Statement *STATEMENT* or the statement formed by *NODE NODE NODE* to the\nmodel. If the optional *CONTEXT* is given, associate it with that context. Any of *NODE* or\n*CONTEXT* can be a RDF::Redland::Node, RDF::Redland::URI or perl URI object.\n\naddstatements STREAM [CONTEXT]\nAdd the statements from the RDF::Redland::Stream *STREAM* to the model. If the optional\n*CONTEXT* is given, associate it with that context. *CONTEXT* can be a RDF::Redland::Node,\nRDF::Redland::URI or perl URI object.\n\nremovestatement STATEMENT [CONTEXT] | NODE NODE NODE [CONTEXT]\nRemove RDF::Redland::Statement *STATEMENT* or the statement formed by *NODE NODE NODE* from\nthe model. If the optional *CONTEXT* is given, remove only the statement stored with that\ncontext. Any of *NODE* or *CONTEXT* can be a RDF::Redland::Node, RDF::Redland::URI or perl\nURI object.\n\nremovecontextstatements CONTEXT\nRemove all RDF::Redland::Statement *STATEMENT*s from the model with the given *CONTEXT*\ncontext. *CONTEXT* can be a RDF::Redland::Node, RDF::Redland::URI or perl URI object.\n\ncontainsstatement STATEMENT\nReturn non 0 if the model contains RDF::Redland::Statement *STATEMENT*.\n\nasstream [CONTEXT]\nReturn a new RDF::Redland::Stream object seralising the entire model, or just those\nstatements with *CONTEXT*, as RDF::Redland::Statement objects. If given, *CONTEXT* can be a\nRDF::Redland::Node, RDF::Redland::URI or perl URI object.\n\nfindstatements STATEMENT [CONTEXT]\nFind all matching statements in the model matching partial RDF::Redland::Statement\n*STATEMENT* (any of the subject, predicate, object RDF::Redland::Node can be undef). If\n*CONTEXT* is given, finds statements only in that context.\n\nIn an array context, returns an array of the matching RDF::Redland::Statement objects. In a\nscalar context, returns the RDF::Redland::Stream object representing the results.\n\nsources ARC TARGET\nGet all source RDF::Redland::Node objects for a given arc *ARC*, target *TARGET*>\nRDF::Redland::Node objects as a list of RDF::Redland::Node objects.\n\narcs SOURCE TARGET\nGet all arc RDF::Redland::Node objects for a given source *SOURCE*, target *TARGET*\nRDF::Redland::Node objects as a list of RDF::Redland::Node objects.\n\ntargets SOURCE ARC\nGet all target RDF::Redland::Node objects for a given source *SOURCE*, arc *ARC*\nRDF::Redland::Node objects as a list of RDF::Redland::Node objects.\n\nsourcesiterator ARC TARGET\nGet all source RDF::Redland::Node objects for a given arc *ARC*, target *TARGET*\nRDF::Redland::Node objects as an RDF::Redland::Iterator or undef on failure.\n\narcsiterator SOURCE TARGET\nGet all arc RDF::Redland::Node objects for a given source *SOURCE*, target *TARGET*\nRDF::Redland::Node objects as an RDF::Redland::Iterator or undef on failure.\n\ntargetsiterator SOURCE ARC\nGet all target RDF::Redland::Node objects for a given source *SOURCE*, arc *ARC*\nRDF::Redland::Node objects as an RDF::Redland::Iterator or undef on failure.\n\nsource ARC TARGET\nGet one source RDF::Redland::Node object that matches a given arc *ARC*, target *TARGET*\nRDF::Redland::Node objects or undef if there is no match.\n\narc SOURCE TARGET\nGet one arc RDF::Redland::Node object that matches a given source *SOURCE*, target *TARGET*\nRDF::Redland::Node objects or undef if there is no match.\n\ntarget SOURCE ARC\nGet one target RDF::Redland::Node object that matches a given source *SOURCE*, arc *ARC*\nRDF::Redland::Node objects or undef if there is no match.\n\ncontexts\nGet all context RDF::Redland::Node objects in the model\n\nfeature URI [VALUE]\nGet/set a model feature. The feature is named via RDF::Redland::URI *URI* and the value is a\nRDF::Redland::Node. If *VALUE* is given, the feature is set to that value, otherwise the\ncurrent value is returned.\n\nqueryexecute QUERY\nExecute the *QUERY* RDF::Redland::Query against the model returning a result set\nRDF::Redland::QueryResults or undef on failure.\n\nload URI [SYNTAX-NAME [ MIME-TYPE [SYNTAX-URI [HANDLER ]]]\nLoad content from *URI* into the model, guessing the parser.\n\ntostring [BASE-URI [SYNTAX-NAME [ MIME-TYPE [SYNTAX-URI]]]\nSerialize the model to a syntax. If no serializer name is given, the default serializer\nRDF/XML is used.\n",
                "subsections": []
            },
            "OLDER METHODS": {
                "content": "serialise\nserialize\nReturn a new RDF::Redland::Stream object seralising the model as RDF::Redland::Statement\nobjects. Replaced by asstream to reduce confusion with the RDF::Redland::Serializer class.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "RDF::Redland::Storage, RDF::Redland::Node and RDF::Redland::Statement\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Dave Beckett - http://www.dajobe.org/\n",
                "subsections": []
            }
        }
    }
}