<commit_before>/**
 * $Id$
 * $URL$
 * AutoRegister.java - entity-broker - 31 May 2007 7:01:11 PM - azeckoski
 **************************************************************************
 * Copyright (c) 2007, 2008 Sakai 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.osedu.org/licenses/ECL-2.0
 *
 * 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.sakaiproject.entitybroker;

import java.io.Serializable;

import org.sakaiproject.entitybroker.entityprovider.EntityProvider;
import org.sakaiproject.entitybroker.util.TemplateParseUtil;

/**
 * The class of all Entity references handled by the EntityBroker system. This provides the
 * entity prefix, which uniquely identifies the {@link EntityProvider}
 * responsible for handling the Entity. It optionally provides the entity id which
 * uniquely identifies an entity locally within the prefix space. 
 * It also provides for all parsing methods for
 * entity references (always of the form /prefix or /prefix/id)
 * 
 * @author <NAME> (<EMAIL>)
 */
public class EntityReference implements Cloneable, Serializable {
    public final static long serialVersionUID = 1l;

    public static transient final char SEPARATOR = EntityView.SEPARATOR;
    public static transient final char PERIOD = EntityView.PERIOD;

    protected transient String originalReference;
    /**
     * This is a special method and should not normally be used,
     * use {@link #toString()} or {@link #getReference()}
     * @return the reference string used to create this object or
     * null if this was created using a constructor which does not supply a reference
     */
    public String getOriginalReference() {
        return originalReference;
    }
    protected void setOriginalReference(String reference) {<commit_msg>http://bugs.sakaiproject.org/jira/browse/SAK-13898 Static code review fixes, correctness<commit_after>/**
 * $Id$
 * $URL$
 * AutoRegister.java - entity-broker - 31 May 2007 7:01:11 PM - azeckoski
 **************************************************************************
 * Copyright (c) 2007, 2008 Sakai 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.osedu.org/licenses/ECL-2.0
 *
 * 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.sakaiproject.entitybroker;

import java.io.Serializable;

import org.sakaiproject.entitybroker.entityprovider.EntityProvider;
import org.sakaiproject.entitybroker.util.TemplateParseUtil;

/**
 * The class of all Entity references handled by the EntityBroker system. This provides the
 * entity prefix, which uniquely identifies the {@link EntityProvider}
 * responsible for handling the Entity. It optionally provides the entity id which
 * uniquely identifies an entity locally within the prefix space. 
 * It also provides for all parsing methods for
 * entity references (always of the form /prefix or /prefix/id)
 * 
 * @author <NAME> (<EMAIL>)
 */
public class EntityReference implements Cloneable, Serializable {
    public final static long serialVersionUID = 1l;

    // NOTE: these are transient for serialization - ignore PMD SE_TRANSIENT_FIELD_NOT_RESTORED
    public static transient final char SEPARATOR = EntityView.SEPARATOR;
    public static transient final char PERIOD = EntityView.PERIOD;

    protected transient String originalReference;
    /**
     * This is a special method and should not normally be used,
     * use {@link #toString()} or {@link #getReference()}
     * @return the reference string used to create this object or
     * null if this was created using a constructor which does not supply a reference
     */
    public String getOriginalReference() {
        return originalReference;
    }
    protected void setOriginalReference(String reference) {
{'fraction_non_alphanumeric': 0.10118918918918919, 'fraction_numerical': 0.01145945945945946, 'mean_word_length': 4.083516483516483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, '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': '5219886', 'n_tokens_mistral': 1218, 'n_tokens_neox': 1129, 'n_words': 508}