@@ -271,7 +271,7 @@ public Object compact(Context activeCtx, String activeProperty, Object element,
271271 }
272272 if (value instanceof List ) {
273273 ((List <Object >) result .get (property ))
274- .addAll ((List <Object >) value );
274+ .addAll ((List <Object >) value );
275275 } else {
276276 ((List <Object >) result .get (property )).add (value );
277277 }
@@ -373,7 +373,7 @@ else if (JsonLdConsts.INDEX.equals(expandedProperty)
373373 // true
374374 activeCtx .compactIri (JsonLdConsts .INDEX , true ),
375375 ((Map <String , Object >) expandedItem )
376- .get (JsonLdConsts .INDEX ));
376+ .get (JsonLdConsts .INDEX ));
377377 }
378378 }
379379 // 7.6.4.3)
@@ -398,7 +398,7 @@ else if (result.containsKey(itemActiveProperty)) {
398398 // 7.6.5.2)
399399 if (JsonLdConsts .LANGUAGE .equals (container ) && (compactedItem instanceof Map
400400 && ((Map <String , Object >) compactedItem )
401- .containsKey (JsonLdConsts .VALUE ))) {
401+ .containsKey (JsonLdConsts .VALUE ))) {
402402 compactedItem = ((Map <String , Object >) compactedItem )
403403 .get (JsonLdConsts .VALUE );
404404 }
@@ -443,7 +443,7 @@ else if (result.containsKey(itemActiveProperty)) {
443443 }
444444 if (compactedItem instanceof List ) {
445445 ((List <Object >) result .get (itemActiveProperty ))
446- .addAll ((List <Object >) compactedItem );
446+ .addAll ((List <Object >) compactedItem );
447447 } else {
448448 ((List <Object >) result .get (itemActiveProperty )).add (compactedItem );
449449 }
@@ -721,7 +721,7 @@ else if (JsonLdConsts.REVERSE.equals(expandedProperty)) {
721721 // 7.4.11.2.2)
722722 if (item instanceof List ) {
723723 ((List <Object >) result .get (property ))
724- .addAll ((List <Object >) item );
724+ .addAll ((List <Object >) item );
725725 } else {
726726 ((List <Object >) result .get (property )).add (item );
727727 }
@@ -752,7 +752,7 @@ else if (JsonLdConsts.REVERSE.equals(expandedProperty)) {
752752 if (item instanceof Map && (((Map <String , Object >) item )
753753 .containsKey (JsonLdConsts .VALUE )
754754 || ((Map <String , Object >) item )
755- .containsKey (JsonLdConsts .LIST ))) {
755+ .containsKey (JsonLdConsts .LIST ))) {
756756 throw new JsonLdError (Error .INVALID_REVERSE_PROPERTY_VALUE );
757757 }
758758 // 7.4.11.3.3.1.2)
@@ -893,7 +893,7 @@ else if (JsonLdConsts.INDEX.equals(activeCtx.getContainer(key))
893893 // 7.10.4.3)
894894 if (item instanceof List ) {
895895 ((List <Object >) reverseMap .get (expandedProperty ))
896- .addAll ((List <Object >) item );
896+ .addAll ((List <Object >) item );
897897 } else {
898898 ((List <Object >) reverseMap .get (expandedProperty )).add (item );
899899 }
@@ -908,7 +908,7 @@ else if (JsonLdConsts.INDEX.equals(activeCtx.getContainer(key))
908908 // 7.11.2)
909909 if (expandedValue instanceof List ) {
910910 ((List <Object >) result .get (expandedProperty ))
911- .addAll ((List <Object >) expandedValue );
911+ .addAll ((List <Object >) expandedValue );
912912 } else {
913913 ((List <Object >) result .get (expandedProperty )).add (expandedValue );
914914 }
@@ -1044,7 +1044,7 @@ void generateNodeMap(Object element, Map<String, Object> nodeMap, String activeG
10441044
10451045 void generateNodeMap (Object element , Map <String , Object > nodeMap , String activeGraph ,
10461046 Object activeSubject , String activeProperty , Map <String , Object > list )
1047- throws JsonLdError {
1047+ throws JsonLdError {
10481048 // 1)
10491049 if (element instanceof List ) {
10501050 // 1.1)
@@ -1712,6 +1712,7 @@ private boolean filterNode(FramingContext state, Map<String, Object> node,
17121712 // 1. Node matches if it has an @id property including any IRI or
17131713 // blank node in the @id property in frame.
17141714 if (frameIds != null ) {
1715+ System .out .println (frameIds .getClass ());
17151716 if (frameIds instanceof String ) {
17161717 final Object nodeId = node .get (JsonLdConsts .ID );
17171718 if (nodeId == null ) {
@@ -1720,6 +1721,11 @@ private boolean filterNode(FramingContext state, Map<String, Object> node,
17201721 if (JsonLdUtils .deepCompare (nodeId , frameIds )) {
17211722 return true ;
17221723 }
1724+ } else if (frameIds instanceof LinkedHashMap ) {
1725+ if (node .containsKey (JsonLdConsts .ID )) {
1726+ return true ;
1727+ }
1728+ return false ;
17231729 } else if (!(frameIds instanceof List )) {
17241730 throw new JsonLdError (Error .SYNTAX_ERROR , "frame @id must be an array" );
17251731 } else {
@@ -2001,7 +2007,7 @@ public List<Object> fromRDF(final RDFDataset dataset, boolean noDuplicatesInData
20012007 if (object .isBlankNode () || object .isIRI ()) {
20022008 // 3.5.8.1-3)
20032009 nodeMap .get (object .getValue ()).usages
2004- .add (new UsagesNode (node , predicate , value ));
2010+ .add (new UsagesNode (node , predicate , value ));
20052011 }
20062012 }
20072013 }
@@ -2201,7 +2207,7 @@ public Object normalize(Map<String, Object> dataset) throws JsonLdError {
22012207 });
22022208 }
22032209 ((List <Object >) ((Map <String , Object >) bnodes .get (id )).get ("quads" ))
2204- .add (quad );
2210+ .add (quad );
22052211 }
22062212 }
22072213 }
0 commit comments