Esempio n. 1
0
 def test_basics(self):
     BFO = CurieNamespace('bfo', "http://purl.obolibrary.org/obo/BFO_")
     self.assertEqual(URIRef("http://purl.obolibrary.org/obo/BFO_test"),
                      BFO.test)
     self.assertEqual("http://purl.obolibrary.org/obo/BFO_", BFO)
     self.assertEqual("bfo:test", BFO.curie('test'))
     self.assertEqual("bfo:", BFO.curie())
Esempio n. 2
0
    def parse_identifier(cls, identifier: str) -> Tuple[CurieNamespace, str]:

        # trivial case of a null identifier?
        if not identifier:
            return CurieNamespace("", ""), ""

        # check if this is a candidate URI...
        if identifier.lower().startswith("http"):
            # guess that perhaps it is, so try to parse it
            return cls.parse_uri(identifier)

        else:  # attempt to parse as a CURIE
            return cls.parse_curie(identifier)
Esempio n. 3
0
 def parse_curie(cls, curie: str) -> Tuple[CurieNamespace, str]:
     """
     Parse a candidate CURIE
     :param curie: candidate curie string
     :return: CURIE namespace and object_id
     """
     found = CurieNamespace("", ""), curie  # default value if not a CURIE or unknown XMLNS prefix
     if ':' in curie:
         part = curie.split(":")
         # Normalize retrieval with upper case of prefix for lookup
         prefix = part[0].upper()
         if prefix in cls._get_prefix_map():
             found = cls._prefix_map[prefix], part[1]
     return found
Esempio n. 4
0
    def parse_uri(cls, uri: str) -> Tuple[CurieNamespace,  str]:
        """
        Parse a candidate URI
        :param uri: candidate URI string
        :return: namespace and object_id
        """
        found = CurieNamespace("", ""), uri   # default value returned if unknown URI namespace

        # TODO: is there a more efficient lookup scheme here than a linear search of namespaces?
        for ns in cls._namespaces:
            base_uri = str(ns)
            if uri.startswith(base_uri):
                # simple minded deletion of base_uri to give the object_id
                object_id = uri.replace(base_uri, "")
                found = ns, object_id
                break
        return found
Esempio n. 5
0
from src.core.localidentifiers import CodeSystemName
from src.core.references import CodeSystemReference, CodeSystemReferenceName, CodeSystemVersionReference, CodeSystemVersionReferenceName, FormatReference, FormatReferenceName, LanguageReference, LanguageReferenceName, MapReference, MapReferenceName, MatchAlgorithmReference, MatchAlgorithmReferenceName, NameAndMeaningReference, NameAndMeaningReferenceName, OntologyLanguageReference, OntologyLanguageReferenceName, OntologySyntaxReference, OntologySyntaxReferenceName, PredicateReference, RoleReference, RoleReferenceName, ValueSetDefinitionReference, ValueSetDefinitionReferenceName, ValueSetReference, ValueSetReferenceName, VersionTagReference, VersionTagReferenceName
from src.core.resourcedescription import ResourceVersionDescription, ResourceVersionDescriptionId, SourceAndNotation
from src.core.uritypes import DocumentURI, ExternalURI, LocalURI, PersistentURI, RenderingURI
from biolinkml.utils.metamodelcore import Bool, URIorCURIE, XSDDateTime
from includes.annotations import Annotation
from includes.extensions import Extension
from includes.types import Boolean, String

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
RDF = CurieNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#')
TCCM = CurieNamespace('tccm', 'https://hotecosystem.org/tccm/')
DEFAULT_ = TCCM


# Types

# Class references
class SpecificEntityListNamespaceURI(EntityReferenceListNamespaceURI):
    pass


class ValueSetDefinitionId(ResourceVersionDescriptionId):
    pass
Esempio n. 6
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from biolinkml.utils.enumerations import EnumDefinitionImpl
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace

metamodel_version = "1.7.0"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
XSD = CurieNamespace('xsd', 'http://example.org/UNKNOWN/xsd/')
DEFAULT_ = CurieNamespace('', 'http://example.org/sample/example1/')


# Types
class String(str):
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
    type_model_uri = URIRef("http://example.org/sample/example1/String")


# Class references
class AId(extended_str):
    pass
Esempio n. 7
0
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import URIorCURIE
from includes.types import Uriorcurie

metamodel_version = "1.6.1"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
IAO = CurieNamespace('IAO', 'http://purl.obolibrary.org/obo/IAO_')
OIO = CurieNamespace('OIO', 'http://www.geneontology.org/formats/oboInOwl#')
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
META = CurieNamespace('meta', 'https://w3id.org/biolink/biolinkml/meta/')
METATYPE = CurieNamespace('metatype',
                          'https://w3id.org/biolink/biolinkml/meta/types/')
RDF = CurieNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
RDFS = CurieNamespace('rdfs', 'http://www.w3.org/2000/01/rdf-schema#')
SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = META

# Types

