CWIS Developer Documentation

- Home
- Main Page
- Classes
- Files

- File List
- File Members

HumanMetadataField.php
Go to the documentation of this file.
1 <?PHP
2 #
3 # FILE: ItemFactory.php
4 #
5 # Part of the Collection Workflow Integration System (CWIS)
6 # Copyright 2013 Edward Almasy and Internet Scout Research Group
7 # http://scout.wisc.edu/cwis/
8 #
9
14 class HumanMetadataField
15 {
16
21 public function __construct(MetadataField $Field)
22 {
23 $this->Field = $Field;
24 }
25
30 public function Status()
31 {
32 switch ($this->Field->Status())
33 {
34 case MetadataSchema::MDFSTAT_OK:
35 return "OK";
36 case MetadataSchema::MDFSTAT_ERROR:
37 return "Error";
38 case MetadataSchema::MDFSTAT_DUPLICATENAME:
39 return "Duplicate field name";
40 case MetadataSchema::MDFSTAT_DUPLICATEDBCOLUMN:
41 return "Duplicate database column";
42 case MetadataSchema::MDFSTAT_FIELDDOESNOTEXIST:
43 return "Field does not exist";
44 case MetadataSchema::MDFSTAT_ILLEGALNAME:
45 return "Illegal field name";
46 case MetadataSchema::MDFSTAT_DUPLICATELABEL:
47 return "Duplicate label name";
48 case MetadataSchema::MDFSTAT_ILLEGALLABEL:
49 return "Illegal label name";
50 }
51
52 return $this->NotSetText;
53 }
54
59 public function Type()
60 {
61 return MetadataField::$FieldTypeDBEnums[$this->Field->Type()];
62 }
63
68 public function TypeAsName()
69 {
70 return $this->Field->TypeAsName();
71 }
72
77 public function GetDisplayName()
78 {
79 return $this->Field->GetDisplayName();
80 }
81
86 public function Name()
87 {
88 return $this->Field->Name();
89 }
90
95 public function Label()
96 {
97 return $this->GetValueCheckingLength($this->Field->Label());
98 }
99
104 public function GetAllowedConversionTypes()
105 {
106 $Value = $this->Field->GetAllowedConversionTypes();
107
108 return count($Value) ? implode(", ", $Value) : $this->NotSetText;
109 }
110
116 public function IsTempItem()
117 {
118 return $this->GetYesNo($this->Field->IsTempItem());
119 }
120
125 public function Id()
126 {
127 return $this->Field->Id();
128 }
129
134 public function DBFieldName()
135 {
136 return $this->Field->DBFieldName();
137 }
138
143 public function Description()
144 {
145 # for our purposes, HTML code and some whitespace are not human-readable
146 $Value = strip_tags($this->Field->Description());
147 $Value = trim(str_replace(array("\r", "\n", "\t"), " ", $Value));
148 $Value = preg_replace('/ +/', " ", $Value);
149
150 return $this->GetValueCheckingLength($Value);
151 }
152
157 public function Instructions()
158 {
159 # for our purposes, HTML code and some whitespace are not human-readable
160 $Value = strip_tags($this->Field->Instructions());
161 $Value = trim(str_replace(array("\r", "\n", "\t"), " ", $Value));
162 $Value = preg_replace('/ +/', " ", $Value);
163
164 return $this->GetValueCheckingLength($Value);
165 }
166
171 public function Owner()
172 {
173 return $this->GetValueCheckingLength($this->Field->Owner());
174 }
175
181 public function RequiredBySPT()
182 {
183 return $this->GetYesNo($this->Field->RequiredBySPT());
184 }
185
190 public function Enabled()
191 {
192 return $this->GetYesNo($this->Field->Enabled());
193 }
194
199 public function Optional()
200 {
201 return $this->GetYesNo($this->Field->Optional());
202 }
203
208 public function Editable()
209 {
210 return $this->GetYesNo($this->Field->Editable());
211 }
212
217 public function Viewable()
218 {
219 return $this->GetYesNo($this->Field->Viewable());
220 }
221
228 public function AllowMultiple()
229 {
230 return $this->GetYesNo($this->Field->AllowMultiple());
231 }
232
239 public function IncludeInKeywordSearch()
240 {
241 return $this->GetYesNo($this->Field->IncludeInKeywordSearch());
242 }
243
250 public function IncludeInAdvancedSearch()
251 {
252 return $this->GetYesNo($this->Field->IncludeInAdvancedSearch());
253 }
254
261 public function IncludeInFacetedSearch()
262 {
263 return $this->GetYesNo($this->Field->IncludeInFacetedSearch());
264 }
265
272 public function IncludeInSortOptions()
273 {
274 return $this->GetYesNo($this->Field->IncludeInSortOptions());
275 }
276
283 public function IncludeInRecommender()
284 {
285 return $this->GetYesNo($this->Field->IncludeInRecommender());
286 }
287
292 public function TextFieldSize()
293 {
294 return $this->GetValueCheckingLength($this->Field->TextFieldSize());
295 }
296
301 public function MaxLength()
302 {
303 return $this->GetValueCheckingLength($this->Field->MaxLength());
304 }
305
310 public function ParagraphRows()
311 {
312 return $this->GetValueCheckingLength($this->Field->ParagraphRows());
313 }
314
319 public function ParagraphCols()
320 {
321 return $this->GetValueCheckingLength($this->Field->ParagraphCols());
322 }
323
328 public function MinValue()
329 {
330 return $this->GetValueCheckingLength($this->Field->MinValue());
331 }
332
337 public function MaxValue()
338 {
339 return $this->GetValueCheckingLength($this->Field->MaxValue());
340 }
341
346 public function FlagOnLabel()
347 {
348 return $this->GetValueCheckingLength($this->Field->FlagOnLabel());
349 }
350
355 public function FlagOffLabel()
356 {
357 return $this->GetValueCheckingLength($this->Field->FlagOffLabel());
358 }
359
364 public function DateFormat()
365 {
366 return $this->GetValueCheckingLength($this->Field->DateFormat());
367 }
368
373 public function SearchWeight()
374 {
375 return $this->GetValueCheckingLength($this->Field->SearchWeight());
376 }
377
382 public function RecommenderWeight()
383 {
384 return $this->GetValueCheckingLength($this->Field->RecommenderWeight());
385 }
386
391 public function MaxHeight()
392 {
393 return $this->GetValueCheckingLength($this->Field->MaxHeight());
394 }
395
400 public function MaxWidth()
401 {
402 return $this->GetValueCheckingLength($this->Field->MaxWidth());
403 }
404
410 public function MaxPreviewHeight()
411 {
412 return $this->GetValueCheckingLength($this->Field->MaxPreviewHeight());
413 }
414
420 public function MaxPreviewWidth()
421 {
422 return $this->GetValueCheckingLength($this->Field->MaxPreviewWidth());
423 }
424
431 public function MaxThumbnailHeight()
432 {
433 return $this->GetValueCheckingLength($this->Field->MaxThumbnailHeight());
434 }
435
441 public function MaxThumbnailWidth()
442 {
443 return $this->GetValueCheckingLength($this->Field->MaxThumbnailWidth());
444 }
445
451 public function DefaultAltText()
452 {
453 return $this->GetValueCheckingLength($this->Field->DefaultAltText());
454 }
455
461 public function UsesQualifiers()
462 {
463 return $this->GetYesNo($this->Field->UsesQualifiers());
464 }
465
472 public function ShowQualifiers()
473 {
474 return $this->GetYesNo($this->Field->ShowQualifiers());
475 }
476
481 public function DefaultQualifier()
482 {
483 $DefaultQualifier = $this->Field->DefaultQualifier();
484
485 if ($DefaultQualifier > 0)
486 {
487 $Qualifier = new Qualifier($DefaultQualifier);
488
489 return $Qualifier->Name();
490 }
491
492 return $this->NotSetText;
493 }
494
500 public function AllowHTML()
501 {
502 return $this->GetYesNo($this->Field->AllowHTML());
503 }
504
511 public function UseWysiwygEditor()
512 {
513 return $this->GetYesNo($this->Field->UseWysiwygEditor());
514 }
515
522 public function UseForOaiSets()
523 {
524 return $this->GetYesNo($this->Field->UseForOaiSets());
525 }
526
532 public function NumAjaxResults()
533 {
534 return $this->Field->NumAjaxResults();
535 }
536
541 public function ViewingPrivilege()
542 {
543 $Value = $this->MapPrivilege($this->Field->ViewingPrivilege());
544
545 return $this->GetValueCheckingLength($Value);
546 }
547
552 public function AuthoringPrivilege()
553 {
554 $Value = $this->MapPrivilege($this->Field->AuthoringPrivilege());
555
556 return $this->GetValueCheckingLength($Value);
557 }
558
563 public function EditingPrivilege()
564 {
565 $Value = $this->MapPrivilege($this->Field->EditingPrivilege());
566
567 return $this->GetValueCheckingLength($Value);
568 }
569
574 public function ImagePreviewPrivilege()
575 {
576 $Value = $this->MapPrivilege($this->Field->ImagePreviewPrivilege());
577
578 return $this->GetValueCheckingLength($Value);
579 }
580
585 public function TreeBrowsingPrivilege()
586 {
587 $Value = $this->MapPrivilege($this->Field->TreeBrowsingPrivilege());
588
589 return $this->GetValueCheckingLength($Value);
590 }
591
598 public function EnableOnOwnerReturn()
599 {
600 return $this->GetYesNo($this->Field->EnableOnOwnerReturn());
601 }
602
607 public function ViewingUserIsValue()
608 {
609 $Value = $this->MapUserIsValue($this->Field->ViewingUserIsValue());
610
611 return $this->GetValueCheckingLength($Value);
612 }
613
618 public function AuthoringUserIsValue()
619 {
620 $Value = $this->MapUserIsValue($this->Field->AuthoringUserIsValue());
621
622 return $this->GetValueCheckingLength($Value);
623 }
624
629 public function EditingUserIsValue()
630 {
631 $Value = $this->MapUserIsValue($this->Field->EditingUserIsValue());
632
633 return $this->GetValueCheckingLength($Value);
634 }
635
640 public function ViewingUserValue()
641 {
642 $Value = $this->MapUserValue($this->Field->ViewingUserValue());
643
644 return $this->GetValueCheckingLength($Value);
645 }
646
651 public function AuthoringUserValue()
652 {
653 $Value = $this->MapUserValue($this->Field->AuthoringUserValue());
654
655 return $this->GetValueCheckingLength($Value);
656 }
657
662 public function EditingUserValue()
663 {
664 $Value = $this->MapUserValue($this->Field->EditingUserValue());
665
666 return $this->GetValueCheckingLength($Value);
667 }
668
673 public function UserPrivilegeRestrictions()
674 {
675 $Value = $this->Field->UserPrivilegeRestrictions();
676 $Values = array();
677
678 # need to map each privilege ID to its text
679 foreach ($Value as $Id)
680 {
681 $Values[] = $this->MapPrivilege($Id);
682 }
683
684 return count($Values) ? implode(", ", $Values) : $this->NotSetText;
685 }
686
691 public function PointPrecision()
692 {
693 return $this->GetValueCheckingLength($this->Field->PointPrecision());
694 }
695
700 public function PointDecimalDigits()
701 {
702 return $this->GetValueCheckingLength($this->Field->PointDecimalDigits());
703 }
704
709 public function DefaultValue()
710 {
711 $Type = $this->Field->Type();
712 $Value = $this->Field->DefaultValue();
713
714 if ($Type == MetadataSchema::MDFTYPE_POINT)
715 {
716 $XText = NULL;
717 $X = $Value["X"];
718 $Y = $Value["Y"];
719
720 if (strlen($X))
721 {
722 $XText = "X: " . $X;
723 }
724
725 if (strlen($Y))
726 {
727 return (strlen($XText) ? $XText . ", " : "") . "Y: " . $Y;
728 }
729
730 return $this->NotSetText;
731 }
732
733 if ($Type == MetadataSchema::MDFTYPE_OPTION)
734 {
735 # multiple default values are set
736 if (is_array($Value))
737 {
738 foreach ($Value as $Id)
739 {
740 $ControlledName = new ControlledName($Id);
741
742 $Names[] = $ControlledName->Name();
743 }
744
745 return implode(", ", $Names);
746 }
747
748 # only one default value
749 else if ($Value)
750 {
751 $ControlledName = new ControlledName($Value);
752
753 return $ControlledName->Name();
754 }
755
756 return $this->NotSetText;
757 }
758
759 if ($Type == MetadataSchema::MDFTYPE_FLAG)
760 {
761 return $Value ? $this->FlagOnLabel() : $this->FlagOffLabel();
762 }
763
764 return $this->GetValueCheckingLength($Value);
765 }
766
771 public function UpdateMethod()
772 {
773 $Value = $this->Field->UpdateMethod();
774 $String = $this->GetArrayValue(MetadataField::$UpdateTypes, $Value);
775
776 return $this->GetValueCheckingLength($String);
777 }
778
784 public function GetPossibleValues()
785 {
786 $Value = $this->Field->GetPossibleValues();
787
788 return count($Value) ? implode(", ", $Value) : $this->NotSetText;
789 }
790
796 public function GetCountOfPossibleValues()
797 {
798 return $this->GetValueCheckingLength($this->Field->GetCountOfPossibleValues());
799 }
800
807 public function HasItemLevelQualifiers()
808 {
809 return $this->GetYesNo($this->Field->HasItemLevelQualifiers());
810 }
811
816 public function AssociatedQualifierList()
817 {
818 $Value = $this->Field->AssociatedQualifierList();
819
820 return count($Value) ? implode(", ", $Value) : $this->NotSetText;
821 }
826 public function UnassociatedQualifierList()
827 {
828 $Value = $this->Field->UnassociatedQualifierList();
829
830 return count($Value) ? implode(", ", $Value) : $this->NotSetText;
831 }
832
838 public function GetViewingPrivilegeString()
839 {
840 return $this->GetPrivilegeString("Viewing");
841 }
842
849 public function GetAuthoringPrivilegeString()
850 {
851 return $this->GetPrivilegeString("Authoring");
852 }
853
859 public function GetEditingPrivilegeString()
860 {
861 return $this->GetPrivilegeString("Editing");
862 }
863
868 public function GetNotSetText()
869 {
870 return $this->NotSetText;
871 }
872
877 public function SetNotSetText($Text)
878 {
879 $this->NotSetText = $Text;
880 }
881
887 protected function GetYesNo($Value)
888 {
889 return $Value ? "Yes" : "No";
890 }
891
898 protected function GetValueCheckingLength($Value)
899 {
900 return strlen($Value) ? $Value : $this->NotSetText;
901 }
902
909 protected function GetPrivilegeString($Mode)
910 {
911 $Privilege = $this->MapPrivilege($this->Field->{$Mode."Privilege"}());
912 $UserIsValue = $this->MapUserIsValue($this->Field->{$Mode."UserIsValue"}());
913 $UserValue = $this->MapUserValue($this->Field->{$Mode."UserValue"}());
914
915 $String = NULL;
916
917 # add the user privilege constraint first, if set
918 if (!is_null($Privilege))
919 {
920 $String = $Privilege;
921 }
922
923 # then add the "user is value of field" constraint, if set
924 if (!is_null($UserIsValue) && !is_null($UserValue))
925 {
926 if (is_null($String))
927 {
928 $String = "User is value of " . $UserValue;
929 }
930
931 else
932 {
933 $String .= " " . $UserIsValue . " user is value of ";
934 $String .= $UserValue;
935 }
936 }
937
938 return is_null($String) ? $this->NotSetText : $String;
939 }
940
946 protected function MapPrivilege($Value)
947 {
948 if (!isset(self::$PrivilegeList))
949 {
950 $this->LoadPrivilegeList();
951 }
952
953 return $this->GetArrayValue(self::$PrivilegeList, $Value);
954 }
955
959 protected function LoadPrivilegeList()
960 {
961 $PrivilegeFactory = new PrivilegeFactory();
962
963 self::$PrivilegeList = $PrivilegeFactory->GetPrivileges(TRUE, FALSE);
964 }
965
971 protected function MapUserIsValue($Value)
972 {
973 return $this->GetArrayValue(self::$UserIsValueList, $Value);
974 }
975
981 protected function MapUserValue($Value)
982 {
983 if (!isset(self::$UserFieldList))
984 {
985 $this->LoadUserFieldList();
986 }
987
988 return $this->GetArrayValue(self::$UserFieldList, $Value);
989 }
990
994 protected function LoadUserFieldList()
995 {
996 $Schema = new MetadataSchema($this->Field->SchemaId());
997 $UserFields = $Schema->GetFields(MetadataSchema::MDFTYPE_USER);
998
999 # make sure the list is set to something even if there are no user
1000 # fields
1001 self::$UserFieldList = array();
1002
1003 foreach ($UserFields as $Field)
1004 {
1005 self::$UserFieldList[$Field->Id()] = $Field->GetDisplayName();
1006 }
1007 }
1008
1019 protected function GetArrayValue(array $Array, $Key, $Default=NULL)
1020 {
1021 return array_key_exists($Key, $Array) ? $Array[$Key] : $Default;
1022 }
1023
1029 protected $Field;
1030
1035 protected $NotSetText = "--";
1036
1041 protected static $PrivilegeList;
1042
1047 protected static $UserIsValueList = array(
1048 MetadataField::USERISVALUE_OR => "or",
1049 MetadataField::USERISVALUE_AND => "and");
1050
1055 protected static $UserFieldList;
1056
1057 }
MetadataSchema\MDFSTAT_ILLEGALLABEL
const MDFSTAT_ILLEGALLABEL
Definition: MetadataSchema.php:49
HumanMetadataField\PointDecimalDigits
PointDecimalDigits()
Get the human-readable point decimal digits of point fields.
Definition: HumanMetadataField.php:700
HumanMetadataField\MapUserIsValue
MapUserIsValue($Value)
Map a UserIsValue value to a name.
Definition: HumanMetadataField.php:971
MetadataField\$FieldTypeDBEnums
static $FieldTypeDBEnums
Definition: MetadataField.php:1209
HumanMetadataField\MaxHeight
MaxHeight()
Get the human-readable maximum height of images of image fields.
Definition: HumanMetadataField.php:391
HumanMetadataField\$NotSetText
$NotSetText
The text used when a value is not set.
Definition: HumanMetadataField.php:1035
HumanMetadataField\DBFieldName
DBFieldName()
Get the human-readable database field name of the field.
Definition: HumanMetadataField.php:134
HumanMetadataField\MaxPreviewHeight
MaxPreviewHeight()
Get the human-readable maximum height of preview images of image fields.
Definition: HumanMetadataField.php:410
HumanMetadataField\GetYesNo
GetYesNo($Value)
Get the human-readable string for a boolean-like value.
Definition: HumanMetadataField.php:887
HumanMetadataField\AuthoringUserIsValue
AuthoringUserIsValue()
Get the human-readable authoring user is value of the field.
Definition: HumanMetadataField.php:618
HumanMetadataField\GetPossibleValues
GetPossibleValues()
Get the human-readable possible values of the field.
Definition: HumanMetadataField.php:784
MetadataSchema
Metadata schema (in effect a Factory class for MetadataField).
Definition: MetadataSchema.php:13
HumanMetadataField\DefaultAltText
DefaultAltText()
Get the human-readable default alternate text of images of image fields.
Definition: HumanMetadataField.php:451
HumanMetadataField\DefaultQualifier
DefaultQualifier()
Get the human-readable default qualifier of the field.
Definition: HumanMetadataField.php:481
HumanMetadataField\SetNotSetText
SetNotSetText($Text)
Set the text that is used when a value is not set.
Definition: HumanMetadataField.php:877
HumanMetadataField\EditingUserValue
EditingUserValue()
Get the human-readable editing user value of the field.
Definition: HumanMetadataField.php:662
HumanMetadataField\EditingPrivilege
EditingPrivilege()
Get the human-readable editing privilege of the field.
Definition: HumanMetadataField.php:563
HumanMetadataField\HasItemLevelQualifiers
HasItemLevelQualifiers()
Get the human-readable string that indicates if the field has item-level qualifiers.
Definition: HumanMetadataField.php:807
HumanMetadataField
Given a metadata field, this class returns human-readable values for each value of the field...
Definition: HumanMetadataField.php:14
HumanMetadataField\Instructions
Instructions()
Get the human-readable instructions of the field.
Definition: HumanMetadataField.php:157
HumanMetadataField\AssociatedQualifierList
AssociatedQualifierList()
Get the human-readable list of associated qualifiers of the field.
Definition: HumanMetadataField.php:816
HumanMetadataField\MaxLength
MaxLength()
Get the human-readable maximum size of text field values.
Definition: HumanMetadataField.php:301
PrivilegeFactory
Factory which extracts all defined privileges from the database.
Definition: PrivilegeFactory.php:16
HumanMetadataField\DefaultValue
DefaultValue()
Get the human-readable default value of the field.
Definition: HumanMetadataField.php:709
MetadataSchema\MDFSTAT_FIELDDOESNOTEXIST
const MDFSTAT_FIELDDOESNOTEXIST
Definition: MetadataSchema.php:46
MetadataSchema\MDFSTAT_OK
const MDFSTAT_OK
Definition: MetadataSchema.php:42
MetadataField\USERISVALUE_OR
const USERISVALUE_OR
Definition: MetadataField.php:25
HumanMetadataField\UnassociatedQualifierList
UnassociatedQualifierList()
Get the human-readable list of unassociated qualifiers of the field.
Definition: HumanMetadataField.php:826
HumanMetadataField\MapPrivilege
MapPrivilege($Value)
Map a privilege value to a privilege name.
Definition: HumanMetadataField.php:946
MetadataField\USERISVALUE_AND
const USERISVALUE_AND
Definition: MetadataField.php:27
HumanMetadataField\FlagOffLabel
FlagOffLabel()
Get the human-readable flag-off label for flag fields.
Definition: HumanMetadataField.php:355
HumanMetadataField\ViewingUserValue
ViewingUserValue()
Get the human-readable viewing user value of the field.
Definition: HumanMetadataField.php:640
HumanMetadataField\LoadUserFieldList
LoadUserFieldList()
Load the static user field list.
Definition: HumanMetadataField.php:994
HumanMetadataField\EditingUserIsValue
EditingUserIsValue()
Get the human-readable editing user is value of the field.
Definition: HumanMetadataField.php:629
HumanMetadataField\ViewingUserIsValue
ViewingUserIsValue()
Get the human-readable viewing user is value of the field.
Definition: HumanMetadataField.php:607
HumanMetadataField\MaxValue
MaxValue()
Get the human-readable maximum value for number fields.
Definition: HumanMetadataField.php:337
HumanMetadataField\AllowMultiple
AllowMultiple()
Get the human-readable string that indicates if multiple field values are permitted.
Definition: HumanMetadataField.php:228
HumanMetadataField\ParagraphRows
ParagraphRows()
Get the human-readable number of rows of paragraph field inputs.
Definition: HumanMetadataField.php:310
HumanMetadataField\FlagOnLabel
FlagOnLabel()
Get the human-readable flag-on label for flag fields.
Definition: HumanMetadataField.php:346
Qualifier
Definition: Qualifier.php:10
HumanMetadataField\AllowHTML
AllowHTML()
Get the human-readable string indicating if HTML is allowed as the value.
Definition: HumanMetadataField.php:500
MetadataSchema\MDFTYPE_OPTION
const MDFTYPE_OPTION
Definition: MetadataSchema.php:28
HumanMetadataField\SearchWeight
SearchWeight()
Get the human-readable search weight of the field.
Definition: HumanMetadataField.php:373
ControlledName
Metadata type representing non-hierarchical controlled vocabulary values.
Definition: ControlledName.php:14
HumanMetadataField\ShowQualifiers
ShowQualifiers()
Get the human-readable string indicating if qualifiers are shown for the field.
Definition: HumanMetadataField.php:472
MetadataSchema\MDFTYPE_FLAG
const MDFTYPE_FLAG
Definition: MetadataSchema.php:25
HumanMetadataField\IncludeInSortOptions
IncludeInSortOptions()
Get the human-readable string that indicates if the field is included in sort options.
Definition: HumanMetadataField.php:272
HumanMetadataField\UserPrivilegeRestrictions
UserPrivilegeRestrictions()
Get the human-readable user privilege restrictions of user fields.
Definition: HumanMetadataField.php:673
HumanMetadataField\Name
Name()
Get the human-readable name of the field.
Definition: HumanMetadataField.php:86
MetadataField\$UpdateTypes
static $UpdateTypes
Definition: MetadataField.php:1261
HumanMetadataField\MaxPreviewWidth
MaxPreviewWidth()
Get the human-readable maximum width of preview images of image fields.
Definition: HumanMetadataField.php:420
MetadataSchema\MDFSTAT_ERROR
const MDFSTAT_ERROR
Definition: MetadataSchema.php:43
HumanMetadataField\ViewingPrivilege
ViewingPrivilege()
Get the human-readable viewing privilege of the field.
Definition: HumanMetadataField.php:541
HumanMetadataField\GetEditingPrivilegeString
GetEditingPrivilegeString()
Get the human-readable editing privilege string that includes the editing privilege required...
Definition: HumanMetadataField.php:859
HumanMetadataField\UseWysiwygEditor
UseWysiwygEditor()
Get the human-readable string indicating if a WYSIWYG editor should be used when editing the field va...
Definition: HumanMetadataField.php:511
HumanMetadataField\IncludeInAdvancedSearch
IncludeInAdvancedSearch()
Get the human-readable string that indicates if the field is included in advanced search options...
Definition: HumanMetadataField.php:250
PHP
PHP
Definition: OAIClient.php:39
HumanMetadataField\RequiredBySPT
RequiredBySPT()
Get the human-readable string that indicates if the field is required by SPT.
Definition: HumanMetadataField.php:181
HumanMetadataField\MinValue
MinValue()
Get the human-readable minimum value for number fields.
Definition: HumanMetadataField.php:328
HumanMetadataField\NumAjaxResults
NumAjaxResults()
Get the human-readable number of AJAX search results to display for the field.
Definition: HumanMetadataField.php:532
MetadataSchema\MDFSTAT_DUPLICATEDBCOLUMN
const MDFSTAT_DUPLICATEDBCOLUMN
Definition: MetadataSchema.php:45
HumanMetadataField\MaxThumbnailWidth
MaxThumbnailWidth()
Get the human-readable maximum width of thumbnail images of image fields.
Definition: HumanMetadataField.php:441
HumanMetadataField\UseForOaiSets
UseForOaiSets()
Get the human-readable string indicating if the field should be used for OAI sets.
Definition: HumanMetadataField.php:522
HumanMetadataField\PointPrecision
PointPrecision()
Get the human-readable point precision of point fields.
Definition: HumanMetadataField.php:691
HumanMetadataField\GetValueCheckingLength
GetValueCheckingLength($Value)
Get the value or the not-set text depending on the length of the value.
Definition: HumanMetadataField.php:898
HumanMetadataField\Id
Id()
Get the human-readable field ID.
Definition: HumanMetadataField.php:125
HumanMetadataField\RecommenderWeight
RecommenderWeight()
Get the human-readable recommender weight of the field.
Definition: HumanMetadataField.php:382
HumanMetadataField\Type
Type()
Get the human-readable field type of the field.
Definition: HumanMetadataField.php:59
HumanMetadataField\Optional
Optional()
Get the human-readable string that indicates if the field is optional.
Definition: HumanMetadataField.php:199
MetadataSchema\MDFSTAT_DUPLICATELABEL
const MDFSTAT_DUPLICATELABEL
Definition: MetadataSchema.php:48
HumanMetadataField\AuthoringPrivilege
AuthoringPrivilege()
Get the human-readable authoring privilege of the field.
Definition: HumanMetadataField.php:552
HumanMetadataField\TypeAsName
TypeAsName()
Get the human-readable field type of the field.
Definition: HumanMetadataField.php:68
HumanMetadataField\MapUserValue
MapUserValue($Value)
Map a UserValue value to a field display name.
Definition: HumanMetadataField.php:981
MetadataSchema\GetFields
GetFields($FieldTypes=NULL, $OrderType=NULL, $IncludeDisabledFields=FALSE, $IncludeTempFields=FALSE)
Retrieve array of fields.
Definition: MetadataSchema.php:1013
HumanMetadataField\TextFieldSize
TextFieldSize()
Get the human-readable size of text field inputs.
Definition: HumanMetadataField.php:292
HumanMetadataField\LoadPrivilegeList
LoadPrivilegeList()
Load the static privilege list.
Definition: HumanMetadataField.php:959
HumanMetadataField\MaxThumbnailHeight
MaxThumbnailHeight()
Get the human-readable maximum height of thumbnail images of image fields.
Definition: HumanMetadataField.php:431
HumanMetadataField\MaxWidth
MaxWidth()
Get the human-readable maximum width of images of image fields.
Definition: HumanMetadataField.php:400
MetadataField
Object representing a locally-defined type of metadata field.
Definition: MetadataField.php:13
HumanMetadataField\Viewable
Viewable()
Get the human-readable string that indicates if the field is viewable.
Definition: HumanMetadataField.php:217
HumanMetadataField\GetArrayValue
GetArrayValue(array $Array, $Key, $Default=NULL)
Get the value from an array with a given index or a default value if it does not exist.
Definition: HumanMetadataField.php:1019
HumanMetadataField\ImagePreviewPrivilege
ImagePreviewPrivilege()
Get the human-readable image preview privilege of image fields.
Definition: HumanMetadataField.php:574
HumanMetadataField\IsTempItem
IsTempItem()
Get the human-readable string that indicates if the field is a temporary field.
Definition: HumanMetadataField.php:116
HumanMetadataField\DateFormat
DateFormat()
Get the human-readable field date format.
Definition: HumanMetadataField.php:364
HumanMetadataField\IncludeInRecommender
IncludeInRecommender()
Get the human-readable string that indicates if the field is included in the recommender system...
Definition: HumanMetadataField.php:283
MetadataSchema\MDFSTAT_ILLEGALNAME
const MDFSTAT_ILLEGALNAME
Definition: MetadataSchema.php:47
HumanMetadataField\GetPrivilegeString
GetPrivilegeString($Mode)
This method makes getting privilege strings for viewing, authoring, and editing a little more conveni...
Definition: HumanMetadataField.php:909
HumanMetadataField\GetNotSetText
GetNotSetText()
Get the text that is used when a value is not set.
Definition: HumanMetadataField.php:868
HumanMetadataField\$UserFieldList
static $UserFieldList
A static array of user fields.
Definition: HumanMetadataField.php:1055
HumanMetadataField\UsesQualifiers
UsesQualifiers()
Get the human-readable string indicating if the field uses qualifiers.
Definition: HumanMetadataField.php:461
MetadataSchema\MDFTYPE_USER
const MDFTYPE_USER
Definition: MetadataSchema.php:29
HumanMetadataField\Enabled
Enabled()
Get the human-readable string that indicates if the field is enabled.
Definition: HumanMetadataField.php:190
HumanMetadataField\GetAllowedConversionTypes
GetAllowedConversionTypes()
Get the human-readable allowed conversion types of the field.
Definition: HumanMetadataField.php:104
HumanMetadataField\$PrivilegeList
static $PrivilegeList
A static array of privilege values and names.
Definition: HumanMetadataField.php:1041
HumanMetadataField\$Field
$Field
The metadata field that is having its values returned in human-readable form.
Definition: HumanMetadataField.php:1029
HumanMetadataField\UpdateMethod
UpdateMethod()
Get the human-readable update method of the field.
Definition: HumanMetadataField.php:771
HumanMetadataField\Editable
Editable()
Get the human-readable string that indicates if the field is editable.
Definition: HumanMetadataField.php:208
MetadataSchema\MDFSTAT_DUPLICATENAME
const MDFSTAT_DUPLICATENAME
Definition: MetadataSchema.php:44
HumanMetadataField\IncludeInFacetedSearch
IncludeInFacetedSearch()
Get the human-readable string that indicates if the field is included in faceted search options...
Definition: HumanMetadataField.php:261
HumanMetadataField\GetViewingPrivilegeString
GetViewingPrivilegeString()
Get the human-readable viewing privilege string that includes the viewing privilege required...
Definition: HumanMetadataField.php:838
HumanMetadataField\TreeBrowsingPrivilege
TreeBrowsingPrivilege()
Get the human-readable tree browsing privilege of tree fields.
Definition: HumanMetadataField.php:585
HumanMetadataField\GetDisplayName
GetDisplayName()
Get the human-readable display name of the field.
Definition: HumanMetadataField.php:77
HumanMetadataField\GetCountOfPossibleValues
GetCountOfPossibleValues()
Get the human-readable count of possible values of the field.
Definition: HumanMetadataField.php:796
MetadataSchema\MDFTYPE_POINT
const MDFTYPE_POINT
Definition: MetadataSchema.php:33
HumanMetadataField\Status
Status()
Get the human-readable error status of the field.
Definition: HumanMetadataField.php:30
HumanMetadataField\Label
Label()
Get the human-readable label of the field.
Definition: HumanMetadataField.php:95
HumanMetadataField\Owner
Owner()
Get the human-readable field owner.
Definition: HumanMetadataField.php:171
HumanMetadataField\IncludeInKeywordSearch
IncludeInKeywordSearch()
Get the human-readable string that indicates if the field is included in keyword searches.
Definition: HumanMetadataField.php:239
HumanMetadataField\__construct
__construct(MetadataField $Field)
Save the field that will be used to generate the human-readable values.
Definition: HumanMetadataField.php:21
HumanMetadataField\Description
Description()
Get the human-readable description of the field.
Definition: HumanMetadataField.php:143
HumanMetadataField\ParagraphCols
ParagraphCols()
Get the human-readable number of columns of paragraph field inputs.
Definition: HumanMetadataField.php:319
HumanMetadataField\EnableOnOwnerReturn
EnableOnOwnerReturn()
Get the human-readable string indicating if the field should be enabled when the owner/plugin is avai...
Definition: HumanMetadataField.php:598
HumanMetadataField\AuthoringUserValue
AuthoringUserValue()
Get the human-readable authoring user value of the field.
Definition: HumanMetadataField.php:651
HumanMetadataField\GetAuthoringPrivilegeString
GetAuthoringPrivilegeString()
Get the human-readable authoring privilege string that includes the authoring privilege required...
Definition: HumanMetadataField.php:849