/******************************************************************************************************************* * * ******************************************************************************************************************/ public StatementUnmarshallerFactoryImpl() { // FIXME: discover with Lookup unmarshallerMapByType.put(ObservationVocabulary.OBS_OBSERVATION_SET, new SimpleObservationSetUnmarshaller()); unmarshallerMapByType.put(ObservationVocabulary.OBS_OBSERVATION, new SimpleObservationUnmarshaller()); unmarshallerMapByType.put(ObservationVocabulary.OBS_OBSERVATION_ITEM, new SimpleObservationItemUnmarshaller()); unmarshallerMapByType.put(ObservationVocabulary.OBS_OBSERVABLE, new SimpleObservableUnmarshaller()); unmarshallerMapByType.put(ObservationVocabulary.OBS_OBSERVER, new SimpleObserverUnmarshaller()); unmarshallerMapByType.put(ObservationVocabulary.DC_PUBLISHER, new SimpleSourceUnmarshaller()); unmarshallerMapByType.put(ObservationVocabulary.OBS_LOCATION, new SimpleLocationUnmarshaller()); // factoryMapByType.put(Media.FOAF_DOCUMENT, new MediaTripleUnmarshaller()); }
final Date date = (Date)getLiteral(statements, ObservationVocabulary.DC_DATE); final Location location = (Location)findEntity(context, statements, ObservationVocabulary.OBS_MADE_AT); final Source source = (Source)findEntity(context, statements, ObservationVocabulary.DC_PUBLISHER); final Set<Observer> observers = new HashSet<Observer>(); final Set<ObservationItem> observationItems = new HashSet<ObservationItem>(); extras.add(new DefaultIdentifiable(Converter.valueToId(statements.get(0).getSubject()))); final String displayName = (String)getLiteral(statements, ObservationVocabulary.RDFS_LABEL); context.push(observation); for (final Statement statement : findStatementsWithPredicate(statements, ObservationVocabulary.SKOS_NARROWER)) for (final Statement statement : findStatementsWithPredicate(statements, ObservationVocabulary.DC_CREATOR))