# Class references
Esempio n. 8
0
class BiolinkNameSpace:
    """
    Map of BioLink Model registered URI Namespaces
    """

    _namespaces = [
        CurieNamespace('OIO', 'http://www.geneontology.org/formats/oboInOwl#'),
        CurieNamespace('bibo', 'http://purl.org/ontology/bibo/'),
        CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/'),
        CurieNamespace('dcterms', 'http://purl.org/dc/terms/'),
        CurieNamespace('meta', 'https://w3id.org/biolink/biolinkml/meta/'),
        CurieNamespace('oslc', 'http://open-services.net/ns/core#'),
        CurieNamespace('owl', 'http://www.w3.org/2002/07/owl#'),
        CurieNamespace('pav', 'http://purl.org/pav/'),
        CurieNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'),
        CurieNamespace('rdfs', 'http://www.w3.org/2000/01/rdf-schema#'),
        CurieNamespace('schema', 'http://schema.org/'),
        CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#'),
        CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#'),
    ]

    # class level dictionaries

    _prefix_map: Dict[str, CurieNamespace] = {}

    @classmethod
    def _get_prefix_map(cls):
        if not cls._prefix_map:
            for ns in cls._namespaces:
                # index by upper case for uniformity of search
                cls._prefix_map[ns.prefix.upper()] = ns
        return cls._prefix_map

    @classmethod
    def parse_curie(cls, curie: str) -> Tuple[CurieNamespace, str]:
        """
        Parse a candidate CURIE
        :param curie: candidate curie string
        :return: CURIE namespace and object_id
        """
        found = CurieNamespace("", ""), curie  # default value if not a CURIE or unknown XMLNS prefix
        if ':' in curie:
            part = curie.split(":")
            # Normalize retrieval with upper case of prefix for lookup
            prefix = part[0].upper()
            if prefix in cls._get_prefix_map():
                found = cls._prefix_map[prefix], part[1]
        return found

    @classmethod
    def parse_uri(cls, uri: str) -> Tuple[CurieNamespace,  str]:
        """
        Parse a candidate URI
        :param uri: candidate URI string
        :return: namespace and object_id
        """
        found = CurieNamespace("", ""), uri   # default value returned if unknown URI namespace

        # TODO: is there a more efficient lookup scheme here than a linear search of namespaces?
        for ns in cls._namespaces:
            base_uri = str(ns)
            if uri.startswith(base_uri):
                # simple minded deletion of base_uri to give the object_id
                object_id = uri.replace(base_uri, "")
                found = ns, object_id
                break
        return found

    @classmethod
    def parse_identifier(cls,  identifier: str) -> Tuple[CurieNamespace,  str]:

        # trivial case of a null identifier?
        if not identifier:
            return CurieNamespace("", ""), ""

        # check if this is a candidate URI...
        if identifier.lower().startswith("http"):
            # guess that perhaps it is, so try to parse it
            return cls.parse_uri(identifier)

        else:  # attempt to parse as a CURIE
            return cls.parse_curie(identifier)
Esempio n. 9
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from biolinkml.utils.enumerations import EnumDefinitionImpl
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace

metamodel_version = "1.7.0"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
EX = CurieNamespace('ex', 'http://example.org/')
DEFAULT_ = EX

# Types

# Class references


class MyClass(YAMLRoot):
    """
    Annotations as tag value pairs. Note that altLabel is defined in the default namespace, not in the SKOS namespace
    """
    _inherited_slots: ClassVar[List[str]] = []

    class_class_uri: ClassVar[URIRef] = EX.MyClass
Esempio n. 10
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import Bool, ElementIdentifier, NCName, NodeIdentifier, URI, URIorCURIE, XSDDate, XSDDateTime, XSDTime

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
SHEX = CurieNamespace('shex', 'http://www.w3.org/ns/shex#')
SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#')
TEST = CurieNamespace('test', 'http://example.org/test/')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = TEST


# Types
class String(str):
    """ A character string """
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
    type_model_uri = TEST.String

Esempio n. 11
0
from biolinkml.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
FOAF = CurieNamespace('foaf', 'http://xmlns.com/foaf/0.1/')
SAMP = CurieNamespace('samp', 'http://example.org/model/')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = SAMP


# Types
class String(str):
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
    type_model_uri = SAMP.String


# Class references
Esempio n. 12
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace


metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
DEFAULT_ = CurieNamespace('', 'https://hotecosystem.org/tccm/prefixes/')


# Types

# Class references





# Slots
class slots:
    pass

Esempio n. 13
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from biolinkml.utils.enumerations import EnumDefinitionImpl
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace

metamodel_version = "1.7.0"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
TCCM = CurieNamespace('tccm', 'https://hotecosystem.org/tccm/')
DEFAULT_ = TCCM

# Types

# Class references


@dataclass
class IterableResolvedValueSet(YAMLRoot):
    _inherited_slots: ClassVar[List[str]] = []

    class_class_uri: ClassVar[URIRef] = TCCM.IterableResolvedValueSet
    class_class_curie: ClassVar[str] = "tccm:IterableResolvedValueSet"
    class_name: ClassVar[str] = "IterableResolvedValueSet"
Esempio n. 14
0
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import URIorCURIE
from includes.types import Uriorcurie

metamodel_version = "1.6.1"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
META = CurieNamespace('meta', 'https://w3id.org/biolink/biolinkml/')
RDFS = CurieNamespace('rdfs', 'http://example.org/UNKNOWN/rdfs/')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = CurieNamespace('', 'https://example.com/test44/')


