GeoPubby
Version 0.1.0.0
|
The server's configuration. More...
Public Member Functions | |
Configuration (Resource configuration) | |
DataSource | getDataSource () |
A composite DataSource representing the merge of all datasets. More... | |
List< Dataset > | getDatasets () |
The conf:dataset blocks. More... | |
HypermediaControls | getControls (String relativeRequestURI, boolean isRelativeToPubbyRoot) |
PrefixMapping | getPrefixes () |
Collection< Property > | getLabelProperties () |
Collection< Property > | getGeoProperties () |
Collection< Property > | getCrsProperties () |
Collection< Property > | getTypeProperties () |
Collection< Property > | getCommentProperties () |
Collection< Property > | getImageProperties () |
String | getDefaultLanguage () |
String | getIndexIRI () |
The "home" resource. More... | |
String | getProjectLink () |
String | getProjectName () |
String | getWebApplicationBaseURI () |
String | getWebResourcePrefix () |
boolean | showLabels () |
VocabularyStore | getVocabularyStore () |
Set< String > | getBrowsableNamespaces () |
Gets all values of conf:browsableNamespace declared on the configuration resource. More... | |
boolean | isBrowsable (String iri) |
Resource | getSelf () |
Model | getModel () |
boolean | hasType (Resource class_) |
boolean | hasProperty (Property p) |
Resource | getResource (Property p) |
Set< Resource > | getResources (Property p) |
Set< Property > | getProperties (Property p) |
String | getIRI (Property p) |
String | getIRI (Property p, String defaultValue) |
String | getRequiredIRI (Property p) |
Set< String > | getIRIs (Property p) |
String | getString (Property p) |
String | getString (Property p, String defaultValue) |
Set< String > | getStrings (Property p) |
boolean | getBoolean (Property p, boolean defaultValue) |
void | requireExactlyOneOf (Property... properties) |
Static Public Member Functions | |
static Configuration | create (Model model) |
Private Member Functions | |
DataSource | buildDataSource () |
void | assertHasOneValue (Property p) |
void | assertResourceValue (Property p) |
void | assertResourceValue (Statement stmt) |
void | assertIRIValue (Property p) |
void | assertIRIValue (Statement stmt) |
void | assertLiteralValue (Property p) |
void | assertLiteralValue (Statement stmt) |
void | assertString (Statement stmt) |
String | pretty (RDFNode node) |
String | pretty (Statement stmt) |
void | raiseMissingProperty (Property p) |
void | raiseUnexpectedDatatype (String expectedDatatype, Statement stmt) |
Private Attributes | |
final PrefixMapping | prefixes |
final String | webBase |
final Collection< Property > | labelProperties |
final Collection< Property > | typeProperties |
final Collection< Property > | geoProperties |
final Collection< Property > | crsProperties |
final Collection< Property > | commentProperties |
final Collection< Property > | imageProperties |
final ArrayList< Dataset > | datasets = new ArrayList<Dataset>() |
final VocabularyStore | vocabularyStore = new VocabularyStore() |
final DataSource | dataSource |
final String | indexIRI |
final Set< String > | allBrowsableNamespaces = new HashSet<String>() |
final Resource | resource |
The server's configuration.
Configuration | ( | Resource | configuration | ) |
References ModelUtil.addNSIfUndefined(), Configuration.allBrowsableNamespaces, CONF.AnnotationProvider, Configuration.buildDataSource(), Configuration.commentProperties, CONF.commentProperty, Configuration.crsProperties, CONF.crsProperty, CONF.dataset, Configuration.datasets, Configuration.dataSource, DataSource.describeResource(), GEO.EPSG, Configuration.geoProperties, CONF.geoProperty, Configuration.getBrowsableNamespaces(), Dataset.getBrowsableNamespaces(), Configuration.getDataSource(), Configuration.getDefaultLanguage(), DataSource.getIndex(), ResourceReader.getIRI(), ResourceReader.getIRIs(), DataSource.getLabelIndex(), ResourceReader.getModel(), ResourceReader.getProperties(), ResourceReader.getRequiredIRI(), ResourceReader.getResources(), Configuration.getWebApplicationBaseURI(), Configuration.getWebResourcePrefix(), GEO.HASGEOMETRY, ResourceReader.hasProperty(), Configuration.imageProperties, CONF.imageProperty, Configuration.indexIRI, CONF.indexResource, Configuration.labelProperties, CONF.labelProperty, CONF.loadRDF, CONF.loadVocabulary, CONF.NS, Configuration.prefixes, VocabularyStore.setDataSource(), VocabularyStore.setDefaultLanguage(), Configuration.typeProperties, CONF.typeProperty, CONF.usePrefixesFrom, Configuration.vocabularyStore, CONF.wdImage, Configuration.webBase, and CONF.webBase.
Referenced by Configuration.create().
|
privateinherited |
References ResourceReader.pretty(), and ResourceReader.resource.
Referenced by ResourceReader.getBoolean(), ResourceReader.getIRI(), ResourceReader.getResource(), and ResourceReader.getString().
|
privateinherited |
References ResourceReader.resource.
Referenced by ResourceReader.getIRI(), and ResourceReader.getIRIs().
|
privateinherited |
References ResourceReader.pretty().
|
privateinherited |
References ResourceReader.resource.
Referenced by ResourceReader.assertString(), and ResourceReader.getBoolean().
|
privateinherited |
References ResourceReader.pretty().
|
privateinherited |
References ResourceReader.resource.
Referenced by ResourceReader.getResource(), and ResourceReader.getResources().
|
privateinherited |
References ResourceReader.pretty().
|
privateinherited |
References ResourceReader.assertLiteralValue(), and ResourceReader.raiseUnexpectedDatatype().
Referenced by ResourceReader.getString(), and ResourceReader.getStrings().
|
private |
|
static |
References Configuration.Configuration(), and CONF.Configuration.
Referenced by ServletContextInitializer.initConfiguration(), and Reloader.run().
|
inherited |
References ResourceReader.assertHasOneValue(), ResourceReader.assertLiteralValue(), ResourceReader.raiseUnexpectedDatatype(), and ResourceReader.resource.
Referenced by Dataset.addSameAsStatements(), Configuration.showLabels(), Dataset.supportsIRIs(), and Dataset.supportsSPARQL11().
Set<String> getBrowsableNamespaces | ( | ) |
Gets all values of conf:browsableNamespace
declared on the configuration resource.
Does not include values declared on specific datasets.
References CONF.browsableNamespace, and ResourceReader.getIRIs().
Referenced by Dataset.buildDataSource(), and Configuration.Configuration().
Collection<Property> getCommentProperties | ( | ) |
References Configuration.commentProperties.
Referenced by ResourceDescription.getComment().
HypermediaControls getControls | ( | String | relativeRequestURI, |
boolean | isRelativeToPubbyRoot | ||
) |
relativeRequestURI | URI relative to the Pubby root (conf:webBase ) |
isRelativeToPubbyRoot | If true, the IRI is relative to the Pubby root (conf:webBase ); otherwise, the IRI is relative to some non-resource namespace such as /page/ . The distinction matters if conf:webResourcePrefix is set. |
References HypermediaControls.createFromPubbyPath(), Configuration.getWebResourcePrefix(), and IRIEncoder.toIRI().
Referenced by DataURLServlet.doGet(), ValuesBaseServlet.doGet(), WebURIServlet.doGet(), PageURLServlet.doGet(), and MappedResource.MappedResource().
Collection<Property> getCrsProperties | ( | ) |
References Configuration.crsProperties.
Referenced by GeoBrowserServlet.doGet().
List<Dataset> getDatasets | ( | ) |
The conf:dataset
blocks.
References Configuration.datasets.
Referenced by BaseServlet.addDocumentMetadata(), BaseServlet.addPageMetadata(), SearchServlet.doGet(), GeoBrowserServlet.doGet(), and PageURLServlet.doGet().
DataSource getDataSource | ( | ) |
A composite DataSource representing the merge of all datasets.
References Configuration.dataSource.
Referenced by Configuration.Configuration(), ValuesDataURLServlet.doGet(), ValuesURLServlet.doGet(), SearchServlet.doGet(), and HypermediaControls.getResourceDescription().
String getDefaultLanguage | ( | ) |
References CONF.defaultLanguage, and ResourceReader.getString().
Referenced by Configuration.Configuration(), ResourceDescription.getComment(), ResourceDescription.getLabel(), and ResourceDescription.toTitleCase().
Collection<Property> getGeoProperties | ( | ) |
References Configuration.geoProperties.
Referenced by GeoBrowserServlet.doGet().
Collection<Property> getImageProperties | ( | ) |
References Configuration.imageProperties.
Referenced by ResourceDescription.getImageURL().
String getIndexIRI | ( | ) |
The "home" resource.
If its IRI is not the web server base, then the web server will redirect there.
References Configuration.indexIRI.
Referenced by RootServlet.doGet().
|
inherited |
|
inherited |
|
inherited |
Collection<Property> getLabelProperties | ( | ) |
References Configuration.labelProperties.
Referenced by GeoBrowserServlet.doGet(), and ResourceDescription.getLabel().
|
inherited |
PrefixMapping getPrefixes | ( | ) |
References Configuration.prefixes.
Referenced by ValuesBaseServlet.doGet(), HypermediaControls.getPathURL(), HypermediaResource.getPathURL(), and ResourceDescription.getPrefixes().
String getProjectLink | ( | ) |
References ResourceReader.getIRI(), and CONF.projectHomepage.
Referenced by ValuesURLServlet.doGet(), GeoBrowserServlet.doGet(), PageURLServlet.doGet(), and BaseServlet.send404().
String getProjectName | ( | ) |
References ResourceReader.getString(), and CONF.projectName.
Referenced by ValuesURLServlet.doGet(), GeoBrowserServlet.doGet(), PageURLServlet.doGet(), and BaseServlet.send404().
|
inherited |
|
inherited |
References ResourceReader.getIRI(), ResourceReader.raiseMissingProperty(), and ResourceReader.resource.
Referenced by Configuration.Configuration().
|
inherited |
References ResourceReader.assertHasOneValue(), ResourceReader.assertResourceValue(), and ResourceReader.resource.
Referenced by MetadataConfiguration.MetadataConfiguration().
|
inherited |
References ResourceReader.assertResourceValue(), and ResourceReader.resource.
Referenced by Configuration.Configuration(), and ResourceReader.getProperties().
|
inherited |
References ResourceReader.resource.
Referenced by MetadataConfiguration.parsePlaceholder().
|
inherited |
|
inherited |
References ResourceReader.assertHasOneValue(), ResourceReader.assertString(), and ResourceReader.resource.
|
inherited |
References ResourceReader.assertString(), and ResourceReader.resource.
Referenced by Dataset.buildDataSource().
Collection<Property> getTypeProperties | ( | ) |
References Configuration.typeProperties.
Referenced by GeoBrowserServlet.doGet().
VocabularyStore getVocabularyStore | ( | ) |
String getWebApplicationBaseURI | ( | ) |
References Configuration.webBase.
Referenced by Dataset.buildDataSource(), Configuration.Configuration(), HypermediaControls.createFromPubbyPath(), ValuesURLServlet.doGet(), RootServlet.doGet(), SearchServlet.doGet(), GeoBrowserServlet.doGet(), PageURLServlet.doGet(), HypermediaResource.getAbsoluteIRI(), HypermediaControls.getDataURL(), HypermediaResource.getDataURL(), HypermediaControls.getPageURL(), HypermediaResource.getPageURL(), HypermediaControls.getPathURL(), HypermediaResource.getPathURL(), HypermediaControls.getPubbyPath(), HypermediaControls.HypermediaControls(), and BaseServlet.send404().
String getWebResourcePrefix | ( | ) |
References ResourceReader.getString(), and CONF.webResourcePrefix.
Referenced by Configuration.buildDataSource(), Dataset.buildDataSource(), Configuration.Configuration(), HypermediaControls.createFromPubbyPath(), HypermediaResource.getAbsoluteIRI(), Configuration.getControls(), and HypermediaControls.getPubbyPath().
|
inherited |
References ResourceReader.resource.
Referenced by Configuration.buildDataSource(), Dataset.buildDataSource(), and Configuration.Configuration().
|
inherited |
References ResourceReader.resource.
Referenced by Dataset.buildDataSource().
boolean isBrowsable | ( | String | iri | ) |
|
privateinherited |
References ResourceReader.getModel().
Referenced by ResourceReader.assertHasOneValue(), ResourceReader.assertIRIValue(), ResourceReader.assertLiteralValue(), ResourceReader.assertResourceValue(), ResourceReader.pretty(), ResourceReader.raiseMissingProperty(), ResourceReader.raiseUnexpectedDatatype(), and ResourceReader.requireExactlyOneOf().
|
privateinherited |
References ResourceReader.pretty().
|
privateinherited |
References ResourceReader.pretty(), and ResourceReader.resource.
Referenced by ResourceReader.getRequiredIRI().
|
privateinherited |
References ResourceReader.pretty().
Referenced by ResourceReader.assertString(), and ResourceReader.getBoolean().
|
inherited |
References ResourceReader.pretty(), and ResourceReader.resource.
Referenced by Dataset.buildDataSource().
boolean showLabels | ( | ) |
References ResourceReader.getBoolean(), and CONF.showLabels.
Referenced by ValuesURLServlet.doGet(), and PageURLServlet.doGet().
|
private |
Referenced by Configuration.Configuration(), and Configuration.isBrowsable().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getCommentProperties().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getCrsProperties().
Referenced by Configuration.buildDataSource(), Configuration.Configuration(), and Configuration.getDatasets().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getDataSource().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getGeoProperties().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getImageProperties().
|
private |
Referenced by Configuration.buildDataSource(), Configuration.Configuration(), and Configuration.getIndexIRI().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getLabelProperties().
|
private |
Referenced by Configuration.buildDataSource(), Configuration.Configuration(), and Configuration.getPrefixes().
|
privateinherited |
Referenced by ResourceReader.assertHasOneValue(), ResourceReader.assertIRIValue(), ResourceReader.assertLiteralValue(), ResourceReader.assertResourceValue(), ResourceReader.getBoolean(), ResourceReader.getIRI(), ResourceReader.getIRIs(), ResourceReader.getModel(), ResourceReader.getRequiredIRI(), ResourceReader.getResource(), ResourceReader.getResources(), ResourceReader.getSelf(), ResourceReader.getString(), ResourceReader.getStrings(), ResourceReader.hasProperty(), ResourceReader.hasType(), ResourceReader.raiseMissingProperty(), ResourceReader.requireExactlyOneOf(), and ResourceReader.ResourceReader().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getTypeProperties().
|
private |
Referenced by Configuration.Configuration(), and Configuration.getVocabularyStore().
|
private |