|
Revision 98, 1.3 kB
(checked in by phil, 11 months ago)
|
|
This reflects a change of all Descriptor names from a prefix of rdflib to rdf
This fixes improves the behavior of Literal for Decimal and datetime types
It also moves rdfSubject into a different file name
adds one unit test for literals
|
| Line | |
|---|
| 1 | |
|---|
| 2 | from rdflib import Literal, BNode, Namespace, URIRef |
|---|
| 3 | |
|---|
| 4 | # this has the rdfSubject stuff and the Fresnel stuff |
|---|
| 5 | from rdfalchemy import * |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | ov = Namespace("http://owl.openvest.org/2005/10/Portfolio#") |
|---|
| 9 | edgarns = Namespace('http://www.sec.gov/Archives/edgar') |
|---|
| 10 | |
|---|
| 11 | class Company(rdfSubject): |
|---|
| 12 | rdf_type = ov.Company |
|---|
| 13 | symbol = rdfSingle(ov.symbol,) |
|---|
| 14 | cik = rdfSingle(ov.secCik,'cik') |
|---|
| 15 | companyName = rdfSingle(ov.companyName,'companyName') |
|---|
| 16 | stockDescription = rdfSingle(ov.stockDescription,'stockDescription') |
|---|
| 17 | stock = rdfMultiple(ov.hasIssue) |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | class EdgarFiling(rdfSubject): |
|---|
| 22 | rdf_type = edgarns.xbrlFiling |
|---|
| 23 | accessionNumber = rdfSingle(edgarns.accessionNumber) |
|---|
| 24 | companyName = rdfSingle(edgarns.companyName) |
|---|
| 25 | filingDate = rdfSingle(edgarns.filingDate) |
|---|
| 26 | formType = rdfSingle(edgarns.formType) |
|---|
| 27 | |
|---|