# Types
class IriType(Uriorcurie):
    """ An IRI """
    type_class_uri = XSD.anyURI
    type_class_curie = "xsd:anyURI"
    type_name = "iri type"
    type_model_uri = URIRef("https://example.com/test44/IriType")


# Class references
Esempio n. 15
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from includes.types import String

metamodel_version = "1.4.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#')
TEST = CurieNamespace('test', 'http://example.org/test/')
DEFAULT_ = TEST

# Types

# Class references


@dataclass
class C1(YAMLRoot):
    _inherited_slots: ClassVar[List[str]] = []

    class_class_uri: ClassVar[URIRef] = TEST.C1
    class_class_curie: ClassVar[str] = "test:C1"
    class_name: ClassVar[str] = "c1"
Esempio n. 16
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import URIorCURIE

metamodel_version = "1.4.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = CurieNamespace('', 'http://example.org/example/multi_id/')


# Types
class Uri(URIorCURIE):
    type_class_uri = XSD.anyURI
    type_class_curie = "xsd:anyURI"
    type_name = "uri"
    type_model_uri = URIRef("http://example.org/example/multi_id/Uri")


class IdentifierType(Uri):
    type_class_uri = XSD.anyURI
    type_class_curie = "xsd:anyURI"
    type_name = "identifier type"
Esempio n. 17
0
from biolinkml.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace

metamodel_version = "1.4.4"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
XSD = CurieNamespace('xsd', 'http://example.org/UNKNOWN/xsd/')
DEFAULT_ = CurieNamespace('', 'http://example.org/sample/organization/')


# Types
class YearCount(int):
    type_class_uri = XSD.int
    type_class_curie = "xsd:int"
    type_name = "yearCount"
    type_model_uri = URIRef("http://example.org/sample/organization/YearCount")


class String(str):
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
Esempio n. 18
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from includes.types import String

metamodel_version = "1.6.1"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
TEST = CurieNamespace('test', 'http://example.org/test/')
DEFAULT_ = CurieNamespace('', 'http://example.org/tests/namespace/')

# Types

# Class references


@dataclass
class C1(YAMLRoot):
    _inherited_slots: ClassVar[List[str]] = []

    class_class_uri: ClassVar[URIRef] = URIRef(
        "http://example.org/tests/namespace/C1")
    class_class_curie: ClassVar[str] = None
Esempio n. 19
0
from biolinkml.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = CurieNamespace('', 'http://example.com/')


# Types
class String(str):
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
    type_model_uri = URIRef("http://example.com/String")


# Class references
class C1Id(extended_str):
    pass
