Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h4. {toc}

This page is for json schema properties of type "string" who may (or may not) need a regular expression to help define allowed instances.

Page will be organized into json schemas, and will list all "string" type properties, logical rules for defining those properties, if they need a pattern, and a suggested regular expression for the properties that do need a pattern.

h4. 
h2. Entity.json



h5. name

Logical Rules

* must be a sting
* can be more than one word
* can have letters
* can have symbols



Needs Pattern = no



h5. description

Logical Rules
* must be a string

Needs Pattern = no

h5. id

Logical Rules
* represented as a long
* can only be digits
* must be a size that will fit into a java long
* will never be a negative

Needs Pattern = yes


{code}
Suggested Regular Expression = "\\d{1,7}"
{code}

h5. uri

Logical Rules
* will be "synapse.sagebase.org/#"
* after the pound will be the type of entity, etc

Needs Pattern = yes


{code}
Suggested Regular Expression = "^(http:////synapse.sagebase.org/#).+"
{code}

h5. version

Logical Rules
* will be in format 1.0.0
* so numbers, period, numbers, period, numbers

Needs Pattern = yes


{code}
Suggested Regular Expression = "\\d{1,2}\\.\\d{1,2}\\.\\d{1,2}"
{code}

h5. etag

Logical Rules
* made up of a db long
* default is 0
* can only be digits
* must fit in a java long
* will never be a negative

Needs Pattern = yes


{code}
Suggested Regular Expression = "\\d{1,7}"
{code}

h5. createdOn

Logical Rules
* in the form of java.util.Date
* string must conform to that structure
* example from project modifiedOn": "2011-12-07T15:01:15.528-08:00",
* example from project"createdOn": "2011-12-07T15:01:15.528-08:00",

Needs Pattern = yes


{code}
Suggested Regular Expression = "2\\d{3}\\-[01]\\d{1}\\-[0123]\\d{1}T[012]\\d{1}:\\d{2}:\\d{2}\\.\\d{3}\\-\\d{2}:\\d{2}"
{code}

h5. modifiedOn

Logical Rules
* java.util.Date
* string must conform to that structure
* example from project modifiedOn": "2011-12-07T15:01:15.528-08:00",
* example from project"createdOn": "2011-12-07T15:01:15.528-08:00",

Needs Pattern = yes


{code}
Suggested Regular Expression = "2\\d{3}\\-[01]\\d{1}\\-[0123]\\d{1}T[012]\\d{1}:\\d{2}:\\d{2}\\.\\d{3}\\-\\d{2}:\\d{2}"
{code}

h5. createdBy

Logical Rules
* in the form of an email address
* can also be a single word
* letters and supported email characters only
* no whitespace
* example is admin@sagebase.org

Needs Pattern = yes


{code}
Suggested Regular Expression = "\\S+"
{code}

h5. modifiedBy

Logical Rules
* in the form of an email address
* can also be a single word
* letters and supported email characters only
* no whitespace
* example is admin@sagebase.org

Needs Pattern = yes


{code}
Suggested Regular Expression = "\\S+"
{code}

h5. annotations

Logical Rules
* are strings
* can be different number of words
* can contain symbols

Needs Pattern = no

h5. accessControlList

Logical Rules
* example "/project/17496/acl"
* example"/dataset/17497/acl"
* must be a front-slash, supported type, front-slash, id, "acl"

Needs Pattern = yes


{code}
Suggested Regular Expression = "/(dataset|layer|location|project|preview|eula|agreement|folder|analysis|step|code)/\\d{1,7}/acl"
{code}

h5. parentId

Logical Rules
* represented by a long
* will never be negative
* must be digits only
* must fit into java long

Needs Pattern = yes


{code}
Suggested Regular Expression = "\\d{1,7}"
{code}

h2. S3Token.json


h5. path

Logical Rules
* should be "https://console.aws.amazon.com/s3/home"

Needs Pattern = yes

Suggested Regular Expression

h5. md5

Logical Rules
* needs to be 32 digits
* needs to be all lowercase a-f and 0-9
* python example \^\[a-z0-9\]{32}$/i
* John's example \[0-9a-fA-\F\]\{32\}47f4cc0b788002e8b264881beb4ec08b
beaa28899c52f9df66094c4267876e78



Needs Pattern = yes


Suggested Regular Expression

h5. contentType

Logical Rules
* This is not something from aws, but something from services
* is the MIME type
* "text/html" is one
* can also be application, audio, image, message, multipart, text, video, x-token

Needs Pattern = yes


Suggested Regular Expression

h5. accessId

Logical Rules
* 20 characters
* all numbers and capitol letters (A-Z)
* no white spaces
* found on site can be between 16 to 32 characters

Needs Pattern = yes


Suggested Regular Expression

h5. secretKey

Logical Rules
* letters, both lower and upper case
* A to Z
* numbers
* random characters like + and /
* 40 characters long
* no white spaces

Needs Pattern = yes


Suggested Regular Expression

h5. securityToken

Logical Rules
* found two examples
* isfakeSessionToken
* AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/L
       To6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3z
       rkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtp
       Z3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE

Needs Pattern = yes


Suggested Regular Expression

h5. bucket

Logical Rules
* naming rules for the buckets
* can contain lowercase letters, numbers, periods, underscores and dashes
* must start with a number or  letter
* must be between 3 and 255 characters long
* must  not be formatted as an ip address like 564.442.4.4

Needs Pattern = yes


Suggested Regular Expression

h5. presignedUrl

Logical Rules
* generated example
* [https://bucket.s3.amazonaws.com/key?Expires=1323383935&AWSAccessKeyId=AKIAJ32QSEKRO5UEMDWQ&Signature=4%2Fyjg%2FOdHNtBtmaM8PoGOqGfWTA%3D]
* example from a test
* [https://s3.amazonaws.com/devdata.sagebase.org/9876/unc.edu_COAD.AgilentG4502A_07_3.Level_2.2.0.0.tar.gz?Expires=1323468021&x-amz-security-token=fakeSessionToken&AWSAccessKeyId=fakeAccessKeyId&Signature=OuTEUoJklhzL37jFRX9pRK1RcVg%3D]
* [https://s3.amazonaws.com/devdata.sagebase.org/9876/unc.edu_COAD.AgilentG4502A_07_3.Level_2.2.0.0.tar.gz?Expires=1323468151&x-amz-security-token=fakeSessionToken&AWSAccessKeyId=fakeAccessKeyId&Signature=Jt1fXYZFO5e8pyKJ%2B%2B9YsFiFY6I%3D]

Needs Pattern = yes


Suggested Regular Expression