<commit_before>/*
 * Copyright 2005-20011 The Kuali Foundation
 *
 *
 * Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 *
 * http://www.opensource.org/licenses/ecl2.php
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
 * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 */
package org.kuali.rice.kew.framework.document.attribute;

import org.kuali.rice.core.api.uif.RemotableAttributeError;
import org.kuali.rice.core.api.uif.RemotableAttributeField;
import org.kuali.rice.core.api.util.jaxb.MultiValuedStringMapAdapter;
import org.kuali.rice.kew.api.KewApiConstants;
import org.kuali.rice.kew.api.document.DocumentWithContent;
import org.kuali.rice.kew.api.document.attribute.DocumentAttribute;
import org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition;
import org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria;
import org.kuali.rice.kew.api.extension.ExtensionDefinition;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.List;
import java.util.Map;

/**
 * Allows for definition of custom attiributes on a document that should be indexed along with that document and made
 * searchable when performing document lookups.  Applications who want to index and expose these custom attributes on
 * their documents can implement this interface and configure their document type to point to the searchable attributes
 * that it should use.
 *
 * <p>A searchable attribute provides the following basic functions:</p>
 *
 * <ul>
 *     <li>The ability to generate XML content that can be associated with the document and used for indexing purposes.</li>
 *     <li>The ability to extract attribute values from the document and supply them to the indexer for indexing.</li>
 *     <li>The ability to define how custom search attributes will be presented in the document lookup user interface.</li>
 *     <li>The ability to define validation for custom search attribute criteria which is executed from the document lookup user interface.</li>
 * </ul>
 *
 * <p>Searchable attributes are mapped to document types via the KEW extension framework (see
 * {@link org.kuali.rice.kew.api.extension.ExtensionRepositoryService}).
 *
 * <p>Through this extension mechanism, searchable attributes are designed to allow for re-use if desired.  To
 * facilitate this, the name of the document type for which the operation is being performed is included for all such
 * methods which might make use of it.  Additionally, all of the operations on a searchable attribute are passed the
 * {@link ExtensionDefinition} which was used to define the instance of the searchable attribute and link it to the
 * document type.  The extension definition can be defined to include additional configuration which can be used by the
 * various methods on the searchable attribute implementation.  This allows for creating a single
 * {@code SearchableAttribute} implementation which can then be parameterized externally by reusing the implementation
 * in the extension repository, but parameterizing it via one ore more extension definitions.</p>
 *<commit_msg>KULRICE-5056 - fixed typo in searchable attribute javadoc<commit_after>/*
 * Copyright 2005-20011 The Kuali Foundation
 *
 *
 * Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License at
 *
 * http://www.opensource.org/licenses/ecl2.php
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
 * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 */
package org.kuali.rice.kew.framework.document.attribute;

import org.kuali.rice.core.api.uif.RemotableAttributeError;
import org.kuali.rice.core.api.uif.RemotableAttributeField;
import org.kuali.rice.core.api.util.jaxb.MultiValuedStringMapAdapter;
import org.kuali.rice.kew.api.KewApiConstants;
import org.kuali.rice.kew.api.document.DocumentWithContent;
import org.kuali.rice.kew.api.document.attribute.DocumentAttribute;
import org.kuali.rice.kew.api.document.attribute.WorkflowAttributeDefinition;
import org.kuali.rice.kew.api.document.lookup.DocumentLookupCriteria;
import org.kuali.rice.kew.api.extension.ExtensionDefinition;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.List;
import java.util.Map;

/**
 * Allows for definition of custom attributes on a document that should be indexed along with that document and made
 * searchable when performing document lookups.  Applications who want to index and expose these custom attributes on
 * their documents can implement this interface and configure their document type to point to the searchable attributes
 * that it should use.
 *
 * <p>A searchable attribute provides the following basic functions:</p>
 *
 * <ul>
 *     <li>The ability to generate XML content that can be associated with the document and used for indexing purposes.</li>
 *     <li>The ability to extract attribute values from the document and supply them to the indexer for indexing.</li>
 *     <li>The ability to define how custom search attributes will be presented in the document lookup user interface.</li>
 *     <li>The ability to define validation for custom search attribute criteria which is executed from the document lookup user interface.</li>
 * </ul>
 *
 * <p>Searchable attributes are mapped to document types via the KEW extension framework (see
 * {@link org.kuali.rice.kew.api.extension.ExtensionRepositoryService}).
 *
 * <p>Through this extension mechanism, searchable attributes are designed to allow for re-use if desired.  To
 * facilitate this, the name of the document type for which the operation is being performed is included for all such
 * methods which might make use of it.  Additionally, all of the operations on a searchable attribute are passed the
 * {@link ExtensionDefinition} which was used to define the instance of the searchable attribute and link it to the
 * document type.  The extension definition can be defined to include additional configuration which can be used by the
 * various methods on the searchable attribute implementation.  This allows for creating a single
 * {@code SearchableAttribute} implementation which can then be parameterized externally by reusing the implementation
 * in the extension repository, but parameterizing it via one ore more extension definitions.</p>
 *
{'fraction_non_alphanumeric': 0.0686683721556483, 'fraction_numerical': 0.003770028275212064, 'mean_word_length': 4.776049766718507, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6966492', 'n_tokens_mistral': 1918, 'n_tokens_neox': 1877, 'n_words': 818}