GeoPubby  Version 0.1.0.0
HypermediaResource Class Reference

The hypermedia interface to a specific resource managed by the server. More...

Collaboration diagram for HypermediaResource:

Public Member Functions

 HypermediaResource (String relativeIRI, Configuration config)
 
String getRelativeIRI ()
 
String getAbsoluteIRI ()
 
String getPageURL ()
 
String getDataURL ()
 
String getPathPageURL (Property property)
 
String getPathDataURL (Property property)
 
String getInversePathPageURL (Property property)
 
String getInversePathDataURL (Property property)
 

Private Member Functions

String getPathURL (String urlPrefix, Property property)
 

Private Attributes

final String relativeIRI
 
final Configuration config
 

Detailed Description

The hypermedia interface to a specific resource managed by the server.

Author
Richard Cyganiak (richa.nosp@m.rd@c.nosp@m.ygani.nosp@m.ak.d.nosp@m.e)
Version
$Id$

Constructor & Destructor Documentation

◆ HypermediaResource()

HypermediaResource ( String  relativeIRI,
Configuration  config 
)
15  {
16  this.relativeIRI = relativeIRI;
17  this.config = config;
18  }
final String relativeIRI
Definition: HypermediaResource.java:12
final Configuration config
Definition: HypermediaResource.java:13

References HypermediaResource.config, and HypermediaResource.relativeIRI.

Member Function Documentation

◆ getAbsoluteIRI()

String getAbsoluteIRI ( )
Returns
the resource's IRI on the public Web server
30  {
34  }
String getWebResourcePrefix()
Definition: Configuration.java:273
String getWebApplicationBaseURI()
Definition: Configuration.java:269

References HypermediaResource.config, Configuration.getWebApplicationBaseURI(), Configuration.getWebResourcePrefix(), and HypermediaResource.relativeIRI.

◆ getDataURL()

String getDataURL ( )
Returns
the RDF document describing the resource on the public Web server
46  {
47  return config.getWebApplicationBaseURI() + "data/" + relativeIRI;
48  }

References HypermediaResource.config, Configuration.getWebApplicationBaseURI(), and HypermediaResource.relativeIRI.

◆ getInversePathDataURL()

String getInversePathDataURL ( Property  property)
62  {
63  return getPathURL("pathdata/-", property);
64  }
String getPathURL(String urlPrefix, Property property)
Definition: HypermediaResource.java:66

References HypermediaResource.getPathURL().

◆ getInversePathPageURL()

String getInversePathPageURL ( Property  property)
58  {
59  return getPathURL("pathpage/-", property);
60  }

References HypermediaResource.getPathURL().

◆ getPageURL()

String getPageURL ( )
Returns
the HTML page describing the resource on the public Web server
39  {
40  return config.getWebApplicationBaseURI() + "page/" + relativeIRI;
41  }

References HypermediaResource.config, Configuration.getWebApplicationBaseURI(), and HypermediaResource.relativeIRI.

◆ getPathDataURL()

String getPathDataURL ( Property  property)
54  {
55  return getPathURL("pathdata/", property);
56  }

References HypermediaResource.getPathURL().

◆ getPathPageURL()

String getPathPageURL ( Property  property)
50  {
51  return getPathURL("pathpage/", property);
52  }

References HypermediaResource.getPathURL().

◆ getPathURL()

String getPathURL ( String  urlPrefix,
Property  property 
)
private
66  {
67  if (config.getPrefixes().qnameFor(property.getURI()) == null) {
68  return null;
69  }
70  return config.getWebApplicationBaseURI() + urlPrefix +
71  config.getPrefixes().qnameFor(property.getURI()) + "/" +
73  }
PrefixMapping getPrefixes()
Definition: Configuration.java:221

References HypermediaResource.config, Configuration.getPrefixes(), Configuration.getWebApplicationBaseURI(), and HypermediaResource.relativeIRI.

Referenced by HypermediaResource.getInversePathDataURL(), HypermediaResource.getInversePathPageURL(), HypermediaResource.getPathDataURL(), and HypermediaResource.getPathPageURL().

◆ getRelativeIRI()

String getRelativeIRI ( )
Returns
the resource's IRI, relative to the web server root
23  {
24  return relativeIRI;
25  }

References HypermediaResource.relativeIRI.

Member Data Documentation

◆ config

◆ relativeIRI