Permalink
Browse files

Introduced special extention 'attic' which by default does not appear…

… unless explicityl addressed.
  • Loading branch information...
1 parent fcd6620 commit 5fe2fe433b99f70717022f6e84cf76823af3b088 @RichardWallis RichardWallis committed Aug 25, 2016
Showing with 142 additions and 81 deletions.
  1. +1 −0 RELEASING.TXT
  2. +16 −5 api.py
  3. +2 −0 apirdflib.py
  4. +2 −1 app.yaml
  5. +24 −0 data/ext/attic/attic.rdfa
  6. +7 −0 data/extdefs.jsonld
  7. +10 −10 docs/schemaorg.css
  8. +1 −1 scripts/buildreleasefiles.sh
  9. +15 −4 scripts/exportgraphs.py
  10. +58 −57 sdoapp.py
  11. +1 −1 templates/basicPageHeader.tpl
  12. +5 −2 templates/schemas.tpl
View
@@ -69,6 +69,7 @@ First copy snapshot into place:
* curl http://localhost:8080/version/latest/> data/releases/2.2/schema-all.html
Then generate N-Triples etc. versions:
+* Ensure that the EXTENTIONS variable at the top of the script 'scripts/buildreleasefiles.sh' contains all the extensions for this release.
* scripts/buildreleasefiles.sh 3.1 - Check listed extensions is correct update if not
* Inspect snapshot, add to git and push to repo.
View
@@ -266,13 +266,24 @@ def get(self, key,cache=None):
PageStore = None
HeaderStore = None
-log.info("NDB PageStore & HeaderStore enabled: %s" % NDBPAGESTORE)
+log.info("NDB PageStore & HeaderStore available: %s" % NDBPAGESTORE)
+
+def enablePageStore(state):
+ global PageStore,HeaderStore
+ if state:
+ log.info("Enabling NDB")
+ PageStore = PageStoreTool()
+ HeaderStore = HeaderStoreTool()
+ else:
+ log.info("Disabling NDB")
+ PageStore = DataCacheTool()
+ HeaderStore = DataCacheTool()
+
if NDBPAGESTORE:
- PageStore = PageStoreTool()
- HeaderStore = HeaderStoreTool()
+ enablePageStore(True)
else:
- PageStore = DataCacheTool()
- HeaderStore = DataCacheTool()
+ enablePageStore(False)
+
View
@@ -37,8 +37,10 @@ def loadNss():
global revNss
if not NSSLoaded:
NSSLoaded = True
+ log.info("allLayersList: %s"% allLayersList)
for i in allLayersList:
if i != "core":
+ log.info("Setting %s to %s" % (i, "http://%s.schema.org/" % i))
nss.update({i:"http://%s.schema.org/" % i})
revNss = {v: k for k, v in nss.items()}
View
@@ -1,5 +1,6 @@
#application: schemaorgae
-application: webschemas
+#application: webschemas
+application: sdo-rjwtest1
version: 1
runtime: python27
@@ -0,0 +1,24 @@
+<div>
+<!-- Attic area -->
+
+<!-- Terms removed from coore or extentions - usual reason being deprication or unsuccesful in pending -->
+
+
+ <div resource="http://attic.schema.org/">
+ </div>
+
+ <div typeof="rdfs:Class" resource="http://schema.org/StupidType">
+ <link property="http://schema.org/isPartOf" href="http://attic.schema.org" />
+ <span class="h" property="rdfs:label">StupidType</span>
+ <span property="rdfs:comment">A StupidType for testing.</span>
+ <span>Subclass of: <a property="rdfs:subClassOf" href="http://schema.org/Thing">Thing</a></span>
+ </div>
+ <div typeof="rdf:Property" resource="http://schema.org/StupidProperty">
+ <link property="http://schema.org/isPartOf" href="http://attic.schema.org" />
+ <span class="h" property="rdfs:label">StupidProperty</span>
+ <span property="rdfs:comment">This is a StupidProperty! - for testing only</span>
+ <span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/StupidType">StupidType</a></span>
+ <span>Domain: <a property="http://schema.org/domainIncludes" href="http://schema.org/Vehicle">Vehicle</a></span>
+ <span>Range: <a property="http://schema.org/rangeIncludes" href="http://schema.org/QuantitativeValue">QuantitativeValue</a></span>
+ </div>
+</div>
View
@@ -12,6 +12,13 @@
"rdfs:comment": "The meta extension contains terms primarily designed to support the implementation of the Schema.org vocabulary itself. It includes terms such as [[Class]], [[Property]], [[domainIncludes]] and [[supersededBy]]. They are not currently advocated for widespread use across the web."
},
{
+ "@id": "http://attic.schema.org",
+ "schema:name": "Attic Area",
+ "schema:disambiguatingDescription": "these terms have been either depricated from the core or extentions, or removed from [pending](/docs/howwework.html#pending) as not accepted into the full vocabulary.",
+ "schema:softwareVersion": "0.0",
+ "rdfs:comment": "The attic area is an archive area for terms which are no longer part of the core vocabulary or its extensions. _Attic_ terms are preserved here to satisfy previous links to them.\n\nImplementors and publishers are cautioned not to use terms in the attic area."
+ },
+ {
"@id": "http://pending.schema.org",
"schema:name": "Pending Extension",
"schema:disambiguatingDescription": "these terms are [pending](/docs/howwework.html#pending) wider review. Feedback is welcomed!",
View
@@ -470,23 +470,23 @@ a.ext:hover {
text-decoration: none;
}
-/* Bib extension links overriding default 'ext' values
-a.ext.ext-bib:link{
- color: #009900 !important;
- border-bottom: dotted 1px #009900;
+/* Attic extension links overriding default 'ext' values */
+a.ext.ext-attic:link{
+ color: #888888 !important;
+ border-bottom: dotted 1px #888888 !important;
text-decoration: none;
}
-a.ext.ext-bib:visited {
- color: #00bb00 !important;
- border-bottom: dotted 1px #00bb00;
+a.ext.ext-attic:visited {
+ color: #888888 !important;
+ border-bottom: dotted 1px #888888 !important;
text-decoration: none;
}
-a.ext.ext-bib:hover {
+a.ext.ext-attic:hover {
color: #fff !important;
- background-color: #00bb00;
+ background-color: #bbbbbb;
text-decoration: none;
}
-*/
+
@@ -1,5 +1,5 @@
#!/bin/sh
-EXTENSIONS="auto bib health-lifesci pending meta"
+EXTENSIONS="attic auto bib health-lifesci pending meta"
PWD=`pwd`
PROG="`basename $0`"
if [ `basename $PWD` != "schemaorg" ]
@@ -38,10 +38,10 @@
parser = argparse.ArgumentParser()
parser.add_argument("-a","--autoext", default="Yes",help="Auto add format based file extension Yes|No. Default Yes")
-parser.add_argument("-e","--exclude", default= [[]],action='append',nargs='*', help="Exclude graph(s) [core|extensions|bib|auto|meta|{etc} (Repeatable)")
+parser.add_argument("-e","--exclude", default= [[]],action='append',nargs='*', help="Exclude graph(s) [core|extensions|all|bib|auto|meta|{etc} (Repeatable) - 'attic' always excluded unless explictly included")
parser.add_argument("-f","--format", default="nt", choices=['xml','nquads','nt','json-ld','turtle'])
parser.add_argument("-g","--quadgraphsuffix", help="Suffix for graph elements of quads. eg. http://bib.schema.org/{suffix}")
-parser.add_argument("-i","--include", default= [[]],action='append',nargs='*', help="Include graph(s) [core|extensions|bib|auto|meta|{etc} (Repeatable) overrides exclude")
+parser.add_argument("-i","--include", default= [[]],action='append',nargs='*', help="Include graph(s) [core|extensions|all|attic|bib|auto|meta|{etc} (Repeatable) overrides exclude - 'attic' always excluded unless explictly individually included")
parser.add_argument("-m","--markdownprocess", default="Yes", help="Process markdown in comments Yes|No. Default Yes")
parser.add_argument("-o","--output", required=True, help="output file")
args = parser.parse_args()
@@ -60,17 +60,23 @@
setInTestHarness(True)
import sdoapp
-skiplist = []
+skiplist = ['']
for e in args.exclude:
for s in e:
if s == "core":
skiplist.append("http://schema.org/")
elif s == "extensions":
for i in sdoapp.ENABLED_EXTENSIONS:
skiplist.append(getNss(i))
+ elif s == "all":
+ skiplist.append("http://schema.org/")
+ for i in sdoapp.ENABLED_EXTENSIONS:
+ skiplist.append(getNss(i))
else:
skiplist.append(getNss(s))
-
+if not getNss('attic') in skiplist: #Always skip attic by defualt
+ skiplist.append(getNss('attic'))
+
for e in args.include:
for s in e:
if s == "core" and "http://schema.org/" in skiplist:
@@ -79,6 +85,11 @@
for i in sdoapp.ENABLED_EXTENSIONS:
if getNss(i) in skiplist:
skiplist.remove(getNss(i))
+ elif s == "all":
+ skiplist.remove("http://schema.org/")
+ for i in sdoapp.ENABLED_EXTENSIONS:
+ if getNss(i) in skiplist and getNss(i) != "attic":
+ skiplist.remove(getNss(i))
elif getNss(s) in skiplist:
skiplist.remove(getNss(s))
Oops, something went wrong.

0 comments on commit 5fe2fe4

Please sign in to comment.