Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SMW\Exporter\DataItemToExpResourceEncoder Class Reference

Public Member Functions

 __construct (Store $store)
 
 reset ()
 
 setBCAuxiliaryUse ($bcAuxiliaryUse)
 
 resetCacheBy (DIWikiPage $subject)
 
 mapPropertyToResourceElement (DIProperty $property, $useAuxiliaryModifier=false, $seekImportVocabulary=true)
 
 mapWikiPageToResourceElement (DIWikiPage $diWikiPage, $useAuxiliaryModifier=false)
 

Public Attributes

const AUX_MARKER = 'aux'
 

Detailed Description

GNU GPL v2+

Since
2.2
Author
mwjames
Markus Krötzsch

Constructor & Destructor Documentation

SMW\Exporter\DataItemToExpResourceEncoder::__construct ( Store  $store)
Since
2.2
Parameters
Store$store

Member Function Documentation

SMW\Exporter\DataItemToExpResourceEncoder::mapPropertyToResourceElement ( DIProperty  $property,
  $useAuxiliaryModifier = false,
  $seekImportVocabulary = true 
)

Create an ExpElement for some internal resource, given by an DIProperty object.

This code is only applied to user-defined properties, since the code for special properties in Exporter::getSpecialPropertyResource may require information about the namespace in which some special property is used.

Note
$useAuxiliaryModifier is to determine whether an auxiliary property resource is to store a helper value (see Exporter::getDataItemHelperExpElement) should be generated
Parameters
DIProperty$property
boolean$useAuxiliaryModifier
boolean$seekImportVocabulary
Returns
ExpResource
Exceptions
RuntimeException
SMW\Exporter\DataItemToExpResourceEncoder::mapWikiPageToResourceElement ( DIWikiPage  $diWikiPage,
  $useAuxiliaryModifier = false 
)

Create an ExpElement for some internal resource, given by an DIWikiPage object. This is the one place in the code where URIs of wiki pages and user-defined properties are determined. A modifier can be given to make variants of a URI, typically done for auxiliary properties. In this case, the URI is modiied by appending "-23$modifier" where "-23" is the URI encoding of "#" (a symbol not occuring in MW titles).

Parameters
DIWikiPage$diWikiPage
boolean$useAuxiliaryModifier
Returns
ExpResource
SMW\Exporter\DataItemToExpResourceEncoder::reset ( )
Since
2.3
SMW\Exporter\DataItemToExpResourceEncoder::resetCacheBy ( DIWikiPage  $subject)
Since
2.2
Parameters
DIWikiPage$subject
SMW\Exporter\DataItemToExpResourceEncoder::setBCAuxiliaryUse (   $bcAuxiliaryUse)
Since
2.2
Parameters
boolean$bcAuxiliaryUse

Member Data Documentation

const SMW\Exporter\DataItemToExpResourceEncoder::AUX_MARKER = 'aux'

Identifies auxiliary data (helper values)


The documentation for this class was generated from the following file: