Skip to content

Commit 353b112

Browse files
foisysandreasprlic
authored andcommitted
Man, tables take a long time to do in Mediawiki
1 parent cf352d2 commit 353b112

File tree

2 files changed

+155
-53
lines changed

2 files changed

+155
-53
lines changed

_wikis/BioJava:BioJavaXDocs.md

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,29 +2171,38 @@ second is the mapping name to be used in HQL to query the table, and the
21712171
third column is the class of object you will get when the query returns
21722172
results:
21732173

2174-
Table 19.1. Hibernate object-relational mappings. biodatabase Namespace
2175-
SimpleNamespace taxon Taxon SimpleNCBITaxon bioentry BioEntry
2176-
SimpleBioEntry taxon\_name (use properties of NCBITaxon)
2177-
SimpleNCBITaxonName biosequence (including the sequence data) Sequence
2178-
SimpleRichSequence biosequence (excluding the sequence data)
2179-
ThinSequence ThinRichSequence bioentry\_relationship
2180-
BioEntryRelationship SimpleBioEntryRelationship comment Comment
2181-
SimpleComment dbxref CrossRef SimpleCrossRef bioentry\_dbxref (use
2182-
properties of BioEntry) SimpleRankedCrossRef reference DocRef
2183-
SimpleDocRef bioentry\_reference (use properties of BioEntry)
2184-
SimpleRankedDocRef dbxref\_qualifer\_value (use properties of CrossRef)
2185-
SimpleNote bioentry\_qualifier\_value (use properties of BioEntry)
2186-
SimpleNote ontology Ontology ComparableOntology term Term ComparableTerm
2187-
term\_relationship Triple ComparableTriple term\_synonym (use properties
2188-
of Term) String term\_dbxref (use properties of Term)
2189-
SimpleRankedCrossRef seqfeature Feature SimpleRichFeature
2190-
seqfeature\_qualifier\_value (use properties of Feature) SimpleNote
2191-
seqfeature\_dbxref (use properties of Feature) SimpleRankedCrossRef
2192-
seqfeature\_relationship FeatureRelationship
2193-
SimpleRichFeatureRelationship location Location SimpleRichLocation,
2194-
CompoundRichLocation, or EmptyRichLocation location\_qualifier\_value
2195-
(use properties of Location) SimpleNote seqfeature\_path - -
2196-
bioentry\_path - - term\_path - -
2174+
Table 19.1. Hibernate object-relational mappings.
2175+
2176+
| BioSQL Table Name | HQL Name to use | Type of returned object |
2177+
|-------------------------------------------|-------------------------------|----------------------------------------------------------------|
2178+
| biodatabase | Namespace | SimpleNamespace |
2179+
| taxon | Taxon | SimpleNCBITaxon |
2180+
| bioentry | BioEntry | SimpleBioEntry |
2181+
| taxon\_name | (use properties of NCBITaxon) | SimpleNCBITaxonName |
2182+
| biosequence (including the sequence data) | Sequence | SimpleRichSequence |
2183+
| biosequence (excluding the sequence data) | ThinSequence | ThinRichSequence |
2184+
| bioentry\_relationship | BioEntryRelationship | SimpleBioEntryRelationship |
2185+
| comment | Comment | SimpleComment |
2186+
| dbxref | CrossRef | SimpleCrossRef |
2187+
| bioentry\_dbxref | (use properties of BioEntry) | SimpleRankedCrossRef |
2188+
| reference | DocRef | SimpleDocRef |
2189+
| bioentry\_reference | (use properties of BioEntry) | SimpleRankedDocRef |
2190+
| dbxref\_qualifer\_value | (use properties of CrossRef) | SimpleNote |
2191+
| bioentry\_qualifier\_value | (use properties of BioEntry) | SimpleNote |
2192+
| ontology | Ontology | ComparableOntology |
2193+
| term | Term | ComparableTerm |
2194+
| term\_relationship | Triple | ComparableTriple |
2195+
| term\_synonym | (use properties of Term) | String |
2196+
| term\_dbxref | (use properties of Term) | SimpleRankedCrossRef |
2197+
| seqfeature | Feature | SimpleRichFeature |
2198+
| seqfeature\_qualifier\_value | (use properties of Feature) | SimpleNote |
2199+
| seqfeature\_dbxref | (use properties of Feature) | SimpleRankedCrossRef |
2200+
| seqfeature\_relationship | FeatureRelationship | SimpleRichFeatureRelationship |
2201+
| location | Location | SimpleRichLocation, CompoundRichLocation, or EmptyRichLocation |
2202+
| location\_qualifier\_value | (use properties of Location) | SimpleNote |
2203+
| seqfeature\_path | nil | nil |
2204+
| bioentry\_path | nil | nil |
2205+
| term\_path | nil | nil |
21972206