Esempio n. 20
0
class BiolinkNameSpace:
    """
    Map of BioLink Model registered URI Namespaces
    """

    _namespaces = [
        CurieNamespace('APO', 'http://purl.obolibrary.org/obo/APO_'),
        CurieNamespace('Aeolus', 'http://translator.ncats.nih.gov/Aeolus_'),
        CurieNamespace('BIOGRID', 'http://identifiers.org/biogrid/'),
        CurieNamespace('BIOSAMPLE', 'http://identifiers.org/biosample/'),
        CurieNamespace('BSPO', 'http://purl.obolibrary.org/obo/BSPO_'),
        CurieNamespace(
            'CAID',
            'http://reg.clinicalgenome.org/redmine/projects/registry/genboree_registry/by_caid?caid='
        ),
        CurieNamespace('CAS', 'http://identifiers.org/cas/'),
        CurieNamespace('CATH', 'http://identifiers.org/cath/'),
        CurieNamespace('CATH_SUPERFAMILY',
                       'http://identifiers.org/cath.superfamily/'),
        CurieNamespace('CDD', 'http://identifiers.org/cdd/'),
        CurieNamespace('CHADO', 'http://gmod.org/wiki/Chado/'),
        CurieNamespace('CHEBI', 'http://purl.obolibrary.org/obo/CHEBI_'),
        CurieNamespace('CHEMBL_COMPOUND',
                       'http://identifiers.org/chembl.compound/'),
        CurieNamespace('CHEMBL_MECHANISM',
                       'https://www.ebi.ac.uk/chembl/mechanism/inspect/'),
        CurieNamespace('CHEMBL_TARGET',
                       'http://identifiers.org/chembl.target/'),
        CurieNamespace('CID', 'http://pubchem.ncbi.nlm.nih.gov/compound/'),
        CurieNamespace('CL', 'http://purl.obolibrary.org/obo/CL_'),
        CurieNamespace('CLINVAR', 'http://identifiers.org/clinvar/'),
        CurieNamespace('CLO', 'http://purl.obolibrary.org/obo/CLO_'),
        CurieNamespace('COAR_RESOURCE', 'http://purl.org/coar/resource_type/'),
        CurieNamespace('CPT',
                       'https://www.ama-assn.org/practice-management/cpt/'),
        CurieNamespace('CTD', 'http://translator.ncats.nih.gov/CTD_'),
        CurieNamespace(
            'ChemBank',
            'http://chembank.broadinstitute.org/chemistry/viewMolecule.htm?cbid='
        ),
        CurieNamespace('ClinVarVariant',
                       'http://www.ncbi.nlm.nih.gov/clinvar/variation/'),
        CurieNamespace('DBSNP', 'http://identifiers.org/dbsnp/'),
        CurieNamespace('DGIdb', 'https://www.dgidb.org/interaction_types'),
        CurieNamespace('DOID', 'http://purl.obolibrary.org/obo/DOID_'),
        CurieNamespace('DRUGBANK', 'http://identifiers.org/drugbank/'),
        CurieNamespace('DrugCentral',
                       'http://translator.ncats.nih.gov/DrugCentral_'),
        CurieNamespace('EC', 'http://www.enzyme-database.org/query.php?ec='),
        CurieNamespace('ECTO', 'http://purl.obolibrary.org/obo/ECTO_'),
        CurieNamespace('EDAM-DATA', 'http://edamontology.org/data_'),
        CurieNamespace('EDAM-FORMAT', 'http://edamontology.org/format_'),
        CurieNamespace('EDAM-OPERATION', 'http://edamontology.org/operation_'),
        CurieNamespace('EDAM-TOPIC', 'http://edamontology.org/topic_'),
        CurieNamespace('EFO', 'http://www.ebi.ac.uk/efo/EFO_'),
        CurieNamespace('EGGNOG', 'http://identifiers.org/eggnog/'),
        CurieNamespace('ENSEMBL', 'http://identifiers.org/ensembl/'),
        CurieNamespace('ExO', 'http://purl.obolibrary.org/obo/ExO_'),
        CurieNamespace('FAO', 'http://purl.obolibrary.org/obo/FAO_'),
        CurieNamespace('FB', 'http://identifiers.org/fb/'),
        CurieNamespace('FBcv', 'http://purl.obolibrary.org/obo/FBcv_'),
        CurieNamespace('GAMMA', 'http://translator.renci.org/GAMMA_'),
        CurieNamespace('GO', 'http://purl.obolibrary.org/obo/GO_'),
        CurieNamespace('GOLD_META', 'http://identifiers.org/gold.meta/'),
        CurieNamespace('GOP', 'http://purl.obolibrary.org/obo/go#'),
        CurieNamespace('GOREL', 'http://purl.obolibrary.org/obo/GOREL_'),
        CurieNamespace('GSID', 'https://scholar.google.com/citations?user='******'GTEx', 'https://www.gtexportal.org/home/gene/'),
        CurieNamespace(
            'GTOPDB',
            'https://www.guidetopharmacology.org/GRAC/LigandDisplayForward?ligandId='
        ),
        CurieNamespace('HAMAP', 'http://identifiers.org/hamap/'),
        CurieNamespace('HANCESTRO', 'http://www.ebi.ac.uk/ancestro/ancestro_'),
        CurieNamespace('HCPCS', 'http://purl.bioontology.org/ontology/HCPCS/'),
        CurieNamespace('HGNC', 'http://identifiers.org/hgnc/'),
        CurieNamespace('HGNC_FAMILY', 'http://identifiers.org/hgnc.family/'),
        CurieNamespace('HMDB', 'http://identifiers.org/hmdb/'),
        CurieNamespace('HP', 'http://purl.obolibrary.org/obo/HP_'),
        CurieNamespace('HsapDv', 'http://purl.obolibrary.org/obo/HsapDv_'),
        CurieNamespace('ICD0', 'http://translator.ncats.nih.gov/ICD0_'),
        CurieNamespace('ICD10', 'http://translator.ncats.nih.gov/ICD10_'),
        CurieNamespace('ICD9', 'http://translator.ncats.nih.gov/ICD9_'),
        CurieNamespace('INCHI', 'http://identifiers.org/inchi/'),
        CurieNamespace('INCHIKEY', 'http://identifiers.org/inchikey/'),
        CurieNamespace('INO', 'http://purl.obolibrary.org/obo/INO_'),
        CurieNamespace('INTACT', 'http://identifiers.org/intact/'),
        CurieNamespace('IUPHAR_FAMILY',
                       'http://identifiers.org/iuphar.family/'),
        CurieNamespace('KEGG', 'http://identifiers.org/kegg/'),
        CurieNamespace('KEGG_BRITE', 'http://www.kegg.jp/entry/'),
        CurieNamespace('KEGG_COMPOUND',
                       'http://identifiers.org/kegg.compound/'),
        CurieNamespace('KEGG_DGROUP', 'http://www.kegg.jp/entry/'),
        CurieNamespace('KEGG_DISEASE', 'http://identifiers.org/kegg.disease/'),
        CurieNamespace('KEGG_DRUG', 'http://identifiers.org/kegg.drug/'),
        CurieNamespace('KEGG_ENVIRON', 'http://identifiers.org/kegg.environ/'),
        CurieNamespace('KEGG_ENZYME', 'http://www.kegg.jp/entry/'),
        CurieNamespace('KEGG_GENE', 'http://www.kegg.jp/entry/'),
        CurieNamespace('KEGG_GLYCAN', 'http://identifiers.org/kegg.glycan/'),
        CurieNamespace('KEGG_MODULE', 'http://identifiers.org/kegg.module/'),
        CurieNamespace('KEGG_ORTHOLOGY',
                       'http://identifiers.org/kegg.orthology/'),
        CurieNamespace('KEGG_RCLASS', 'http://www.kegg.jp/entry/'),
        CurieNamespace('KEGG_REACTION',
                       'http://identifiers.org/kegg.reaction/'),
        CurieNamespace('LOINC', 'http://loinc.org/rdf/'),
        CurieNamespace('MEDDRA', 'http://identifiers.org/meddra/'),
        CurieNamespace('MESH', 'http://identifiers.org/mesh/'),
        CurieNamespace('MGI', 'http://identifiers.org/mgi/'),
        CurieNamespace('MI', 'http://purl.obolibrary.org/obo/MI_'),
        CurieNamespace('MIR', 'http://identifiers.org/mir/'),
        CurieNamespace('MONDO', 'http://purl.obolibrary.org/obo/MONDO_'),
        CurieNamespace('MP', 'http://purl.obolibrary.org/obo/MP_'),
        CurieNamespace('MSigDB', 'https://www.gsea-msigdb.org/gsea/msigdb/'),
        CurieNamespace('MetaCyc', 'http://translator.ncats.nih.gov/MetaCyc_'),
        CurieNamespace('NCBIGENE', 'http://identifiers.org/ncbigene/'),
        CurieNamespace('NCBITaxon',
                       'http://purl.obolibrary.org/obo/NCBITaxon_'),
        CurieNamespace('NCIT', 'http://purl.obolibrary.org/obo/NCIT_'),
        CurieNamespace('NDC', 'http://identifiers.org/ndc/'),
        CurieNamespace('NDDF', 'http://purl.bioontology.org/ontology/NDDF/'),
        CurieNamespace('NLMID',
                       'https://www.ncbi.nlm.nih.gov/nlmcatalog/?term='),
        CurieNamespace('OBAN', 'http://purl.org/oban/'),
        CurieNamespace('OBOREL', 'http://purl.obolibrary.org/obo/RO_'),
        CurieNamespace('OIO', 'http://www.geneontology.org/formats/oboInOwl#'),
        CurieNamespace('OMIM', 'http://purl.obolibrary.org/obo/OMIM_'),
        CurieNamespace('ORCID', 'https://orcid.org/'),
        CurieNamespace('ORPHA', 'http://www.orpha.net/ORDO/Orphanet_'),
        CurieNamespace('ORPHANET', 'http://identifiers.org/orphanet/'),
        CurieNamespace('PANTHER_FAMILY',
                       'http://identifiers.org/panther.family/'),
        CurieNamespace('PANTHER_PATHWAY',
                       'http://identifiers.org/panther.pathway/'),
        CurieNamespace('PATO', 'http://purl.obolibrary.org/obo/PATO_'),
        CurieNamespace('PATO-PROPERTY',
                       'http://purl.obolibrary.org/obo/pato#'),
        CurieNamespace('PDQ', 'https://www.cancer.gov/publications/pdq#'),
        CurieNamespace('PFAM', 'http://identifiers.org/pfam/'),
        CurieNamespace('PHARMGKB_DRUG',
                       'http://identifiers.org/pharmgkb.drug/'),
        CurieNamespace('PHARMGKB_PATHWAYS',
                       'http://identifiers.org/pharmgkb.pathways/'),
        CurieNamespace('PHAROS', 'http://pharos.nih.gov'),
        CurieNamespace('PIRSF', 'http://identifiers.org/pirsf/'),
        CurieNamespace('PMID', 'http://www.ncbi.nlm.nih.gov/pubmed/'),
        CurieNamespace('PO', 'http://purl.obolibrary.org/obo/PO_'),
        CurieNamespace('POMBASE', 'http://identifiers.org/pombase/'),
        CurieNamespace('PR', 'http://purl.obolibrary.org/obo/PR_'),
        CurieNamespace('PRINTS', 'http://identifiers.org/prints/'),
        CurieNamespace('PRODOM', 'http://identifiers.org/prodom/'),
        CurieNamespace('PROSITE', 'http://identifiers.org/prosite/'),
        CurieNamespace('PUBCHEM_COMPOUND',
                       'http://identifiers.org/pubchem.compound/'),
        CurieNamespace('PUBCHEM_SUBSTANCE',
                       'http://identifiers.org/pubchem.substance/'),
        CurieNamespace('PathWhiz', 'http://smpdb.ca/pathways/#'),
        CurieNamespace('REACT', 'http://www.reactome.org/PathwayBrowser/#/'),
        CurieNamespace('REPODB', 'http://apps.chiragjpgroup.org/repoDB/'),
        CurieNamespace('RFAM', 'http://identifiers.org/rfam/'),
        CurieNamespace('RGD', 'http://identifiers.org/rgd/'),
        CurieNamespace('RHEA', 'http://identifiers.org/rhea/'),
        CurieNamespace('RNACENTRAL', 'http://identifiers.org/rnacentral/'),
        CurieNamespace('RO', 'http://purl.obolibrary.org/obo/RO_'),
        CurieNamespace('RTXKG1', 'http://kg1endpoint.rtx.ai/'),
        CurieNamespace(
            'RXCUI',
            'https://mor.nlm.nih.gov/RxNav/search?searchBy=RXCUI&searchTerm='),
        CurieNamespace('RXNORM',
                       'http://purl.bioontology.org/ontology/RXNORM/'),
        CurieNamespace('ResearchID', 'https://publons.com/researcher/'),
        CurieNamespace('SEMMEDDB', 'https://skr3.nlm.nih.gov/SemMedDB'),
        CurieNamespace('SGD', 'http://identifiers.org/sgd/'),
        CurieNamespace('SIDER_DRUG', 'http://identifiers.org/sider.drug/'),
        CurieNamespace('SIO', 'http://semanticscience.org/resource/SIO_'),
        CurieNamespace('SMART', 'http://identifiers.org/smart/'),
        CurieNamespace('SMPDB', 'http://identifiers.org/smpdb/'),
        CurieNamespace('SNOMEDCT', 'http://identifiers.org/snomedct/'),
        CurieNamespace('SNPEFF', 'http://translator.ncats.nih.gov/SNPEFF_'),
        CurieNamespace('SUPFAM', 'http://identifiers.org/supfam/'),
        CurieNamespace('ScopusID',
                       'https://www.scopus.com/authid/detail.uri?authorId='),
        CurieNamespace('TAXRANK', 'http://purl.obolibrary.org/obo/TAXRANK_'),
        CurieNamespace('TCDB', 'http://identifiers.org/tcdb/'),
        CurieNamespace('TIGRFAM', 'http://identifiers.org/tigrfam/'),
        CurieNamespace('UBERGRAPH',
                       'http://translator.renci.org/ubergraph-axioms.ofn#'),
        CurieNamespace('UBERON', 'http://purl.obolibrary.org/obo/UBERON_'),
        CurieNamespace('UBERON_CORE',
                       'http://purl.obolibrary.org/obo/uberon/core#'),
        CurieNamespace('UMLS', 'http://identifiers.org/umls/'),
        CurieNamespace(
            'UMLSSC',
            'https://metamap.nlm.nih.gov/Docs/SemanticTypes_2018AB.txt/code#'),
        CurieNamespace(
            'UMLSSG',
            'https://metamap.nlm.nih.gov/Docs/SemGroups_2018.txt/group#'),
        CurieNamespace(
            'UMLSST',
            'https://metamap.nlm.nih.gov/Docs/SemanticTypes_2018AB.txt/type#'),
        CurieNamespace('UNII', 'http://identifiers.org/unii/'),
        CurieNamespace('UNIPROT_ISOFORM',
                       'http://identifiers.org/uniprot.isoform/'),
        CurieNamespace('UO', 'http://purl.obolibrary.org/obo/UO_'),
        CurieNamespace('UPHENO', 'http://purl.obolibrary.org/obo/UPHENO_'),
        CurieNamespace('UniProtKB', 'http://identifiers.org/uniprot/'),
        CurieNamespace(
            'VANDF',
            'https://www.nlm.nih.gov/research/umls/sourcereleasedocs/current/VANDF/'
        ),
        CurieNamespace('VMC', 'https://github.com/ga4gh/vr-spec/'),
        CurieNamespace('WB', 'http://identifiers.org/wb/'),
        CurieNamespace('WBPhenotype',
                       'http://purl.obolibrary.org/obo/WBPhenotype_'),
        CurieNamespace('WBVocab', 'http://bio2rdf.org/wormbase_vocabulary'),
        CurieNamespace('WIKIDATA', 'https://www.wikidata.org/wiki/'),
        CurieNamespace('WIKIDATA_PROPERTY',
                       'https://www.wikidata.org/wiki/Property:'),
        CurieNamespace('WIKIPATHWAYS', 'http://identifiers.org/wikipathways/'),
        CurieNamespace('WormBase', 'https://www.wormbase.org/get?name='),
        CurieNamespace('ZFIN', 'http://identifiers.org/zfin/'),
        CurieNamespace('ZP', 'http://purl.obolibrary.org/obo/ZP_'),
        CurieNamespace('alliancegenome', 'https://www.alliancegenome.org/'),
        CurieNamespace('biolink', 'https://w3id.org/biolink/vocab/'),
        CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/'),
        CurieNamespace('chembio', 'http://translator.ncats.nih.gov/chembio_'),
        CurieNamespace('dcat', 'http://www.w3.org/ns/dcat#'),
        CurieNamespace('dct', 'http://purl.org/dc/terms/'),
        CurieNamespace('dictyBase', 'http://dictybase.org/gene/'),
        CurieNamespace('doi', 'https://doi.org/'),
        CurieNamespace('fabio', 'http://purl.org/spar/fabio/'),
        CurieNamespace('foaf', 'http://xmlns.com/foaf/0.1/'),
        CurieNamespace('foodb_compound', 'http://foodb.ca/compounds/'),
        CurieNamespace(
            'gff3',
            'https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md#'
        ),
        CurieNamespace(
            'gpi',
            'https://github.com/geneontology/go-annotation/blob/master/specs/gpad-gpi-2-0.md#'
        ),
        CurieNamespace('gtpo', 'https://rdf.guidetopharmacology.org/ns/gtpo#'),
        CurieNamespace('hetio', 'http://translator.ncats.nih.gov/hetio_'),
        CurieNamespace('interpro', 'https://www.ebi.ac.uk/interpro/entry/'),
        CurieNamespace('isbn',
                       'https://www.isbn-international.org/identifier/'),
        CurieNamespace('isni', 'https://isni.org/isni/'),
        CurieNamespace('issn', 'https://portal.issn.org/resource/ISSN/'),
        CurieNamespace('medgen', 'https://www.ncbi.nlm.nih.gov/medgen/'),
        CurieNamespace('oboformat',
                       'http://www.geneontology.org/formats/oboInOWL#'),
        CurieNamespace('pav', 'http://purl.org/pav/'),
        CurieNamespace('prov', 'http://www.w3.org/ns/prov#'),
        CurieNamespace('qud', 'http://qudt.org/1.1/schema/qudt#'),
        CurieNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'),
        CurieNamespace('rdfs', 'http://www.w3.org/2000/01/rdf-schema#'),
        CurieNamespace('schema', 'http://schema.org/'),
        CurieNamespace('skos', 'https://www.w3.org/TR/skos-reference/#'),
        CurieNamespace('wgs', 'http://www.w3.org/2003/01/geo/wgs84_pos'),
        CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#'),
    ]

    # class level dictionaries

    _prefix_map: Dict[str, CurieNamespace] = {}

    @classmethod
    def _get_prefix_map(cls):
        if not cls._prefix_map:
            for ns in cls._namespaces:
                # index by upper case for uniformity of search
                cls._prefix_map[ns.prefix.upper()] = ns
        return cls._prefix_map

    @classmethod
    def parse_curie(cls, curie: str) -> Tuple[CurieNamespace, str]:
        """
        Parse a candidate CURIE
        :param curie: candidate curie string
        :return: CURIE namespace and object_id
        """
        found = CurieNamespace(
            "",
            ""), curie  # default value if not a CURIE or unknown XMLNS prefix
        if ':' in curie:
            part = curie.split(":")
            # Normalize retrieval with upper case of prefix for lookup
            prefix = part[0].upper()
            if prefix in cls._get_prefix_map():
                found = cls._prefix_map[prefix], part[1]
        return found

    @classmethod
    def parse_uri(cls, uri: str) -> Tuple[CurieNamespace, str]:
        """
        Parse a candidate URI
        :param uri: candidate URI string
        :return: namespace and object_id
        """
        found = CurieNamespace(
            "", ""), uri  # default value returned if unknown URI namespace

        # TODO: is there a more efficient lookup scheme here than a linear search of namespaces?
        for ns in cls._namespaces:
            base_uri = str(ns)
            if uri.startswith(base_uri):
                # simple minded deletion of base_uri to give the object_id
                object_id = uri.replace(base_uri, "")
                found = ns, object_id
                break
        return found

    @classmethod
    def parse_identifier(cls, identifier: str) -> Tuple[CurieNamespace, str]:

        # trivial case of a null identifier?
        if not identifier:
            return CurieNamespace("", ""), ""

        # check if this is a candidate URI...
        if identifier.lower().startswith("http"):
            # guess that perhaps it is, so try to parse it
            return cls.parse_uri(identifier)

        else:  # attempt to parse as a CURIE
            return cls.parse_curie(identifier)
