/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefSource;
+import jalview.util.Platform;
import com.stevesoft.pat.Regex;
public class EmblSource extends EmblXmlSource
{
+ private static Regex ACCESSION_REGEX;
+
public EmblSource()
{
super();
@Override
public Regex getAccessionValidator()
{
- return new Regex("^[A-Z]+[0-9]+");
+ if (ACCESSION_REGEX == null)
+ {
+ ACCESSION_REGEX = Platform.newRegex("^[A-Z]+[0-9]+");
+ }
+ return ACCESSION_REGEX;
}
/*