René's URL Explorer Experiment


Title: Infinite loop while framing data · Issue #338 · jsonld-java/jsonld-java · GitHub

Open Graph Title: Infinite loop while framing data · Issue #338 · jsonld-java/jsonld-java

X Title: Infinite loop while framing data · Issue #338 · jsonld-java/jsonld-java

Description: With the following test case and the serialized data model-ser.zip (you need to unzip and change the path to the file). When running test case we run into an infinite loop. I think something needs to be done to handle this problem becaus...

Open Graph Description: With the following test case and the serialized data model-ser.zip (you need to unzip and change the path to the file). When running test case we run into an infinite loop. I think something needs ...

X Description: With the following test case and the serialized data model-ser.zip (you need to unzip and change the path to the file). When running test case we run into an infinite loop. I think something needs ...

Opengraph URL: https://github.com/jsonld-java/jsonld-java/issues/338

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Infinite loop while framing data","articleBody":"With the following test case and the serialized data [model-ser.zip](https://github.com/jsonld-java/jsonld-java/files/11397861/model-ser.zip) (you need to unzip and change the path to the file). When running test case we run into an infinite loop. I think something needs to be done to handle this problem because you never know what data is going to be loaded.\r\n\r\n```\r\n    @Test\r\n    public void testJsonLdCycle() throws Exception {\r\n        final JsonLdOptions opts = new JsonLdOptions();\r\n\r\n        //opts.setUseRdfType(getWriterConfig().get(JSONLDSettings.USE_RDF_TYPE));\r\n        opts.setUseNativeTypes(true);\r\n        opts.setCompactArrays(true);\r\n        //opts.setOmitGraph(getWriterConfig().get(OMIT_GRAPH));\r\n        opts.setEmbed(Embed.ALWAYS);\r\n\r\n        String testFrame = \"{\\\"@context\\\" : [ \\\"http://cambridgesemantics.com/ontologies/GraphmartStatus/LayerStatus\\\", \\\"http://cambridgesemantics.com/ontologies/GraphmartStatus/LayerChildStatus\\\", \\\"http://www.w3.org/2002/07/owl/Thing\\\", \\\"http://cambridgesemantics.com/ontologies/GraphmartStatus/GraphmartStatus\\\" ], \\\"@type\\\" : [ \\\"http://cambridgesemantics.com/ontologies/GraphmartStatus#GraphmartStatus\\\" ]}\";\r\n\r\n        final SesameRDFParser serialiser = new SesameRDFParser();\r\n\r\n        try (ObjectInputStream in = new ObjectInputStream(new UserDirFileInputStream(\"/test/resources/coredata/model.ser\"))) {\r\n            Model model = (LinkedHashModel) in.readObject();\r\n\r\n            Object output = JsonLdProcessor.fromRDF(model, opts, serialiser);\r\n            JsonLdProcessor.frame(output, JsonUtils.fromString(testFrame), opts);\r\n        }\r\n\r\n    }\r\n\r\n    public class SesameRDFParser implements com.github.jsonldjava.core.RDFParser {\r\n\r\n        public void setPrefix(RDFDataset result, String fullUri, String prefix) {\r\n            result.setNamespace(fullUri, prefix);\r\n        }\r\n\r\n        public void handleStatement(RDFDataset result, org.openrdf.model.Statement nextStatement) {\r\n            // TODO: from a basic look at the code it seems some of these could be\r\n            // null\r\n            // null values for IRIs will probably break things further down the line\r\n            // and i'm not sure yet if this should be something handled later on, or\r\n            // something that should be checked here\r\n            final String subject = getResourceValue(nextStatement.getSubject());\r\n            final String predicate = getResourceValue(nextStatement.getPredicate());\r\n            final Value object = nextStatement.getObject();\r\n            final String graphName = getResourceValue(nextStatement.getContext());\r\n\r\n            if (object instanceof Literal) {\r\n                final Literal literal = (Literal) object;\r\n                final String value = literal.getLabel();\r\n                final String language = literal.getLanguage();\r\n\r\n                String datatype = getResourceValue(literal.getDatatype());\r\n\r\n                // In RDF-1.1, Language Literals internally have the datatype\r\n                // rdf:langString\r\n                if (language != null \u0026\u0026 datatype == null) {\r\n                    datatype = org.openrdf.model.vocabulary.RDF.LANGSTRING.stringValue();\r\n                }\r\n\r\n                // In RDF-1.1, RDF-1.0 Plain Literals are now Typed Literals with\r\n                // type xsd:String\r\n                if (language == null \u0026\u0026 datatype == null) {\r\n                    datatype = XMLSchema.STRING.stringValue();\r\n                }\r\n\r\n                result.addQuad(subject, predicate, value, datatype, language, graphName);\r\n\r\n            } else {\r\n                result.addQuad(subject, predicate, getResourceValue((Resource) object), graphName);\r\n            }\r\n        }\r\n\r\n        private String getResourceValue(Resource subject) {\r\n            if (subject == null) {\r\n                return null;\r\n            } else if (subject instanceof URI) {\r\n                return subject.stringValue();\r\n            } else if (subject instanceof BNode) {\r\n                return \"_:\" + subject.stringValue();\r\n            }\r\n\r\n            throw new IllegalStateException(\"Did not recognise resource type: \" + subject.getClass().getName());\r\n        }\r\n\r\n        @Override\r\n        public RDFDataset parse(Object input) throws JsonLdError {\r\n            final RDFDataset result = new RDFDataset();\r\n            if (input instanceof Statement) {\r\n                handleStatement(result, (Statement) input);\r\n            } else if (input instanceof Graph) {\r\n                if (input instanceof Model) {\r\n                    final Set\u003cNamespace\u003e namespaces = ((Model) input).getNamespaces();\r\n                    for (final Namespace nextNs : namespaces) {\r\n                        result.setNamespace(nextNs.getName(), nextNs.getPrefix());\r\n                    }\r\n                }\r\n\r\n                for (final org.openrdf.model.Statement nextStatement : (Graph) input) {\r\n                    handleStatement(result, nextStatement);\r\n                }\r\n            }\r\n            return result;\r\n        }\r\n\r\n    }\r\n```","author":{"url":"https://github.com/garpinc","@type":"Person","name":"garpinc"},"datePublished":"2023-05-04T13:19:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/338/jsonld-java/issues/338"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:830fd181-3ab3-70ae-36a2-e8930d8eb458
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCEDE:1FD077:38272A7:4BF11E1:6971F53D
html-safe-nonce087d3ab908388b112c384f84091d3f918018f6a37a06ea799e7c8f88d51b792a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRURFOjFGRDA3NzozODI3MkE3OjRCRjExRTE6Njk3MUY1M0QiLCJ2aXNpdG9yX2lkIjoiNDI5ODAwMTU2NzYwOTY0ODQ0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3c37ffd546ce63cabc2d947e827c9e8ef4283d588b50bd5620b39e4d5ba2846e
hovercard-subject-tagissue:1696000055
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/jsonld-java/jsonld-java/338/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8068b9545aed603bacaea97216266ad19d7a91ddd767b7202a65df1fd602ae44/jsonld-java/jsonld-java/issues/338
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8068b9545aed603bacaea97216266ad19d7a91ddd767b7202a65df1fd602ae44/jsonld-java/jsonld-java/issues/338
og:image:altWith the following test case and the serialized data model-ser.zip (you need to unzip and change the path to the file). When running test case we run into an infinite loop. I think something needs ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegarpinc
hostnamegithub.com
expected-hostnamegithub.com
None3d9da1aa47d387dfb2aca0f2e5c19150dc936b8128a6b2ecd6a02fc26a378fff
turbo-cache-controlno-preview
go-importgithub.com/jsonld-java/jsonld-java git https://github.com/jsonld-java/jsonld-java.git
octolytics-dimension-user_id4359856
octolytics-dimension-user_loginjsonld-java
octolytics-dimension-repository_id2988730
octolytics-dimension-repository_nwojsonld-java/jsonld-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2988730
octolytics-dimension-repository_network_root_nwojsonld-java/jsonld-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4332d3e3368b9bce3dfd3c4a2643112933072734
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/jsonld-java/jsonld-java/issues/338#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjsonld-java%2Fjsonld-java%2Fissues%2F338
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjsonld-java%2Fjsonld-java%2Fissues%2F338
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=jsonld-java%2Fjsonld-java
Reloadhttps://github.com/jsonld-java/jsonld-java/issues/338
Reloadhttps://github.com/jsonld-java/jsonld-java/issues/338
Reloadhttps://github.com/jsonld-java/jsonld-java/issues/338
jsonld-java https://github.com/jsonld-java
jsonld-javahttps://github.com/jsonld-java/jsonld-java
Notifications https://github.com/login?return_to=%2Fjsonld-java%2Fjsonld-java
Fork 153 https://github.com/login?return_to=%2Fjsonld-java%2Fjsonld-java
Star 386 https://github.com/login?return_to=%2Fjsonld-java%2Fjsonld-java
Code https://github.com/jsonld-java/jsonld-java
Issues 46 https://github.com/jsonld-java/jsonld-java/issues
Pull requests 8 https://github.com/jsonld-java/jsonld-java/pulls
Actions https://github.com/jsonld-java/jsonld-java/actions
Projects 0 https://github.com/jsonld-java/jsonld-java/projects
Wiki https://github.com/jsonld-java/jsonld-java/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/jsonld-java/jsonld-java/security
Please reload this pagehttps://github.com/jsonld-java/jsonld-java/issues/338
Insights https://github.com/jsonld-java/jsonld-java/pulse
Code https://github.com/jsonld-java/jsonld-java
Issues https://github.com/jsonld-java/jsonld-java/issues
Pull requests https://github.com/jsonld-java/jsonld-java/pulls
Actions https://github.com/jsonld-java/jsonld-java/actions
Projects https://github.com/jsonld-java/jsonld-java/projects
Wiki https://github.com/jsonld-java/jsonld-java/wiki
Security https://github.com/jsonld-java/jsonld-java/security
Insights https://github.com/jsonld-java/jsonld-java/pulse
New issuehttps://github.com/login?return_to=https://github.com/jsonld-java/jsonld-java/issues/338
New issuehttps://github.com/login?return_to=https://github.com/jsonld-java/jsonld-java/issues/338
Infinite loop while framing datahttps://github.com/jsonld-java/jsonld-java/issues/338#top
https://github.com/garpinc
https://github.com/garpinc
https://github.com/garpinc
garpinchttps://github.com/garpinc
on May 4, 2023https://github.com/jsonld-java/jsonld-java/issues/338#issue-1696000055
model-ser.ziphttps://github.com/jsonld-java/jsonld-java/files/11397861/model-ser.zip
garpinchttps://github.com/garpinc
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.