Esempio n. 21
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from includes.types import String

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
DEFAULT_ = CurieNamespace('', 'https://microbiomedata/schema/')

# Types

# Class references


@dataclass
class Biosample(YAMLRoot):
    _inherited_slots: ClassVar[List[str]] = []

    class_class_uri: ClassVar[URIRef] = URIRef(
        "https://microbiomedata/schema/Biosample")
    class_class_curie: ClassVar[str] = None
    class_name: ClassVar[str] = "biosample"
Esempio n. 22
0
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import URIorCURIE
from includes.types import String, Uriorcurie

metamodel_version = "1.6.1"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
META = CurieNamespace('meta', 'https://w3id.org/biolink/biolinkml/meta/')
DEFAULT_ = META

# Types

# Class references


@dataclass
class Extension(YAMLRoot):
    """
    a tag/value pair used to add non-model information to an entry
    """
    _inherited_slots: ClassVar[List[str]] = []
Esempio n. 23
0
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from biolinkml.utils.enumerations import EnumDefinitionImpl
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import ElementIdentifier
from includes.types import Integer, Objectidentifier, String

metamodel_version = "1.7.0"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINK = CurieNamespace('biolink', 'https://w3id.org/biolink/vocab/')
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
EX = CurieNamespace('ex', 'http://example.org/')
MODEL = CurieNamespace('model', 'https://w3id.org/biolink/')
DEFAULT_ = BIOLINK

