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

Public Member Functions

 __construct (Store $store, Cache $cache)
 
 registerPropertyChangeListener (PropertyChangeListener $changeListener)
 
 invalidateCache (DIProperty $property)
 
 setSubcategoryDepth ( $subcategoryDepth)
 
 setSubpropertyDepth ( $subpropertyDepth)
 
 hasSubproperty (DIProperty $property)
 
 hasSubcategory (DIWikiPage $category)
 
 findSubpropertyList (DIProperty $property)
 
 findSubcategoryList (DIWikiPage $category)
 
 findNearbySuperCategories (DIWikiPage $category)
 
 getConsecutiveHierarchyList ( $id, $hierarchyType=self::TYPE_SUB)
 

Public Attributes

const CACHE_NAMESPACE = 'smw:hierarchy'
 
const TYPE_PROPERTY = 'type/property'
 
const TYPE_CATEGORY = 'type/category'
 
const TYPE_SUPER = 'type/super'
 
const TYPE_SUB = 'type/sub'
 

Detailed Description

GNU GPL v2+

Since
2.3
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\HierarchyLookup::__construct ( Store  $store,
Cache  $cache 
)
Since
2.3
Parameters
Store$store
Cache$cache

Member Function Documentation

◆ findNearbySuperCategories()

SMW\HierarchyLookup::findNearbySuperCategories ( DIWikiPage  $category)
Since
3.1
Parameters
DIWikiPage$category
Returns
DIWikiPage[]|[]

◆ findSubcategoryList()

SMW\HierarchyLookup::findSubcategoryList ( DIWikiPage  $category)
Since
2.3
Parameters
DIWikiPage$category
Returns
DIWikiPage[]|[]

◆ findSubpropertyList()

SMW\HierarchyLookup::findSubpropertyList ( DIProperty  $property)
Since
2.3
Parameters
DIProperty$property
Returns
DIWikiPage[]|[]

◆ getConsecutiveHierarchyList()

SMW\HierarchyLookup::getConsecutiveHierarchyList (   $id,
  $hierarchyType = self::TYPE_SUB 
)
Since
3.0
Parameters
DIProperty | DIWikiPage$id
Returns
DIProperty[]|DIWikiPage[]|[]

◆ hasSubcategory()

SMW\HierarchyLookup::hasSubcategory ( DIWikiPage  $category)
Since
2.3
Parameters
DIWikiPage$category
Returns
boolean

◆ hasSubproperty()

SMW\HierarchyLookup::hasSubproperty ( DIProperty  $property)
Since
2.3
Parameters
DIProperty$property
Returns
boolean

◆ invalidateCache()

SMW\HierarchyLookup::invalidateCache ( DIProperty  $property)

Remove the global hierarchy cache in the event that some entity was annotated (or removed) with the Subproperty of/ Subcategory of property, and while this purges the entire cache we ensure that the hierarchy lookup is always correct without loosing too much sleep over a more fine-grained caching strategy.

Since
3.2
Parameters
DIProperty$property

◆ registerPropertyChangeListener()

SMW\HierarchyLookup::registerPropertyChangeListener ( PropertyChangeListener  $changeListener)
Since
3.0
Parameters
PropertyChangeListener$changeListener

◆ setSubcategoryDepth()

SMW\HierarchyLookup::setSubcategoryDepth (   $subcategoryDepth)
Since
2.3
Parameters
integer$subcategoryDepth

◆ setSubpropertyDepth()

SMW\HierarchyLookup::setSubpropertyDepth (   $subpropertyDepth)
Since
2.3
Parameters
integer$subpropertyDepth

Member Data Documentation

◆ CACHE_NAMESPACE

const SMW\HierarchyLookup::CACHE_NAMESPACE = 'smw:hierarchy'

Persistent cache namespace

◆ TYPE_PROPERTY

const SMW\HierarchyLookup::TYPE_PROPERTY = 'type/property'

Consecutive hierarchy types

◆ TYPE_SUPER

const SMW\HierarchyLookup::TYPE_SUPER = 'type/super'

Consecutive hierarchy direction


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

About | General disclaimer | Privacy policy