Skip to content

Commit 053008c

Browse files
committed
added dncompare and trsreader examples
1 parent 81d6143 commit 053008c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+16507
-16312
lines changed

elmclient/_app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ def is_project_uri(self, uri):
104104
return True
105105
return False
106106

107+
def is_server_uri( self, uri ):
108+
if uri and uri.startswith(self.baseurl):
109+
return True
110+
return False
111+
107112
# return an absolute URL for a url relative to this app
108113
# NOTE if reluri has a leading / this will be relative to the serverhostname:port
109114
# i.e. the app context root will be removed.

elmclient/_newtypesystem.py

Lines changed: 476 additions & 0 deletions
Large diffs are not rendered by default.

elmclient/_project.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def __init__(self, name, project_uri, app, is_optin=False, singlemode=False,defa
4242
self.services_uri = None
4343
self.appcatalog_xml = None
4444
self.hooks = []
45+
self.configTree = None # for a walkable tree of configs, alternating baseline->stream->baseline->... - the name property is the UUID, the textname is the visible name, configURL, ismutable, children
4546
# copy the server from the app - this is so OSLC query can be done on either a project including component) or app
4647
self.server = app.server
4748

elmclient/_rm.py

Lines changed: 198 additions & 106 deletions
Large diffs are not rendered by default.

elmclient/examples/dncompare.py

Lines changed: 336 additions & 0 deletions
Large diffs are not rendered by default.

elmclient/examples/oslcquery.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,10 @@ def safeint(s,nonereturns=0):
797797
params = {}
798798
try:
799799
xml1 = queryon.execute_get_rdf_xml( k, params=params, intent="Retrieve resource RDF-XML" )
800+
except requests.HTTPError:
801+
# this happens for e.g. Attribute Type http://www.w3.org/2001/XMLSchema#dateTime
802+
print( f"Cannot retrieve URL {k} - skipped" )
803+
continue
800804
except AttributeError:
801805
try:
802806
xml1 = queryon.execute_get_rdf_xml( k, params=params, intent="Retrieve resource RDF-XML" )

0 commit comments

Comments
 (0)