# Types


# Class references
class PersonId(ElementIdentifier):
    pass


@dataclass
class Person(YAMLRoot):
Esempio n. 24
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from includes.types import String

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
TYPES = CurieNamespace('types', 'https://ccdh.org/datatypes/')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = TYPES


# Types
class Literal(String):
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "literal"
    type_model_uri = TYPES.Literal


# Class references
Esempio n. 25
0
from ..core.filters import FilterComponent
from ..core.localidentifiers import CodeSystemName
from ..core.references import CodeSystemReference, CodeSystemReferenceName, CodeSystemVersionReference, CodeSystemVersionReferenceName, FormatReference, FormatReferenceName, LanguageReference, LanguageReferenceName, MapReference, MapReferenceName, MatchAlgorithmReference, MatchAlgorithmReferenceName, NameAndMeaningReference, NameAndMeaningReferenceName, OntologyLanguageReference, OntologyLanguageReferenceName, OntologySyntaxReference, OntologySyntaxReferenceName, PredicateReference, RoleReference, RoleReferenceName, ValueSetDefinitionReference, ValueSetDefinitionReferenceName, ValueSetReference, ValueSetReferenceName, VersionTagReference, VersionTagReferenceName
from ..core.resourcedescription import SourceAndNotation
from ..core.uritypes import DocumentURI, ExternalURI, LocalURI, PersistentURI, RenderingURI
from biolinkml.utils.metamodelcore import Bool, URIorCURIE, XSDDateTime
from includes.types import Boolean, String
from valuesetdefinition import AssociatedEntitiesReference, CompleteCodeSystemReference, CompleteValueSetReference, ExternalValueSetDefinition, FormalDefinition, PropertyQueryReference, SpecificEntityList, SpecificEntityListNamespaceURI, ValueSetDefinitionEntry

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
BIOLINKML = CurieNamespace('biolinkml', 'https://w3id.org/biolink/biolinkml/')
RDF = CurieNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#')
TCCM = CurieNamespace('tccm', 'https://hotecosystem.org/tccm/')
DEFAULT_ = TCCM

