# Copyright (c) 2012 Jirka Kosek <jirka@kosek.cz>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

datatypes w = "http://whattf.org/datatype-draft"

its-confidence.type = xsd:double { minInclusive = "0" maxInclusive = "1" }

its-locNote.type = string

## The type of localization note
its-locNoteType.type =
    ## Localization note is an alert
    w:string "alert"
    |
    ## Localization note is a description
    w:string "description"

its-locNoteRef.type = w:iri-ref

its-termInfoRef.type = w:iri-ref

## Indicates a term locally
its-term.type =
    ## The value 'yes' means that this is a term
    w:string "yes"
    |
    ## The value 'no' means that this is not a term
    w:string "no"

its-termConfidence.type = its-confidence.type

## States whether current context is regarded as "within text"
its-withinText.type =
    ## The element and its content are part of the flow of its parent element
    w:string "yes"
    |
    ## The element splits the text flow of its parent element and its content is an independent text flow
    w:string "no"
    |
    ## The element is part of the flow of its parent element, its content is an independent flow
    w:string "nested"

## A comma separated list of mappings between values in the content
## and workflow specific values. The values may contain spaces; in
## that case they MUST be delimited by quotation marks.
its-domainMapping.type = string

its-taConfidence.type = its-confidence.type

its-taClassRef.type = w:iri-ref

its-taIdentRef.type = w:iri-ref

its-taIdent.type = string

its-taSource.type = string

its-localeFilterList.type = string

its-localeFilterType.type = w:string "include" | w:string "exclude"

its-person.type = string

its-personRef.type = w:iri-ref

its-org.type = string

its-orgRef.type = w:iri-ref

its-tool.type = string

its-toolRef.type = w:iri-ref

its-revPerson.type = string

its-revPersonRef.type = w:iri-ref

its-revOrg.type = string

its-revOrgRef.type = w:iri-ref

its-revTool.type = string

its-revToolRef.type = w:iri-ref

its-provRef.type = list { w:iri-ref+ }

its-provenanceRecordsRef.type = w:iri-ref

its-idValue.type = string

its-space.type = "default" | "preserve"

its-locQualityIssuesRef.type = w:iri-ref

its-locQualityIssueType.type = w:string "terminology" | w:string "mistranslation" |
  w:string "omission" | w:string "untranslated" | w:string "addition" | w:string "duplication" |
  w:string "inconsistency" | w:string "grammar" | w:string "legal" | w:string "register" |
  w:string "locale-specific-content" | w:string "locale-violation" | w:string "style" |
  w:string "characters" | w:string "misspelling" | w:string "typographical" | w:string "formatting" |
  w:string "inconsistent-entities" | w:string "numbers" | w:string "markup" | w:string "pattern-problem" |
  w:string "whitespace" | w:string "internationalization" | w:string "length" | w:string "non-conformance" | w:string "uncategorized" |
  w:string "other"

its-locQualityIssueComment.type = string

its-locQualityIssueSeverity.type =  xsd:double { minInclusive = "0" maxInclusive = "100" } 

its-locQualityIssueProfileRef.type = w:iri-ref

its-locQualityIssueEnabled.type = w:string "yes" | w:string "no"

its-locQualityRatingScore.type = xsd:double { minInclusive = "0" maxInclusive = "100" } 

its-locQualityRatingVote.type = xsd:integer

its-locQualityRatingScoreThreshold.type = xsd:double { minInclusive = "0" maxInclusive = "100" }

its-locQualityRatingVoteThreshold.type = xsd:integer

its-locQualityRatingProfileRef.type = w:iri-ref

its-mtConfidence.type = its-confidence.type

its-allowedCharacters.type = string

its-storageSize.type = xsd:nonNegativeInteger

its-storageEncoding.type = string

its-lineBreakType.type = w:string "cr" | w:string "lf" | w:string "crlf"

its-annotatorsRef.type = string
