RegularExpression_GroupVariableInfo.java from Texai at Krugle
Show RegularExpression_GroupVariableInfo.java syntax highlighted
/*
* RegularExpression_GroupVariableInfo.java
*
* Created on January 18, 2007, 2:51 PM
*
* Description: Provides the regular expression group variable information.
*
* Copyright (C) 2007 Stephen L. Reed.
*
* This program is free software; you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program;
* if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package org.texai.grammar.domainEntity;
import javax.persistence.Id;
import net.jcip.annotations.NotThreadSafe;
import org.openrdf.model.URI;
import org.texai.kb.Constants;
import org.texai.kb.persistence.RDFEntity;
import org.texai.kb.persistence.RDFNamespace;
import org.texai.kb.persistence.RDFProperty;
/** Provides the regular expression group variable information.
*
* @author reed
*/
@RDFEntity(
namespaces={
@RDFNamespace(prefix="texai", namespaceURI=Constants.TEXAI_NAMESPACE),
@RDFNamespace(prefix="cyc", namespaceURI=Constants.CYC_NAMESPACE)},
subject="texai:org.texai.grammar.domainEntity.RegularExpression_GroupVariableInfo", context="texai:EnglishConstructionGrammarDomainContext")
@NotThreadSafe // but effectively immutable
public class RegularExpression_GroupVariableInfo {
/** the id assigned by the persistence framework */
@Id
private URI id; // NOPMD
/** the regular expression group variable */
@RDFProperty(predicate="texai:cxgConstituentRegularExpressionGroupVariable")
private String groupVariable;
/** the regular expression group variable position */
@RDFProperty(predicate="texai:cxgConstituentRegularExpressionGroupVariablePosition")
private int groupVariablePosition;
/** Creates a new instance of RegularExpression_GroupVariableInfo. */
public RegularExpression_GroupVariableInfo() {
super();
}
/** Creates a new instance of RegularExpression_GroupVariableInfo. */
public RegularExpression_GroupVariableInfo(final String groupVariable, final int groupVariablePosition) {
super();
//Preconditions
assert groupVariable != null : "groupVariable must not be null";
assert groupVariable.length() > 0 : "groupVariable must not be an empty string";
assert groupVariablePosition >= 0 : "groupVariable must not be negative";
this.groupVariable = groupVariable;
this.groupVariablePosition = groupVariablePosition;
}
/** Gets the id that identifies this instance.
*
* @return the id that identifies this instance
*/
public URI getId() {
return id;
}
/** Sets the regular expression group variable.
*
* @param groupVariable the regular expression group variable
*/
public void setGroupVariable(final String groupVariable) {
//Preconditions
assert groupVariable != null : "groupVariable must not be null";
assert groupVariable.length() > 0 : "groupVariable must not be an empty string";
this.groupVariable = groupVariable;
}
/** Gets the regular expression group variable.
*
* @return the regular expression group variable
*/
public String getGroupVariable() {
return groupVariable;
}
/** Sets the regular expression group variable position.
*
* @param groupVariablePosition the regular expression group variable position
*/
public void setGroupVariablePosition(final int groupVariablePosition) {
//Preconditions
assert groupVariablePosition >= 0 : "groupVariable must not be negative";
this.groupVariablePosition = groupVariablePosition;
}
/** Gets the regular expression group variable position.
*
* @return the regular expression group variable position
*/
public int getGroupVariablePosition() {
return groupVariablePosition;
}
}
See more files for this project here