# Types

# Class references


@dataclass
class ResolvedValueSetHeader(YAMLRoot):
    """
    The information required to completely resolve a value set definition.
    """
Esempio n. 26
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import Bool, ElementIdentifier, NCName, NodeIdentifier, URI, URIorCURIE, XSDDate, XSDDateTime, XSDTime

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
METATYPE = CurieNamespace('metatype',
                          'https://w3id.org/biolink/biolinkml/meta/types/')
SHEX = CurieNamespace('shex', 'http://www.w3.org/ns/shex#')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = METATYPE


# Types
class String(str):
    """ A character string """
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
    type_model_uri = METATYPE.String


class Integer(int):
Esempio n. 27
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from includes.types import String

metamodel_version = "1.6.1"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
META = CurieNamespace('meta', 'https://w3id.org/biolink/biolinkml/')
DEFAULT_ = CurieNamespace('', 'https://example.com/test14/')

# Types


# Class references
class NamedThingId(extended_str):
    pass


class MixinOwnerId(NamedThingId):
    pass


class SubjectRange1Id(NamedThingId):
Esempio n. 28
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import URIorCURIE

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
TCCM = CurieNamespace('tccm', 'https://hotecosystem.org/tccm/')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = TCCM


# Types
class ValueSet(URIorCURIE):
    """ A URI that can be indirectly resolved to a set of entity descriptions """
    type_class_uri = XSD.anyURI
    type_class_curie = "xsd:anyURI"
    type_name = "ValueSet"
    type_model_uri = TCCM.ValueSet