21982207
### Configuring your application to use Hibernate and BioSQL.
21992208

@@ -2234,9 +2243,11 @@ to one of the following places:
22342243
To configure Hibernate, you must edit the copy you made of the
22352244
hibernate.cfg.xml file. Near the top is a section that looks like this:
22362245

2246+
<xml>
22372247
<property name="connection.datasource">java:comp/env/jdbc/YOUR\_JNDI\_DATASOURCE\_GOES\_HERE</property>
22382248

2239-
The exact details will vary according to which database you are using.
2249+
</xml> The exact details will vary according to which database you are
2250+
using.
22402251

22412252
You will see that the default way of using Hibernate is through a JNDI
22422253
datasource, usually supplied by a servlet container such as Tomcat. In

_wikis/BioJava:BioJavaXDocs.mediawiki

Lines changed: 120 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,34 +1292,124 @@ Queries are constructed not using SQL but using the Hibernate Query Language, or
12921292
The following table describes which object in BioJavaX ends up in which table in BioSQL. The first column is the name of the BioSQL table, the second is the mapping name to be used in HQL to query the table, and the third column is the class of object you will get when the query returns results:
12931293

12941294
Table 19.1. Hibernate object-relational mappings.
1295-
biodatabase Namespace SimpleNamespace
1296-
taxon Taxon SimpleNCBITaxon
1297-
bioentry BioEntry SimpleBioEntry
1298-
taxon_name (use properties of NCBITaxon) SimpleNCBITaxonName
1299-
biosequence (including the sequence data) Sequence SimpleRichSequence
1300-
biosequence (excluding the sequence data) ThinSequence ThinRichSequence
1301-
bioentry_relationship BioEntryRelationship SimpleBioEntryRelationship
1302-
comment Comment SimpleComment
1303-
dbxref CrossRef SimpleCrossRef
1304-
bioentry_dbxref (use properties of BioEntry) SimpleRankedCrossRef
1305-
reference DocRef SimpleDocRef
1306-
bioentry_reference (use properties of BioEntry) SimpleRankedDocRef
1307-
dbxref_qualifer_value (use properties of CrossRef) SimpleNote
1308-
bioentry_qualifier_value (use properties of BioEntry) SimpleNote
1309-
ontology Ontology ComparableOntology
1310-
term Term ComparableTerm
1311-
term_relationship Triple ComparableTriple
1312-
term_synonym (use properties of Term) String
1313-
term_dbxref (use properties of Term) SimpleRankedCrossRef
1314-
seqfeature Feature SimpleRichFeature
1315-
seqfeature_qualifier_value (use properties of Feature) SimpleNote
1316-
seqfeature_dbxref (use properties of Feature) SimpleRankedCrossRef
1317-
seqfeature_relationship FeatureRelationship SimpleRichFeatureRelationship
1318-
location Location SimpleRichLocation, CompoundRichLocation, or EmptyRichLocation
1319-
location_qualifier_value (use properties of Location) SimpleNote
1320-
seqfeature_path - -
1321-
bioentry_path - -
1322-
term_path - -
1295+
{|border="1" cellpadding="2"
1296+
!width="200"|BioSQL Table Name
1297+
!width="200"|HQL Name to use
1298+
!width="200"|Type of returned object
1299+
|-
1300+
|biodatabase
1301+
|Namespace
1302+
|SimpleNamespace
1303+
|-
1304+
|taxon
1305+
|Taxon
1306+
|SimpleNCBITaxon
1307+
|-
1308+
|bioentry
1309+
|BioEntry
1310+
|SimpleBioEntry
1311+
|-
1312+
|taxon_name
1313+
|(use properties of NCBITaxon)
1314+
|SimpleNCBITaxonName
1315+
|-
1316+
|biosequence (including the sequence data)
1317+
|Sequence
1318+
|SimpleRichSequence
1319+
|-
1320+
|biosequence (excluding the sequence data)
1321+
|ThinSequence
1322+
|ThinRichSequence
1323+
|-
1324+
|bioentry_relationship
1325+
|BioEntryRelationship
1326+
|SimpleBioEntryRelationship
1327+
|-
1328+
|comment
1329+
|Comment
1330+
|SimpleComment
1331+
|-
1332+
|dbxref
1333+
|CrossRef
1334+
|SimpleCrossRef
1335+
|-
1336+
|bioentry_dbxref
1337+
|(use properties of BioEntry)
1338+
|SimpleRankedCrossRef
1339+
|-
1340+
|reference
1341+
|DocRef
1342+
|SimpleDocRef
1343+
|-
1344+
|bioentry_reference
1345+
|(use properties of BioEntry)
1346+
|SimpleRankedDocRef
1347+
|-
1348+
|dbxref_qualifer_value
1349+
|(use properties of CrossRef)
1350+
|SimpleNote
1351+
|-
1352+
|bioentry_qualifier_value
1353+
|(use properties of BioEntry)
1354+
|SimpleNote
1355+
|-
1356+
|ontology
1357+
|Ontology
1358+
|ComparableOntology
1359+
|-
1360+
|term
1361+
|Term
1362+
|ComparableTerm
1363+
|-
1364+
|term_relationship
1365+
|Triple
1366+
|ComparableTriple
1367+
|-
1368+
|term_synonym
1369+
|(use properties of Term)
1370+
|String
1371+
|-
1372+
|term_dbxref
1373+
|(use properties of Term)
1374+
|SimpleRankedCrossRef
1375+
|-
1376+
|seqfeature
1377+
|Feature
1378+
|SimpleRichFeature
1379+
|-
1380+
|seqfeature_qualifier_value
1381+
|(use properties of Feature)
1382+
|SimpleNote
1383+
|-
1384+
|seqfeature_dbxref
1385+
|(use properties of Feature)
1386+
|SimpleRankedCrossRef
1387+
|-
1388+
|seqfeature_relationship
1389+
|FeatureRelationship
1390+
|SimpleRichFeatureRelationship
1391+
|-
1392+
|location
1393+
|Location
1394+
|SimpleRichLocation, CompoundRichLocation, or EmptyRichLocation
1395+
|-
1396+
|location_qualifier_value
1397+
|(use properties of Location)
1398+
|SimpleNote
1399+
|-
1400+
|seqfeature_path
1401+
|nil
1402+
|nil
1403+
|-
1404+
|bioentry_path
1405+
|nil
1406+
|nil
1407+
|-
1408+
|term_path
1409+
|nil
1410+
|nil
1411+
|}
1412+
13231413

13241414
=== Configuring your application to use Hibernate and BioSQL. ===
13251415

@@ -1354,6 +1444,7 @@ You will find the mapping files in the source package org.biojavax.bio.seq.db.bi
13541444

13551445
To configure Hibernate, you must edit the copy you made of the hibernate.cfg.xml file. Near the top is a section that looks like this:
13561446

1447+
<xml>
13571448
<property name="connection.datasource">java:comp/env/jdbc/YOUR_JNDI_DATASOURCE_GOES_HERE</property>
13581449

13591450
<!-- OR... (for testing only)...
@@ -1363,7 +1454,7 @@ To configure Hibernate, you must edit the copy you made of the hibernate.cfg.xml
13631454
<property name="connection.password">MYPASSWORD</property>
13641455
<property name="connection.pool_size">20</property>
13651456
-->
1366-
1457+
</xml>
13671458
The exact details will vary according to which database you are using.
13681459

13691460
You will see that the default way of using Hibernate is through a JNDI datasource, usually supplied by a servlet container such as Tomcat. In this case, you should modify the connection.datasource parameter to reflect the name of your JNDI datasource.

0 commit comments

Comments
 (0)