Namespace org.accordproject.value0.1.0

Compatible with Concerto versions . Has 6 declarations.

Concerto JSON AST PlantUML XML Schema Typescript C# OData JSON Schema GraphQL Java Go Avro Markdown OpenAPI Protobuf Mermaid

Declared Types

      
      import org.accordproject.value.QuantitativeValue from https://models.accordproject.org/value.cto
      import org.accordproject.value.UnitOfMass from https://models.accordproject.org/value.cto
      import org.accordproject.value.UnitOfLength from https://models.accordproject.org/value.cto
      import org.accordproject.value.UnitOfDensity from https://models.accordproject.org/value.cto
      import org.accordproject.value.UnitOfVolume from https://models.accordproject.org/value.cto
      import org.accordproject.value.UnitOfTemperature from https://models.accordproject.org/value.cto
      
      

Dependencies

  • None

Source

    /*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace org.accordproject.value

/**
 * http://schema.org/QuantitativeValue
 */
concept QuantitativeValue {
  o String unitCode
  o String unitText optional
  o Double value
}

/**
 * SI units of mass
 */
enum UnitOfMass {
  o GRAM
  o KG
  o TONNE
}

/**
 * Units of Length
 */
enum UnitOfLength {
  o METER
}

/**
 * Units of Density
 */
enum UnitOfDensity {
  o KG_PER_CUBIC_METER
}

/**
 * Units of Volume
 */
enum UnitOfVolume {
  o CUBIC_METER
}

/**
 * Units of Temperature
 */
enum UnitOfTemperature {
  o KELVINS
  o CELSIUS
  o FAHRENHEIT
}