function createTranslatedTextViewer( $attribute ) {
	
	$o = OmegaWikiAttributes::getInstance();

	$result = createTableViewer( $attribute );
	$result->addEditor( createLanguageViewer( $o->language ) );
	$result->addEditor( createLongTextViewer( $o->text ) );
	
	return $result;
}
 function getExternalIdentifiersSearchResultEditor()
 {
     $editor = createTableViewer(null);
     $editor->addEditor(createShortTextViewer($this->externalIdentifierAttribute));
     $editor->addEditor(createDefinedMeaningReferenceViewer($this->collectionMemberAttribute));
     $editor->addEditor(createDefinedMeaningReferenceViewer($this->collectionAttribute));
     return $editor;
 }
function getSearchResultAsRecordSet( $queryResult ) {

	$o = OmegaWikiAttributes::getInstance();
	global
		$definedMeaningReferenceType,
		$wgDefinedMeaning;

	$dbr = wfGetDB( DB_SLAVE );
	$spellingAttribute = new Attribute( "found-word", "Found word", "short-text" );
	$languageAttribute = new Attribute( "language", "Language", "language" );
	
	$expressionStructure = new Structure( $spellingAttribute, $languageAttribute );
	$expressionAttribute = new Attribute( "expression", "Expression", $expressionStructure );
	
	$definedMeaningAttribute = new Attribute( $wgDefinedMeaning, "Defined meaning", $definedMeaningReferenceType );
	$definitionAttribute = new Attribute( "definition", "Definition", "definition" );
	
	$meaningStructure = new Structure( $definedMeaningAttribute, $definitionAttribute );
	$meaningAttribute = new Attribute( "meaning", "Meaning", $meaningStructure );

	$recordSet = new ArrayRecordSet( new Structure( $o->definedMeaningId, $expressionAttribute, $meaningAttribute ), new Structure( $o->definedMeaningId ) );
	
	while ( $row = $dbr->fetchObject( $queryResult ) ) {
		$expressionRecord = new ArrayRecord( $expressionStructure );
		$expressionRecord->setAttributeValue( $spellingAttribute, $row->spelling );
		$expressionRecord->setAttributeValue( $languageAttribute, $row->language_id );
		
		$meaningRecord = new ArrayRecord( $meaningStructure );
		$meaningRecord->setAttributeValue( $definedMeaningAttribute, getDefinedMeaningReferenceRecord( $row->defined_meaning_id ) );
		$meaningRecord->setAttributeValue( $definitionAttribute, getDefinedMeaningDefinition( $row->defined_meaning_id ) );

		$recordSet->addRecord( array( $row->defined_meaning_id, $expressionRecord, $meaningRecord ) );
	}

	$expressionEditor = new RecordTableCellEditor( $expressionAttribute );
	$expressionEditor->addEditor( new SpellingEditor( $spellingAttribute, new SimplePermissionController( false ), false ) );
	$expressionEditor->addEditor( new LanguageEditor( $languageAttribute, new SimplePermissionController( false ), false ) );

	$meaningEditor = new RecordTableCellEditor( $meaningAttribute );
	$meaningEditor->addEditor( new DefinedMeaningReferenceEditor( $definedMeaningAttribute, new SimplePermissionController( false ), false ) );
	$meaningEditor->addEditor( new TextEditor( $definitionAttribute, new SimplePermissionController( false ), false, true, 75 ) );

	$editor = createTableViewer( null );
	$editor->addEditor( $expressionEditor );
	$editor->addEditor( $meaningEditor );

	return array( $recordSet, $editor );
}
function getUpdatedClassAttributesEditor( $attribute, $showRollBackOptions ) {

	$o = OmegaWikiAttributes::getInstance();
		
	$editor = createTableViewer( $attribute );
	
	if ( $showRollBackOptions )
		$editor->addEditor( new RollbackEditor( $o->rollBack, false ) );
		
	$editor->addEditor( createDefinedMeaningReferenceViewer( $o->class ) );
	$editor->addEditor( createDefinedMeaningReferenceViewer( $o->level ) );
	$editor->addEditor( createDefinedMeaningReferenceViewer( $o->attribute ) );
	$editor->addEditor( createShortTextViewer( $o->type ) );
	$editor->addEditor( createShortTextViewer( $o->operation ) );
	$editor->addEditor( createBooleanViewer( $o->isLatest ) );
	
	return $editor;
}