class ASSOCIATION(ValueSet):
    """ A formal “semantic” assertion about a named entity, in the form of subject, predicate, and object including any
Esempio n. 29
0
from biolinkml.utils.yamlutils import YAMLRoot, extended_str, extended_float, extended_int
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
XSD = CurieNamespace('xsd', 'http://example.org/UNKNOWN/xsd/')
DEFAULT_ = CurieNamespace('', 'https://issue_test/106/schema/')


# Types
class String(str):
    """ A character string """
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
    type_model_uri = URIRef("https://issue_test/106/schema/String")


# Class references

Esempio n. 30
0
if sys.version_info < (3, 7, 6):
    from biolinkml.utils.dataclass_extensions_375 import dataclasses_init_fn_with_kwargs
else:
    from biolinkml.utils.dataclass_extensions_376 import dataclasses_init_fn_with_kwargs
from biolinkml.utils.formatutils import camelcase, underscore, sfx
from rdflib import Namespace, URIRef
from biolinkml.utils.curienamespace import CurieNamespace
from biolinkml.utils.metamodelcore import Bool, ElementIdentifier, NCName, NodeIdentifier, URI, URIorCURIE, XSDDate, XSDDateTime, XSDTime

metamodel_version = "1.5.3"

# Overwrite dataclasses _init_fn to add **kwargs in __init__
dataclasses._init_fn = dataclasses_init_fn_with_kwargs

# Namespaces
SHEX = CurieNamespace('shex', 'http://www.w3.org/ns/shex#')
SKOS = CurieNamespace('skos', 'http://www.w3.org/2004/02/skos/core#')
TEST = CurieNamespace('test', 'http://example.org/test/')
XSD = CurieNamespace('xsd', 'http://www.w3.org/2001/XMLSchema#')
DEFAULT_ = TEST


# Types
class String(str):
    """ A character string """
    type_class_uri = XSD.string
    type_class_curie = "xsd:string"
    type_name = "string"
    type_model_uri = TEST.String