Exemple #1
0
        private CorrectType getCorrectType()
        {
            string      html = getHtml(true, true, true, true);
            CorrectType type = (getIssueType() == IssueType.Other ? CorrectType.Unknown : CorrectType.None);

            Dictionary <string, CorrectType> searchTable
                = new Dictionary <string, CorrectType>();

            searchTable.Add(@"震源(要素)?.{1,3}震度を訂正する", CorrectType.ScaleAndDestination);
            searchTable.Add(@"震度.{1,3}震源(要素?)を訂正する", CorrectType.ScaleAndDestination);
            searchTable.Add(@"震度を訂正する", CorrectType.ScaleOnly);
            searchTable.Add(@"震源(要素)?を訂正する", CorrectType.DestinationOnly);
            //searchTable.Add(@"(?!付加文.+)訂正する", CorrectType.Unknown);

            foreach (string key in searchTable.Keys)
            {
                if (Regex.IsMatch(html, key))
                {
                    type = searchTable[key];
                    break;
                }
            }

            return(type);
        }
Exemple #2
0
        public JMAQuake(int observationPointDefaultCapacity)
        {
            issueOf     = "";
            issueTime   = DateTime.MinValue;
            issueType   = IssueType.Unknown;
            correctType = CorrectType.Unknown;

            occuredTime      = DateTime.MinValue;
            occuredPlace     = "";
            occuredLatitude  = -200;
            occuredLongitude = -200;
            occuredDepth     = -1;
            occuredMagnitude = -1;

            occuredScale = -1;

            domesticTsunamiType = DomesticTsunamiType.Unknown;
            foreignTsunamiType  = ForeignTsunamiType.Unknown;

            if (observationPointDefaultCapacity >= 0)
            {
                observationPoints = new List <ObservationPoint>(observationPointDefaultCapacity);
            }
            else
            {
                observationPoints = new List <ObservationPoint>();
            }
        }