public static class Roles.Role extends java.lang.Object
role
element in tagging preset definition.
Information on a certain role, which is expected for the relation members.Modifier and Type | Field and Description |
---|---|
private long |
count
How often must the element appear
|
java.lang.String |
key
Role name used in a relation
|
java.lang.String |
locale_text
The localized version of
text . |
SearchCompiler.Match |
memberExpression
An expression (cf.
|
boolean |
regexp
Is the role name a regular expression
|
boolean |
required
Is this role required at least once in the relation?
|
java.lang.String |
text
The text to display
|
java.lang.String |
text_context
The context used for translating
text |
java.util.Set<TaggingPresetType> |
types |
Constructor and Description |
---|
Role() |
Modifier and Type | Method and Description |
---|---|
boolean |
addToPanel(javax.swing.JPanel p) |
long |
getValidCount(long c)
Return either argument, the highest possible value or the lowest allowed value
|
boolean |
isRole(java.lang.String role)
Check if the given role matches this class (required to check regexp role types)
|
void |
setCount(java.lang.String count) |
void |
setMember_expression(java.lang.String memberExpression) |
void |
setRegexp(java.lang.String str) |
void |
setRequisite(java.lang.String str) |
void |
setType(java.lang.String types) |
java.lang.String |
toString() |
public java.util.Set<TaggingPresetType> types
public java.lang.String key
public boolean regexp
public java.lang.String text
public java.lang.String text_context
text
public java.lang.String locale_text
text
.public SearchCompiler.Match memberExpression
public boolean required
private long count
public Role()
public void setType(java.lang.String types) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setRequisite(java.lang.String str) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setRegexp(java.lang.String str) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setMember_expression(java.lang.String memberExpression) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void setCount(java.lang.String count)
public long getValidCount(long c)
c
- countrequired
public boolean isRole(java.lang.String role)
role
- role to checktrue
if role matchespublic boolean addToPanel(javax.swing.JPanel p)
public java.lang.String toString()
toString
in class java.lang.Object