public function getSearchDocumentSpecifications($storeName, $type=null, $justReturnSpecId=false)
    {

        if(!isset($this->searchDocSpecs[$storeName]) || empty($this->searchDocSpecs[$storeName]))
        {
            return [];
        }
        $specs = [];

        if(empty($type)){
            if($justReturnSpecId){
                $specIds = [];
                foreach($this->searchDocSpecs[$storeName] as $specId=>$spec){
                    $specIds[] = $specId;
                }
                return $specIds;
            } else {
                return $this->searchDocSpecs[$storeName];
            }
        }

        $labeller = $this->getLabeller();
        $typeAsUri = $labeller->uri_to_alias($type);
        $typeAsQName = $labeller->qname_to_alias($type);

        foreach ($this->searchDocSpecs[$storeName] as $spec)
        {
            if(is_array($spec[_ID_TYPE])){
                if(in_array($typeAsUri, $spec[_ID_TYPE]) || in_array($typeAsQName, $spec[_ID_TYPE])){
                    if($justReturnSpecId){
                        $specs[] = $spec[_ID_KEY];
                    } else {
                        $specs[] = $spec;
                    }
                }
            } else {
                if ($spec[_ID_TYPE]==$typeAsUri || $spec[_ID_TYPE]==$typeAsQName)
                {
                    if($justReturnSpecId){
                        $specs[] = $spec[_ID_KEY];
                    } else {
                        $specs[] = $spec;
                    }
                }
            }
        }
        return $specs;
    }
public function getSearchDocumentSpecifications($storeName, $type=null, $justReturnSpecId=false)
    {

        if(!isset($this->searchDocSpecs[$storeName]) || empty($this->searchDocSpecs[$storeName]))
        {
            return [];
        }
        $specs = [];

        if(empty($type)){
            if($justReturnSpecId){
                $specIds = [];
                foreach($this->searchDocSpecs[$storeName] as $specId=>$spec){
                    $specIds[] = $specId;
                }
                return $specIds;
            } else {
                return $this->searchDocSpecs[$storeName];
            }
        }

        $labeller = $this->getLabeller();
        $typeAsUri = $labeller->uri_to_alias($type);
        $typeAsQName = $labeller->qname_to_alias($type);

        foreach ($this->searchDocSpecs[$storeName] as $spec)
        {
            if(is_array($spec[_ID_TYPE])){
                if(in_array($typeAsUri, $spec[_ID_TYPE]) || in_array($typeAsQName, $spec[_ID_TYPE])){
                    if($justReturnSpecId){
                        $specs[] = $spec[_ID_KEY];
                    } else {
                        $specs[] = $spec;
                    }
                }
            } else {
                if ($spec[_ID_TYPE]==$typeAsUri || $spec[_ID_TYPE]==$typeAsQName)
                {
                    if($justReturnSpecId){
                        $specs[] = $spec[_ID_KEY];
                    } else {
                        $specs[] = $spec;
                    }
                }
            }
        }
        return $specs;
    }
public function getSearchDocumentSpecifications ( $ storeName , $ type = null , $ justReturnSpecId = false ) { if ( ! isset ( $ this -> searchDocSpecs [ $ storeName ] ) || empty ( $ this -> searchDocSpecs [ $ storeName ] ) ) { return [ ] ; } $ specs = [ ] ; if ( empty ( $ type ) ) { if ( $ justReturnSpecId ) { $ specIds = [ ] ; foreach ( $ this -> searchDocSpecs [ $ storeName ] as $ specId => $ spec ) { $ specIds [ ] = $ specId ; } return $ specIds ; } else { return $ this -> searchDocSpecs [ $ storeName ] ; } } $ labeller = $ this -> getLabeller ( ) ; $ typeAsUri = $ labeller -> uri_to_alias ( $ type ) ; $ typeAsQName = $ labeller -> qname_to_alias ( $ type ) ; foreach ( $ this -> searchDocSpecs [ $ storeName ] as $ spec ) { if ( is_array ( $ spec [ _ID_TYPE ] ) ) { if ( in_array ( $ typeAsUri , $ spec [ _ID_TYPE ] ) || in_array ( $ typeAsQName , $ spec [ _ID_TYPE ] ) ) { if ( $ justReturnSpecId ) { $ specs [ ] = $ spec [ _ID_KEY ] ; } else { $ specs [ ] = $ spec ; } } } else { if ( $ spec [ _ID_TYPE ] == $ typeAsUri || $ spec [ _ID_TYPE ] == $ typeAsQName ) { if ( $ justReturnSpecId ) { $ specs [ ] = $ spec [ _ID_KEY ] ; } else { $ specs [ ] = $ spec ; } } } } return $ specs ; }
Returns an array of all search document specifications, or specification ids

@param string $storeName
@param string|null $type When supplied, will only return search document specifications that are triggered by this rdf:type
@param bool $justReturnSpecId default is false. If true will only return an array of specification _id's, otherwise returns the array of specification documents
@return array
Returns an array of all search document specifications or specification ids